Repository navigation
ci(ordering): shard the project ordering leg and cache the tier guard's workflow parse (#2254) - #2258
Merged
Merged
Conversation
…'s workflow parse (#2254) Problem: the `Plain unittest ordering (project)` run step reached a p90 of 11.8 of its 20 minutes and was on course to hit the cap in about a week; `project-tests` runs the same leg on a docs-only diff under a 15-minute cap; and tests.test_tier_guard's WorkflowAgreementTests reran the same two tier selectors in a fresh interpreter seven times, about 7 s each. Fix: - B: util/run_unittest_leg.py takes --half 1|2, cut at the one name SHARD_BOUNDARIES holds for tests/project (test_q); the unittest-ordering matrix runs `project (half 1)` and `project (half 2)`, and project-tests runs its docs-only unittest step as two steps, one per half, in the same job. --before/--from cut at any other name by hand. - C: the tier guard's python stub replays a `-c` selector's output from a per-class cache once it has run it for real; a doctored step that asks something else, or a failing run, is not served from it. - Consolidation: no clear duplicate found; nothing removed. Tests: test_unittest_ordering_shards checks the cells and the project-tests steps cut at one boundary and cover the leg once; test_project_pins_once_1954 and test_unit_tests_queue read the new cells and steps; a new PythonStubTests case pins the cache. Workflow readers, tier guard and docstring contract: 1043 passed. actionlint clean.
Owner
Author
|
Review: GOOD TO GO at
|
JarryShaw
force-pushed
the
ci/2254-shard-project-ordering
branch
from
October 26, 2026 15:58
2eaef1f to
952d434
Compare
Contributor
|
Coverage: 91.56% (unit tier, Python 3.15,
Per-file detail: the |
Owner
Author
|
Ready to merge at
|
This was referenced Oct 26, 2026
Closed
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.
make testpasses, and a test case covers the changeWhat is the purpose of your pull request?
ci— CI configurationDescription
Closes #2254, per the ruling: B plus C, and a review for duplicated tests.
util/run_unittest_leg.pyholdsSHARD_BOUNDARIES = {'project': 'test_q'}and takes--half 1|2.unittest-ordering'sprojectcell becomesproject (half 1)andproject (half 2).project-testssplits its one step into two, in the same job, at the same boundary. Its leg ran near its 15-minute cap.test_unittest_ordering_shards.pychecks that both sites cut at the one boundary, that the halves are disjoint and cover the unsharded leg, and that a new module lands in exactly one half.project-testsjob keeps its id and name, andunittest-orderingis not required.util/ci_timing.pykeys on no renamed step.WorkflowAgreementTestslaunched a fresh interpreter per selector call, asking the same selectors repeatedly. The test stub now replays a selector's output from a per-class cache. A different selector, or a failed run, still runs for real. No assertion changes. Locally it drops from 55.6 s to 21.8 s.tests/projectand the tier guard finds no true duplicate. Shared bodies read different inputs. Nothing is removed.no attribute 'SHARD_BOUNDARIES',no step named 'Run the first half of …').tests/projectmodules plus the root guards give 1043 passed.actionlintis clean.