feat(experimentation): refresh experiment exposures via task processor#7751
Closed
gagantrivedi wants to merge 3 commits into
Closed
feat(experimentation): refresh experiment exposures via task processor#7751gagantrivedi wants to merge 3 commits into
gagantrivedi wants to merge 3 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feat/experiment-exposure-snapshots #7751 +/- ##
===================================================================
Coverage 98.55% 98.55%
===================================================================
Files 1454 1453 -1
Lines 55987 56086 +99
===================================================================
+ Hits 55177 55276 +99
Misses 810 810 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
|
Superseded: the task-processor approach is cut in favour of an explicit refresh endpoint, landing with the GET endpoint in the next PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs/if required so people know about the feature. (deferred — flag-gated and not user-visible yet; docs land with the UI. Events catalogue regenerated here.)Changes
Contributes to the experimentation results layer (v0.1: experiment exposures panel). Second backend slice, stacked on #7740 — the API endpoint and UI follow.
compute_experiment_exposures(experiment_id)— computes the full-window exposures summary and stores it viarecord_refresh. Window isstarted_at→ended_at or now, so a completed experiment's final refresh is frozen at its end. Warehouse errors are absorbed intorecord_failure(the last good payload survives; nothing raises into the task processor). Never-started experiments are skipped.refresh_running_experiment_exposures— recurring sweep everyEXPERIMENTATION_EXPOSURES_REFRESH_MINUTES(new setting, default 60) enqueueing one compute per RUNNING experiment; no-op whenEXPERIMENTATION_CLICKHOUSE_URLis unset. No staleness filter: the sweep cadence is the refresh interval, and anas_of-older-than-interval check would skip every other sweep (task latency keepsas_ofslightly younger than the interval).transition_experiment_status, making the stored row the durable record once events pass the 90-day ClickHouse TTL.experimentation.exposures.computed/exposures.compute_failed; events catalogue regenerated.How did you test this code?
as_of, completed-experiment frozen window, failure preserves last good payload, never-started skip, log events asserted), sweep (enqueues running experiments only; skips without a warehouse DSN), complete action enqueues the final refresh / start does not.pytest tests/unit/experimentation/— 257 passed;ruff+mypystrict clean.