Duration weights for dd-trace-rb unit test batch scheduling. Kept out of the tracer repo so the generated data does not pollute its diffs, and so the refresh can run on a schedule instead of relying on a manual commit.
dd-trace-rb Unit Tests run this repo dd-trace-rb
uploads timings-* cron job downloads artifacts, matrix generation
artifacts on master aggregates medians, commits fetches ci_task_timings.json
ci_task_timings.json from raw.githubusercontent.com
Automated by .github/workflows/update-weights.yml (daily cron, or manual
via workflow_dispatch). The job:
- Lists recent successful
Unit Testsruns onDataDog/dd-trace-rb@master. - Downloads their
timings-*artifacts (requiresPAT_TOKENsecret, see below). - Runs dd-trace-rb's own
github:update_task_timingsrake task from a checkout ofDataDog/dd-trace-rb(no code is duplicated here). - Commits the new
ci_task_timings.jsonif it changed.
New test tasks run on fallback estimates in dd-trace-rb until the next refresh records real durations. Deleted tasks leave stale entries; they are looked up by key, so they are harmless bloat.
PAT_TOKEN: a GitHub token that can read workflow artifacts from the public
DataDog/dd-trace-rb repository (a classic PAT with repo scope works; the
repo is public so no write access is needed).
dd-trace-rb fetches ci_task_timings.json from this repo's default branch
at matrix-generation time. Consumers must tolerate a fetch failure and fall
back to their own estimate defaults; CI must not break if this repo is
unavailable or stale.
This file-based store is a stand-in for a service. When Datadog CI Visibility or Test Optimization ships a distribution API, replace the fetch URL on the consumer side and retire this repo. The interface is deliberately one GET request.
Owner: tony.hsu. If the cron job stops running, weights silently go stale;
check the latest commit date on ci_task_timings.json before debugging
batch balance.