feat: add enterprise group deletion event #504
+61
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Testing Instructions
pip install -e
this into a repo where it can be used and where event bus is configured correctly, and then run this: (if the repo is lms, change command to runpython2 manage.py lms produce_event ...
instead)python3 manage.py produce_event --signal openedx_events.enterprise.signals.ENTERPRISE_GROUP_DELETED \ --topic enterprise-core --key-field enterprise_group.uuid \ --data '{"enterprise_group": { "uuid": "d509a63b-eb11-4dc8-8b84-4688c7335110" }}'
Description
If a budget Group is manually deleted (e.g. through django admin), but the PolicyGroupAssociation is not, we end up in a weird state where the budget is looking for a group that doesn’t exist anymore. We should automatically trigger a delete of any PolicyGroupAssociations with the same group ID whenever a budget Group is deleted.
The plan is to
Internal 2U ticket: https://2u-internal.atlassian.net/browse/ENT-10440
Edx-enterprise Producer PR: openedx/edx-enterprise#2413
Checklists
Check off if complete or not applicable:
Merge Checklist:
Post Merge:
finished.