[SDTEST-3759] Use cached weights for CI node subsplits#58
Merged
Conversation
Member
Author
E2E Test Report: SUCCESSTested by: Shepherd Agent (autonomous QA for Datadog Test Optimization) Test Environment
Results
Evidence DetailsPlan-only command: ./bin/crook run spree -c ddtest-plan-core \
--scenario ddtest-suite-durations-spree-core-subdir \
--dep ddtest=anmarchenko/weighted-ci-node-subsplit \
--debug \
-e 'DD_TEST_OPTIMIZATION_RUNNER_TESTS_LOCATION=spec/helpers/*_spec.rb'Run-side CI-node command: ./bin/crook run spree -c ddtest-core \
--scenario ddtest-suite-durations-spree-core-subdir \
--dep ddtest=anmarchenko/weighted-ci-node-subsplit \
--debug \
-e 'DD_TEST_OPTIMIZATION_RUNNER_TESTS_LOCATION=spec/helpers/*_spec.rb' \
-e DD_TEST_OPTIMIZATION_RUNNER_MAX_PARALLELISM=2 \
-e DD_TEST_OPTIMIZATION_RUNNER_CI_NODE=1 \
-e DD_TEST_OPTIMIZATION_RUNNER_CI_NODE_WORKERS=2Key log evidence: Issues FoundNone. VerificationDatadog UI verification was not applicable because this was a local mockdog-targeted e2e run. Backend submission behavior was verified through mockdog reports and ddtest debug logs. This E2E test was performed by Shepherd - autonomous QA agent for Datadog Test Optimization. |
juan-fernandez
approved these changes
May 13, 2026
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.
What
Reuse the weighted test file distribution for CI-node worker subsplitting. Planning now stores suite duration weighting data in
.testoptimization/cache/test_suite_durations.json, andddtest runrestores it before splitting a CI node across local workers.Why
CI-node subsplitting previously used round-robin assignment, so local workers could be uneven even though the node-level split was weighted. Reusing the same weighted distribution keeps local worker assignments aligned with the existing Test Impact Analysis duration estimates.
E2E testing
ddtest planin a repo with multiple test files and suite duration data..testoptimization/cache/test_suite_durations.jsonand confirm it containstestSuiteDurations,suiteAggregates,suitesBySourceFile, andtestFileWeights.testFileWeightsincludes the expected runnable test files with positive duration-derived weights, and that existing cache fields are still present..testoptimization/tests-split/runner-*and confirm the initial node split uses the cached test file weights.ddtest run --ci-node=<node> --ci-node-workers=2for one of the generated CI nodes.