{{ message }}
feat(worker-manager): time-range filtering for worker pool error stats#8757
Open
nitishagar wants to merge 4 commits into
Open
feat(worker-manager): time-range filtering for worker pool error stats#8757nitishagar wants to merge 4 commits into
nitishagar wants to merge 4 commits into
Conversation
Member
Contributor
Author
…askcluster#8695) Add optional `from` and `to` ISO-8601 query parameters to the `workerPoolErrorStats` API endpoint. Parameterized DB functions (get_worker_pool_error_stats_hourly, _daily, and *_2 breakdown variants) replace the hardcoded-interval functions with NULL-default backwards compatibility. The UI errors page gains two DatePicker controls to select the range; the "Last 7 days"/"Last 24 hours" labels update when a custom range is active. Old functions are deprecated per the 2-major-version rule. Hourly breakdown is omitted for ranges > 31 days to bound response size. Fixes taskcluster#8695
Run `yarn generate` after adding `from` and `to` query parameters to the workerPoolErrorStats API endpoint. Updates all generated client libraries (JS, Python, Rust, Go, Shell) and generated/references.json.
…config error fn `get_worker_pool_error_launch_configs` was deprecated in db/versions/0127.yml in favour of the parameterised `get_worker_pool_error_launch_configs_2`. Update the provisioner to call the new function with an explicit from/to window (last hour / no upper bound) to match the prior behaviour.
c1bc72a to
013bc73
Compare
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.

Summary
fromandtoISO-8601 query parameters to theworkerPoolErrorStatsAPI so callers can query error statistics over an arbitrary time window (defaults preserve the existing last-24-hours / last-7-days behavior)get_worker_pool_error_stats_hourly,get_worker_pool_error_stats_daily, and_2variants of all breakdown functions) replace the hardcoded-interval originals with NULL-default backwards compatibility; old functions deprecated per the 2-major-version ruleDatePickercontrols (From / To) above the summary charts; "Last 7 days" / "Last 24 hours" labels update to "Selected range (daily/hourly)" when a custom range is active; a "Clear range" button resets to defaultshourly: {}) when the custom range exceeds 31 days to bound response sizeDesign decisions
from/toto the stats endpoint (not the paginated errors list — that's a possible follow-up)totalremains the sum over the daily series regardless of the rangeyarn generatepartially succeeded locally (db/fns.md, db-schema.json, @types/fns.d.ts updated);generated/references.jsonand client libraries will be regenerated cleanly in CI (web-server reference generation requires@as-integrations/express4which is not installed in this dev environment)UI note
The UI change was verified by code inspection and biome lint. The dev server couldn't be started in this environment (CI will verify rendering). The
DatePickercomponent is the existing reusableui/src/components/DatePicker/index.jsx.Test plan
cd db && yarn test(worker_manager fns tests) — 75 passingcd ui && biome check src— 345 files, no errorscd ui && jest --no-coverage— pre-existingAuthConsentsnapshot failure only (unrelated to this PR)cd services/worker-manager && yarn test— blocked by pre-existing p-queue v6/v9 mismatch in dev node_modules; CI will validatecd services/web-server && yarn test— blocked by same environment issueyarn generatefull clean run — requires go ≥ 1.26.4 and@as-integrations/express4; CI will run itFollow-up
Filtering the paginated errors list endpoint (
listWorkerPoolErrors) by time range was explicitly out of scope per lotas's direction. It can be tracked as a follow-up.Fixes #8695