-
Notifications
You must be signed in to change notification settings - Fork 411
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: audit and version limits for existing subscriptions #4780
Merged
matthewelwell
merged 4 commits into
main
from
fix/audit-and-version-limits-for-existing-subscriptions
Oct 29, 2024
Merged
fix: audit and version limits for existing subscriptions #4780
matthewelwell
merged 4 commits into
main
from
fix/audit-and-version-limits-for-existing-subscriptions
Oct 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
Docker builds report
|
Uffizzi Preview |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4780 +/- ##
=======================================
Coverage 97.30% 97.30%
=======================================
Files 1174 1175 +1
Lines 40846 40903 +57
=======================================
+ Hits 39744 39801 +57
Misses 1102 1102 ☔ View full report in Codecov by Sentry. |
zachaysan
approved these changes
Oct 29, 2024
matthewelwell
deleted the
fix/audit-and-version-limits-for-existing-subscriptions
branch
October 29, 2024 13:13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changes
After releasing #4433, I found an issue in testing where existing enterprise organisations are unable to view the audit log history.
This could have been solved in a number of ways:
I settled on writing a migration to handle it as it seemed the best solution. The reason I didn't do this for scale up plans, however, is that the scale up plans in chargebee have the values set for new subscriptions, which will overwrite the existing cache information every time a webhook is triggered related to a given subscription.
Unfortunately, this will mean that the data in the database for any scale up subscriptions before the
VERSIONING_RELEASE_DATE
will not match the actual behaviour for a given organisation, however, the alternative is creating a new scale up plan in chargebee with the new limits, etc. which seemed like more work than just coding around it.How did you test this code?
Wrote a comprehensive migration test.