refactor(Versioning): Publish a feature version with an AuthorData - #8310
refactor(Versioning): Publish a feature version with an AuthorData#8310khvn26 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (22)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe change introduces Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This change standardizes feature-version publisher attribution and fixes missing attribution for master API key publishing; no actionable merge-blocking risk remains beyond normal checks and review. 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 #19460 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
🗂️ Previous results✅ private-cloud · depot-ubuntu-latest-16 — run #19460 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19460 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19460 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19450 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19450 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ oss · depot-ubuntu-latest-arm-16 — run #19450 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-arm-16)Details
✅ oss · depot-ubuntu-latest-16 — run #19450 (attempt 1)Playwright Test Results (oss - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19447 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19447 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
✅ private-cloud · depot-ubuntu-latest-16 — run #19446 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-16)Details
✅ private-cloud · depot-ubuntu-latest-arm-16 — run #19446 (attempt 1)Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-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 #8310 +/- ##
==========================================
- Coverage 98.78% 98.64% -0.14%
==========================================
Files 1605 1606 +1
Lines 64417 64434 +17
==========================================
- Hits 63633 63560 -73
- Misses 784 874 +90 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
6b7b050 to
12ffc67
Compare
49778de to
574087f
Compare
574087f to
10650cb
Compare
10650cb to
3e25f55
Compare
3e25f55 to
187c818
Compare
187c818 to
e831228
Compare
docs/if required so people know about the feature.Changes
Stacked on #8308.
In this PR, we accommodate
EnvironmentFeatureVersion.publish()to theAuthorDatadataclass.EnvironmentFeatureVersion.publish()tookpublished_byandpublished_by_api_key, so every caller had to categorise a request user. That split was written four ways across the codebase, and one of them was wrong:EnvironmentFeatureVersionCreateSerializeronly handledFFAdminUser, so a version created withpublish_immediatelyby a master API key recorded no publisher at all. Fixed here, with a test.publish()now takes anAuthorData, which callers construct directly, or viaAuthorData.from_request(request)where a request is available.We also drop a dead
serializer.save(published_by=request.user)kwarg inEnvironmentFeatureVersionViewSet.publish— the serializer reads the author from the request context and ignored it.No behaviour change beyond the attribution fix.
How did you test this code?
Added unit tests, and modified existing tests asserting
EnvironmentFeatureVersion.publish().