backfill(ads): cancel ads_client_operations_and_errors_hourly_v1 backfill - #9834
backfill(ads): cancel ads_client_operations_and_errors_hourly_v1 backfill#9834Almaju wants to merge 2 commits into
Conversation
…fill
The 2026-08-24 entry cannot run. `bqetl query backfill` only parses
{{ds}} for DATE parameters, and this table's hourly schedule binds
submission_date off execution_date, so every date raises "Unable to
parse parameter". Behind that, date_partition_parameter is null, so
each date would overwrite the whole staging table and `backfill
complete` would fail on a null partition.
The only supported route is reinitialize_table, which rebuilds every
partition from the _stable tables (mobile back to 2026-02-01). That
scan is not worth it for a table still in development, so cancel the
entry: 2026-08-07 to 2026-08-23 stays empty for desktop and the
scheduled runs cover everything from here on.
Cancelling also clears the Initiate entry before it trips
validate_old_entry_date (28 days), which would fail the repo-wide
Validate Backfills job.
There was a problem hiding this comment.
This PR flips the 2026-08-24 entry in ads_derived/ads_client_operations_and_errors_hourly_v1/backfill.yaml from Initiate to Cancelled and rewrites the entry's reason to record why; no other files change.
I checked the change against the tooling rather than only the description: Cancelled is a valid BackfillStatus, the entry still passes every check in validate_entries (entries stay sorted, the 2026-04-01 Complete entry is untouched, no remaining Initiate entry), and the requoted reason stays under the 160-char line-length limit in .yamllint.yaml. The stated blockers line up with metadata.yaml: date_partition_parameter: null plus a submission_date parameter templated off execution_date, which _parse_parameter in bigquery_etl/cli/query.py:488 rejects for DATE params, so the day-by-day path can't run and backfill complete would hit the null-partition check. Leaving the staging table to expire instead of deleting it matches docs/cookbooks/backfilling_a_table.md:432. The one documented alternative to reinitialize_table for a null date_partition_parameter (custom_query_path + override_depends_on_past_null_partition: true) would still fail on the same templated parameter, so the recorded rationale holds.
One checklist item: the PR references bug 2058567, so per .github/reviewer_checklist.md the bug number belongs in the PR title.
| reason: 'Backfill desktop''s ads_client history now that Firefox desktop is a source | ||
| (bug 2058567). Cancelled: this table cannot be replayed day-by-day - the hourly | ||
| schedule binds submission_date off execution_date, which `bqetl query backfill` | ||
| cannot parse, and date_partition_parameter is null, so `backfill complete` would | ||
| fail on a null partition. The only supported route is reinitialize_table, which | ||
| rebuilds every partition from the _stable tables (including mobile from 2026-02-01), | ||
| and that is not worth the scan while the table is still in development. Desktop | ||
| data flows in from the scheduled runs; 2026-08-07 to 2026-08-23 is intentionally | ||
| left empty.' |
There was a problem hiding this comment.
suggestion: The permanent desktop gap (2026-08-07–2026-08-23) is recorded only in a cancelled backfill.yaml entry, which isn't surfaced anywhere a consumer of the table looks. Anyone charting surface/desktop volumes over August will read the empty window as a real drop. Add a line to description in metadata.yaml (it propagates to the BigQuery table description and the data catalog), e.g. "Desktop rows are absent for 2026-08-07 through 2026-08-23; the backfill for that window was cancelled (bug 2058567)."
This comment has been minimized.
This comment has been minimized.
…escription The cancelled backfill.yaml entry isn't visible to anyone reading the table itself (Looker, Redash, Data Catalog), so an empty surface = 'Desktop' window in August reads as a real drop rather than a known, deliberate gap. metadata.yaml's description is written to the table's BigQuery description on deploy, so note it there. Scoped to the fact this PR is responsible for (the cancelled-backfill gap) rather than asserting current freshness, which is a separate, moving concern.
Integration report
|
Description
Cancels the
2026-08-24managed backfill entry forads_derived.ads_client_operations_and_errors_hourly_v1(status: Initiate→Cancelled) and records why in the entry'sreason. Onlybackfill.yamlchanges.Why cancel instead of fix
The backfill failed with
ValueError: Unable to parse parameter submission_date:DATE:{{ (execution_date - macros.timedelta(hours=1)).strftime('%Y-%m-%d') }}. Three independent reasons it can't run as configured:_parse_parameterinbigquery_etl/cli/query.pyonly accepts{{ds}}for DATE parameters. This table's hourly schedule bindssubmission_dateoffexecution_date, so every date in the range raises, including the dry run.metadata.yamlhasdate_partition_parameter: null, soget_backfill_partitionreturnsNone— no$YYYYMMDDdecorator. Each date would runbq query --replaceagainst the whole staging table (16 in parallel), leaving one date's data.backfill completewould then raiseNull partition found completing backfill(bigquery_etl/cli/backfill.py:1469).The only supported route to the data would be
reinitialize_table: true, which rebuilds every partition from the_stabletables — mobile back to 2026-02-01 — to recover ~2.5 weeks of thin desktop rows. Not worth it for a table still in development, so cancelling and accepting the gap:2026-08-07–2026-08-23stays empty for desktop, and the scheduled runs cover everything from here on.There's also a deadline: CI runs
bqetl backfill validateover everybackfill.yamlon any SQL-touching PR, andvalidate_old_entry_dateraises for anInitiateentry older than 28 days. From 2026-09-22 that job would fail repo-wide until this entry stops beingInitiate.What this does NOT do
moz-fx-data-shared-prod.backfills_staging_derived.ads_derived__ads_client_operations_and_errors_hourly_v1_2026_08_24— perdocs/cookbooks/backfilling_a_table.md, a cancelled backfill's staging table is left to expire on its own (~30 days), not manually deleted. The Slack alert's delete instruction is for retrying, not cancelling.Complete— nothing was staged, so there's nothing to swap into production.metadata.yaml,query.sql, orschema.yaml.Known follow-up (out of scope here)
The table is still unbackfillable. Fixing it means changing
metadata.yamlscheduling: drop the templatedparametersanddestination_table, and letdate_partition_parameterdefault tosubmission_date— the DAG generator then emitsparameters=["submission_date:DATE:{{ds}}"]and lets the operator append$ds_nodash, so the bound date and destination partition always agree, including the hour-0 run. Side effect: a day's final recompute moves from 01:00 to 00:00 the next day, one hour less grace for late-arriving pings. Three other hourly tables (onboarding_hourly_v2,newtab_interactions_hourly_v1,newtab_content_reported_content_v1) have the same defect, so a framework fix to_parse_parametermay be preferred instead. Owner's call, separate PR.Verification
bqetl backfill validate moz-fx-data-shared-prod.ads_derived.ads_client_operations_and_errors_hourly_v1passes.2026-08-24isCancelled,2026-04-01is untouched atComplete, and noInitiateentry remains for this table.Related Tickets & Documents
Reviewer, please follow this checklist