Skip to content

fix(wpt-consumer): log only the first 5 moved feature key migrations per job - #3002

Closed
neilv-g wants to merge 1 commit into
mainfrom
fix/wpt-consumer-log-moved-feature-once
Closed

neilv-g wants to merge 1 commit into
mainfrom
fix/wpt-consumer-log-moved-feature-once

Conversation

@neilv-g

@neilv-g neilv-g commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Why

The wpt-consumer job logs a WARNING for every test that uses a moved web-features key, for every WPT run it processes. WPT still tags 1,069 tests with masonry, which web-features has moved to grid-lanes. Each execution re-scores all ~11.1k WPT runs from the last 30 days against the same WEB_FEATURES manifest, so it logs the same 1,069 lines about 11k times: ~12M identical lines per execution and ~47M per day, in both staging and prod.

Cost

Staging Prod
Billable log ingestion (last 7 days) ~41 GiB/day ~43 GiB/day
Share of the project's logs from this warning ~99% ~99%
Cloud Logging cost (list price: $0.50/GiB after the 50 GiB/month free allotment) ~$600/month ~$635/month

That's $1,230/month ($15k/year) for one repeated warning.

Change

  • The existing log line is unchanged, but it's only emitted for the first 5 migrations in each job execution, so examples still show up as soon as processing starts.
  • One new line logs the total count of migrations when the job finishes.
  • The migration itself, the conflict error, scoring and the data written to Spanner are unchanged.

Impact

  • About 24 lines a day per environment instead of ~47M.
  • Without this warning, each project logs well under the 50 GiB/month free allotment (~8 GiB staging, 16 GiB prod), so Cloud Logging cost for these projects drops from **$1,230/month to ~$0**.
  • It also prevents the same flood the next time web-features moves a feature that WPT still uses.

Related: web-platform-tests/wpt#65511 updates the WPT metadata from masonry to grid-lanes, which removes the need for this migration entirely.

Testing

Added TestMigrateWebFeaturesToMovedFeaturesLogsFirstMigrationsOnly (7 migrations: all 7 are counted, only 5 are logged). go vet ./... and go test ./... pass for the wpt_consumer module.

…per job

The wpt-consumer job logs a WARNING for every test that uses a moved
web-features key, for every WPT run it processes. Every run is scored
against the same WEB_FEATURES manifest, so the same lines repeat thousands
of times per execution. Today WPT still tags 1,069 tests with `masonry`
(moved to `grid-lanes`), which produces ~12M identical lines per execution.

Keep the existing log line exactly as it is, but only emit it for the
first 5 migrations in a job execution, and log the total count once when
the job finishes. The migration itself, the conflict error, scoring and
the data written to Spanner are unchanged.

Testing: added TestMigrateWebFeaturesToMovedFeaturesLogsFirstMigrationsOnly.
`go vet ./...` and `go test ./...` pass for the wpt_consumer module.
@neilv-g
neilv-g force-pushed the fix/wpt-consumer-log-moved-feature-once branch from 7bf4be6 to b13c65a Compare November 20, 2026 13:52
@neilv-g neilv-g changed the title fix(wpt-consumer): log moved feature key migrations once per execution fix(wpt-consumer): log only the first 5 moved feature key migrations per job Nov 20, 2026
@neilv-g neilv-g closed this Nov 20, 2026
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.

1 participant