-
Notifications
You must be signed in to change notification settings - Fork 429
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(subscriptions): ensure that manually added subscriptions work correctly in all deployments #3182
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Uffizzi Preview |
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.
I think I understand this and I couldn't find any obvious problems with the code or tests so I'm approving it, but I'm just confused about how the change will rollout to our customers. Also, we'll need to add ./SAAS
to at least staging and production, right? Also, for working with things locally, we'd have to add one of the two paths to get subscription metadata outside of the free plan as well?
def test_get_subscription_metadata_for_self_hosted_open_source( | ||
organisation: Organisation, mocker: MockerFixture | ||
) -> None: | ||
""" | ||
Open source should ignore the details provided in the | ||
subscription and always return the free plan metadata. | ||
""" |
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.
So if I understand this correctly, we would want all our enterprise customers to add ./ENTERPRISE_VERSION
before merging this code into their copy, correct? Or did I misunderstand?
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3182 +/- ##
=======================================
Coverage 96.00% 96.00%
=======================================
Files 1062 1062
Lines 32200 32241 +41
=======================================
+ Hits 30914 30954 +40
- Misses 1286 1287 +1 ☔ View full report in Codecov by Sentry. |
9e325ba
to
c509219
Compare
c509219
to
61fbee9
Compare
Yep, this is done here.
Yes, that's true, but I think that's a necessary step here. If it proves to be super painful then we can revisit and see if there's a way we can work around it for local development, but obviously for testing it's super easy to mock those util functions (we may even want to create fixtures to mock them). |
Changes
This PR ensures that manually added subscriptions work in all settings. Currently it is only possible to add a subscription manually if you define the subscription_id value as "trial". This PR will mean that manually added subscriptions will not factor in the subscription id.
Another approach that I considered here was to have other, pre-defined constants that should be set as the subscription id in different scenarios.
Finally, this is a stop gap improvement until we can use license files to better handle on premise deployments.
How did you test this code?
Added / updated tests.