Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: setup signal to consume transaction reveral events #502

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

iloveagent57
Copy link
Contributor

@iloveagent57 iloveagent57 commented Jun 26, 2024

Description:

  • Adds a reversed assignment state and reversed_at field.
  • Sets up a signal handler that will consume the LEDGER_TRANSACTION_REVERSED openedx event and modify a related assignment record's state to reversed.

Jira:
ENT-9009

Testing

  1. Run migrations
  2. Have feat: emit transaction lifecycle events enterprise-subsidy#244 running (which implies that you have kafka etc running locally).
  3. Ensure you have a reversible transaction related to some assignment.
  4. In enterprise-access make app-shell and then run the consumer process with ./manage.py consume_events -t enterprise-subsidy-ledger-transaction-lifecycle --group_id enterprise_access_dev
  5. Unenroll and refund the transaction from the enterprise-subsidy Transaction admin page.
  6. Observe logs in the consumer process that the related assignment was reversed.
  7. Observe in enterprise-access Django admin page for the assignment that the state has now changed to reversed.

Merge checklist:

  • ./manage.py makemigrations has been run
    • Note: This must be run if you modified any models.
      • It may or may not make a migration depending on exactly what you modified, but it should still be run.

Post merge:

  • Ensure that your changes went out to the stage instance
  • Deploy to prod instance

@@ -213,43 +213,36 @@ def has_explicit_access_to_content_assignments_learner(user, enterprise_customer
# Consolidate implicit and explicit rule predicates. #
######################################################

# pylint: disable=unsupported-binary-operation
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new pylint version made this a useless suppression.

Copy link
Contributor

@pwnage101 pwnage101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new era!

@iloveagent57 iloveagent57 merged commit 60df761 into main Jun 27, 2024
3 checks passed
@iloveagent57 iloveagent57 deleted the aed/handle-reversed-event branch June 27, 2024 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants