fix(Segments): Improve and consolidate service for fetching overrides - #8548
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (6)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe version manager now returns published feature versions that are live or scheduled, excluding superseded live versions. Segment services use this query for v2 environments and committed change-request states for v1 environments. Serialisation, segment listing, and deletion checks now include scheduled overrides. Unit tests cover v1 and v2 scenarios. Event catalogue references were updated. Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Live and scheduled override handling remains gated to published versions, with no identified broken caller from the renamed query. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Docker builds report
|
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #20500 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #20500 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #20500 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #20501 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #20500 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-16 — run #20501 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8548 +/- ##
=======================================
Coverage 98.81% 98.81%
=======================================
Files 1620 1620
Lines 66186 66234 +48
=======================================
+ Hits 65401 65449 +48
Misses 785 785 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
khvn26
left a comment
There was a problem hiding this comment.
This looks like a significant improvement to me, and the tests are excellent 👍
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to #8412
The service
get_overrides_in_effectwas introduced as an indirect utility to gate a few use cases.In each of these gates, all introduced in #8358, the service call is wrapped by an
EXISTSclause, which hinders the problem this PR aims to solve. The motivation exists becauseget_overrides_in_effectbecomes an entrypoint to fetch, well, overrides in effect — e.g. #8525. However, we need to fix:FeatureSegmentobjects caused by theLEFT OUTER JOINproduced in the query (FVv1).This refactor achieves the above, and also attemps to improve readability and simplify the code.
As an unexpected bonus, in every traced use case, querying is faster now in both FVv1 and FVv2. 🚀
How did you test this code?
Testing and local benchmarking.