feat: bypass pre versioning scaleup unlimited audit and feature visibility#7497
feat: bypass pre versioning scaleup unlimited audit and feature visibility#7497Zaimwa9 wants to merge 8 commits into
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
for more information, see https://pre-commit.ci
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7497 +/- ##
==========================================
+ Coverage 98.44% 98.46% +0.01%
==========================================
Files 1399 1398 -1
Lines 52669 52666 -3
==========================================
+ Hits 51849 51856 +7
+ Misses 820 810 -10 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression16 screenshots compared. See report for details. |
|
|
||
| @property | ||
| def is_sub_before_versioning_release(self) -> bool: | ||
| return settings.VERSIONING_RELEASE_DATE is None or ( |
There was a problem hiding this comment.
Looks like this setting isn't actually populated in any of our deployments. Should it be?
There was a problem hiding this comment.
Ok then that explains everything. It depends how you see it, we could:
- Remove my new code, set the variable to a date up to which we give all previous advantages (2 weeks ago?)
- Remove the variable and keep previous advantages on versions below v4 (using the versioning you suggested below) ?
There was a problem hiding this comment.
I think (2) - I don't think the versioning release date should factor into this at all, right?
In my eyes, what we need to support is:
audit log history:
- scale-up-v2 = unlimited
- scale-up-v4+ = 14 days
version history:
- scale-up-v2+ = 14 days
| # feature history. Scale-Up v4 (and later) plans always honour the | ||
| # cache values. | ||
| is_scale_up = self.subscription_plan_family == SubscriptionPlanFamily.SCALE_UP | ||
| is_scale_up_v4 = (self.plan or "").startswith("scale-up-v4") |
There was a problem hiding this comment.
Should we also try to do something smarter here and determine the version number of the plan to do an inequality check?
e.g. something like (but better):
scale_up_plan_version = int(re.match(r"scale-up-v([0-9]+)", "scale-up-v4").groups()[0])Then we can change the conditional below to:
if is_scale_up and scale_up_plan_version < 4 and self.is_sub_before_versioning_release:Co-authored-by: Matthew Elwell <matthew.elwell@flagsmith.com>
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
scale-up-v4plans branch out of theVERSIONING_RELEASE_DATEto use the real subscription_metadata_cache related to audit log and feature historyHow did you test this code?