feat(experimentation): accept inline metrics on experiment creation#7770
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. 3 Skipped Deployments
|
Docker builds report
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7770 +/- ##
=======================================
Coverage 98.56% 98.57%
=======================================
Files 1460 1460
Lines 56361 56443 +82
=======================================
+ Hits 55554 55636 +82
Misses 807 807 ☔ View full report in Codecov by Harness. 🚀 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 (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 (oss - depot-ubuntu-latest-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 (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 (private-cloud - depot-ubuntu-latest-16)Details
Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)Details
|
Visual Regression19 screenshots compared. See report for details. |
…iment-inline-metrics-api # Conflicts: # api/experimentation/serializers.py # api/tests/unit/experimentation/test_experiment_views.py
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces inline creation and validation of metrics within experiments, and adds an option to exclude event stats when listing warehouse connections. Feedback suggests scoping the Metric queryset in the serializer to the current environment to avoid performance issues, and making the 'exclude_event_stats' query parameter check case-insensitive for improved robustness.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
POST /environments/{env_key}/experiments/now accepts an optionalmetrics: [{"metric": <id>, "expected_direction": <choice>}]list, so an experimentand its metrics are created in a single transaction.
environment, duplicates are rejected, and
metricsis rejected onPATCH.metrics(read-only),prefetched to avoid N+1 queries.
How did you test this code?