Repository navigation
fix(ci): count the task files a role's task file includes when dealing unit shards - #215
Merged
Merged
Conversation
…g unit shards The dealer counted only the tasks of the task file an include named, so a test that ran colima_size.yml or start_servers.yml was charged for those files alone and not for the turn, guard and readiness files they include. Task files now count what they include by a literal name, found beside them or in the role's tasks directory; a role included with no task file counts main.yml, as Ansible runs it; and an include looping over literal task file names counts each of them.
Mearman
marked this pull request as ready for review
November 4, 2026 07:23
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
🎉 This PR is included in version 2.36.1 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
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.
The unit shard dealer (
scripts/ci/shard_unit_tests.py) counted a playbook's include of a role task file as that file's own tasks only. The task files a test reaches throughcolima_size.yml,start_servers.ymland similar entry points (the turn, the quorum guard, the readiness wait) were never counted, so the modules that test them were dealt as light and piled into one shard: on #214's run the heaviest unit shard took 1.74 times the mean shard's job time and came close to the job's timeout.A task file now counts what it includes by a literal name, looked for beside it and then in its role's tasks directory, recursively and counted once on a cycle. A role included with no
tasks_fromcountsmain.ymland what it includes, which is what Ansible runs, instead of every file of the role. An include whosetasks_fromis{{ item }}over a literal loop list counts each file named.Observed on this PR's own CI run against #214's (same runners, same tests): the heaviest unit shard's job time fell from 1.74 to 1.19 times the mean. What is left is mostly tests that wait out a readiness or command timeout on purpose (
test_server_recreate,test_runtime_autostart), which no count of tasks or processes sees.The test for playbook launches now covers a nested include, a looped
tasks_fromand themain.ymlrule; with includes inside task files left unfollowed, it fails.