feat(experimentation): return feature object along with experiment entity#7609
Conversation
…nd use hooks to set timestamps
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Code Review
This pull request introduces nested serialization for experiments by defining ExperimentFeatureSerializer and ExperimentListSerializer to include detailed feature and multivariate option data. It also updates the viewset to use this new serializer for list and retrieve actions. The reviewer identified two critical issues: first, the nested serialization will trigger an N+1 query problem unless select_related and prefetch_related are used to optimize the queryset; second, the custom transition actions (like start, pause, and complete) should also use the new serializer to prevent the frontend from receiving inconsistent data structures.
Docker builds report
|
…ub.com:Flagsmith/flagsmith into feat/experiment-api-returns-feature-object
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 (private-cloud - depot-ubuntu-latest-arm-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-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 (oss - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (oss - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
Playwright Test Results (private-cloud - 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 #7609 +/- ##
=======================================
Coverage 98.51% 98.51%
=======================================
Files 1439 1439
Lines 54690 54727 +37
=======================================
+ Hits 53880 53917 +37
Misses 810 810 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
nameand variants needed) along the experiment entity to avoid multiple requests or frontend re-association with paginatedHow did you test this code?