-
Notifications
You must be signed in to change notification settings - Fork 21
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: new enterprise transaction data/signals #347
feat: new enterprise transaction data/signals #347
Conversation
Sorry, meant to open as a draft. Still not ready for review. |
b144b20
to
283e1f3
Compare
@openedx/hooks-extension-framework this PR is now ready for review, thanks in advance! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is cool. I assume there are some changes that will need to go in to the current consumers/produces as well for this release due to the deprecated field?
There are some unmerged PRs that use those deprecated fields. My plan is to write new PRs to use these new signals and close the unmerged PRs. |
I don't have much time to get this done this week, so I'll take a look early next week. Thank you! |
ac2dc83
to
67d7bc3
Compare
@mariajgrimaldi gentle reminder about this open PR. |
@iloveagent57, thanks for the patience! Reviewing now. |
a22af15
to
e93cb2b
Compare
I appreciate your patience! I have one last comment for you to address, then we can merge. Please feel free to ping me (on here or on slack) once this is ready to be reviewed again. |
a7a582f
to
13fd321
Compare
13fd321
to
20a45f9
Compare
* Added new enterprise signals `LEDGER_TRANSACTION_CREATED`, `LEDGER_TRANSACTION_COMMITTED`, `LEDGER_TRANSACTION_FAILED`, and `LEDGER_TRANSACTION_REVERSED`. * Added a `UuidAvroSerializer` to serialize uuid fields. * Added `isort` make target.
20a45f9
to
cfc7d35
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for addressing all of my comments. This looks great!
The new tag is out: https://github.com/openedx/openedx-events/releases/tag/v9.11.0 |
LEDGER_TRANSACTION_CREATED
,LEDGER_TRANSACTION_COMMITTED
,LEDGER_TRANSACTION_FAILED
, andLEDGER_TRANSACTION_REVERSED
.UuidAvroSerializer
to serialize uuid fields.isort
make target.Context
The best doc to start with is probably this: https://github.com/openedx/enterprise-access/blob/main/docs/decisions/0004-add-access-policy-functionality.rst#context
A Ledger is a model defined in the openedx-ledger repo, it's a core model used in the context of edX Enterprise. https://github.com/openedx/openedx-ledger/blob/main/docs/decisions/0002-ledger-balance-enforcement.rst
It's installed only into enterprise-subsidy AFAIK: https://github.com/openedx/enterprise-subsidy/tree/main/docs/decisions
I don't believe ledgers (or enterprise-subsidy,access) to be used widely by the community - my guess is that 2u is the only entity currently using it.
These new events will be used to relay state transitions from enterprise-subsidy back to enterprise-access so that a related record, LearnerContentAssignment, can update its state based on the new state of its related transaction.
https://github.com/openedx/enterprise-access/blob/main/docs/decisions/0012-assignment-based-policies.rst
https://github.com/openedx/enterprise-access/blob/430d768ee4c6355b353e22f5b0f7902d169850bc/enterprise_access/apps/content_assignments/models.py#L234
Reviewers:
Merge checklist:
Post merge:
finished.
Author concerns: List any concerns about this PR - inelegant
solutions, hacks, quick-and-dirty implementations, concerns about
migrations, etc.