Skip to content

ci: fetch unit test weights from remote weights repo - #6444

Draft
TonyCTHsu wants to merge 9 commits into
masterfrom
tonyc.t.hsu/remote-ci-task-timings
Draft

TonyCTHsu wants to merge 9 commits into
masterfrom
tonyc.t.hsu/remote-ci-task-timings

Conversation

@TonyCTHsu

@TonyCTHsu TonyCTHsu commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Fetches unit-test timing weights at matrix-generation time from TonyCTHsu/dd-test-weights instead of the checked-in tasks/ci_task_timings.json, and deletes that 13k-line file. On fetch failure, tasks use the default duration estimate: deterministic matrix, green jobs, degraded balance only.

Carries the commits of #6429 and #6439; merge after those or rebase on them.

Motivation:

The manifest pollutes every diff and needs a manual refresh. In a dedicated repo, a daily workflow aggregates the timings-* artifacts that Unit Tests already uploads and commits new weights itself. New tasks get real weights on the first refresh after landing; deleted tasks drop out because the manifest is rebuilt from scratch. The single GET of the weights file is also the seam where a CI Visibility distribution API can later replace the file store.

Change log entry

Not needed: internal CI scheduling only.

Additional Notes:

WEIGHTS_URL points at a personal repo used to validate the design; move it to a tracer-team repo before merge. Validated end to end on run 37773758476 (workflow_dispatch): all 30 jobs passed, shards estimated at 441.7–446.9s, no fallback warnings.

How to test the change?

bundle exec rspec spec/tasks/github_batching_spec.rb (7 examples, includes fetch-failure path) and rake github:generate_batches for a live matrix. On this PR's Unit Tests run: job summary shows per-batch estimated seconds; logs contain no "Falling back" warning.

cgcote and others added 9 commits October 6, 2026 15:07
Matrix generation now prefers the timings published at
TonyCTHsu/dd-test-weights and falls back to the checked-in
ci_task_timings.json when the fetch fails.
Weights now live only in the dd-test-weights repository; matrix
generation fetches them at run time. When the fetch fails, tasks
fall back to the default duration estimate instead of a local file.
@TonyCTHsu TonyCTHsu added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Oct 8, 2026
@datadog-official

datadog-official Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Pipelines  Tests

❌ Errors

Your PR has failed checks. Please review the issues below and take necessary action before merging.

🚦 3 Pipeline jobs failed

Check Pull Request CI Status | all-jobs-are-green

View more details · View in GitHub Actions

Unit Tests | dd/coverage

View more details · View in GitHub Actions

Unit Tests | dd/junit

View more details · View in GitHub Actions

ℹ️ Info

No other issues found (see more)

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 94.49% (+3.84%)

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 2270955 | Docs | View more details | Give us feedback!

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

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants