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

fix: account for license source records during license retirement #554

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

iloveagent57
Copy link
Contributor

@iloveagent57 iloveagent57 commented Jan 5, 2024

ENT-8172 | Delete related SubscriptionLicenseSource records when licenses are retired or expired. Without this change, re-assignments of retired licenses (remember that we throw licenses "back into the pool" on revocation, retirement, or expiration) causes an integrity error on the license source table.

Consequences

  1. Licenses that are retired due to edX user retirement (like PII-scrubbing) will lose their source identifiers - we won't have a way to re-associate those to the license or associated enrollments. But I think this is ok because of what it means to retire a user.
  2. Licenses that expire lose their associated source identifier. I think that's fine, b/c expired licenses are those that haven't been activated in the 90 day activation window, so there's no enrollments associated with them.

Link to the associated ticket: https://openedx.atlassian.net/browse/ENT-8172

Testing considerations

  • Include instructions for any required manual tests, and any manual testing that has
    already been performed.
  • Include unit and a11y tests as appropriate
  • Consider performance issues.
  • Check that Database migrations are backwards-compatible

Post-review

Squash commits into discrete sets of changes

ENT-8172 | Delete related ``SubscriptionLicenseSource`` records when licenses are retired or expired.
Copy link
Member

@adamstankiewicz adamstankiewicz left a comment

Choose a reason for hiding this comment

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

LGTM!

@iloveagent57 iloveagent57 merged commit b773ec1 into master Jan 8, 2024
7 checks passed
@iloveagent57 iloveagent57 deleted the aed/fix-retirement branch January 8, 2024 15:32
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