Skip to content

feat(nimbus): Run population sizing hourly - #9933

Open
yashikakhurana wants to merge 2 commits into
mainfrom
EXP-7366-population-estimates-hourly
Open

yashikakhurana wants to merge 2 commits into
mainfrom
EXP-7366-population-estimates-hourly

Conversation

@yashikakhurana

@yashikakhurana yashikakhurana commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Moves experiment_population_estimates_v1 onto a new bqetl_experiments_hourly DAG, so a newly created or edited Draft experiment gets an estimate within the hour instead of waiting up to a day.

The client pools stay daily — they cover a 7-day rolling window, so rebuilding them hourly would be pure cost. They are dropped from referenced_tables because a cross-DAG wait on a daily task only clears once a day and would defeat the hourly schedule.

Cost should stay flat: the job exits before querying when nothing has needsUpdate set, which is most hours, and build_query batches all of an app's experiments into one COUNTIF, so a run is at most 3 queries.

Needs mozilla/experimenter#17485 to land first — without it, experiments whose estimate comes back unchanged stay flagged and get re-queried every run.

Jira: EXP-7366

Moves experiment_population_estimates_v1 to a new bqetl_experiments_hourly
DAG so a newly created or edited Draft experiment gets an eligible-client
estimate within the hour rather than waiting for the next daily run.

The client pools stay on bqetl_experiments_daily. They cover a 7-day rolling
window so they do not need rebuilding hourly, and they are dropped from
referenced_tables because a cross-DAG wait on a daily task would only clear
once a day and defeat the hourly schedule.

Most runs are a no-op: when nothing has changed since its last sizing,
needsUpdate is false everywhere and the job exits before issuing a query.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds a bqetl_experiments_hourly DAG and moves experiment_population_estimates_v1 onto it. It also drops the referenced_tables on the daily-built nimbus_sizing_clients_v1 pools, so the hourly run doesn't wait on a cross-DAG sensor. The DAG config and the decision to drop the dependency look reasonable. The main problem is that query.py writes with WRITE_TRUNCATE, and at hourly cadence each run wipes the estimates earlier runs wrote that day. Details are inline.

Each run only sizes the experiments flagged needsUpdate at that moment, so
at hourly cadence WRITE_TRUNCATE on the day partition would drop estimates
written by earlier runs the same day. Every row carries computed_at, so
consumers take the latest row per slug.

Also updates two docstrings that still described the client pools as being
populated earlier in the same DAG run.
@scholtzan

Copy link
Copy Markdown
Contributor

Integration report

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants