Repository navigation
ci: three tiers (quick, queue, full) and a nightly full scan of develop - #2162
Merged
Merged
Conversation
The merge queue runs the queue tier: every shard under -race but the examples/ sweeps (scripts/race-shard.sh --sweeps, make test-queue), which run race-free over the construct-cover subset. The full tier (everything under -race over the whole corpus) runs on ci:full, an unclaimed path, workflow_dispatch and nightly over develop's head (full-scan.yml, skipping a head that already has one). scripts/ci-verified-tree.py accepts a queue-tier run for develop's CircleCI build-test skip and only a full-tier run (or main's build-test) for a tag. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…main's needs the full tier A tag accepts a green build-test of main as proof, so main's own skip must rest on a full-tier run; verify-tree passes CIRCLE_BRANCH as --branch. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
There was a problem hiding this comment.
Devin Review found 4 findings. Devin automatically fixed all 4 findings.
Fixed by Devin (4)
- Queue-only evidence certifies release commits — verify-tree now passes CIRCLE_BRANCH as --branch; only develop accepts a queue-tier run, main's build-test (which a tag may rely on) needs the full tier. Tests and docs updated.
- Oversized nightly workflow comment — full-scan.yml introduction cut to two lines; the dispatch-vs-workflow_call note moved to a two-line step comment.
- Oversized tier introduction comment — pr.yml tier introduction cut to two lines, separated from the existing header by a blank line.
- Oversized tier selection comment — ci-changed-areas.sh tier comment cut to two lines, separated from the existing header by a blank line.
…e queue tier Its one test walks the bundled libraries, which the construct-cover subset cannot shrink. Co-Authored-By: jason.han <hanhuijun@gmail.com>
The apijson area is true only under the full tier (nightly, ci:full, an unclaimed path, a dispatch): a writer change on a pull-request push or in the merge queue no longer runs the 18-25 minute job; a stale baseline is re-recorded through ci:rebaseline. Co-Authored-By: jason.han <hanhuijun@gmail.com>
…ow-only changes, runs on pushes as before The merge group's diff is the one the pull request's push already ran it over, and a pr.yml-only change cannot move the baseline; the full tier (nightly, ci:full) reproduces it, a stale one is re-recorded through ci:rebaseline. Co-Authored-By: jason.han <hanhuijun@gmail.com>
6 tasks done
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 and why
CI runs in three tiers now, so the merge queue stops paying for the race detector over the
examples/sweeps and the whole corpus on every landing, while the full scan keeps a home on a schedule and on release. PR 3 of the three-PR plan ("Load once, check many" and the construct-cover subset are the sibling PRs).examples/sweeps walkGo tests (…)merge_groupOPENSYSML_CORPUS_SUBSET=construct-cover)Go queue tests (…)ci:full, an unclaimed path,workflow_dispatchofpr.yml, the nightly full scanGo race tests (…)scripts/race-shard.sh --sweepsprints the shards that hold theexamples/sweeps, one per line:export-corpus export-settled export-examples corpus-roundtrip corpus-apijson.make test-queue SHARDS=…(new) andpr.ymlread that list; nothing hard-codes it.export-libraryis not a sweep shard: its one test (TestLibraryFilesComeBackFromTheGraphAlone) walks the bundled libraries, notexamples/, so the subset cannot shrink it and dropping-racewould only lose coverage (the brief listed it; the test says otherwise).grpcandtranslateare not sweep shards either:tests/grpc's element-properties agreement shares its shard withinternal/frontend/grpc(a concurrent server) andinternal/translate/export's symbol-structure sweep shares its package with the writers, so both keep-racein the queue tier rather than dropping the race detector from race-prone tests. Splitting those two sweeps into shards of their own is PR 1's natural move once the sweeps are consolidated; they then join--sweeps.scripts/ci-changed-areas.shdecides the tier from the event (CI_EVENT), the label (CI_FULL_LABEL) and the paths;CI_TIER=quick|queue|fullforces it (a dispatch'stierinput). A merge-group commit is always queue, including over an unclaimed path (the pull request already ran full on that push).pr.ymlgainsworkflow_dispatch(inputtier, default full; the ref is the dispatched ref, so theBuild and testcheck lands on the commit tested)..github/workflows/full-scan.ymlruns at 12:07 UTC — the hour with the fewestpr.ymlruns in the last week (12, against 50–57 at the busy hours) — checks out develop, asksscripts/ci-verified-tree.py --sha <head> --full-tier, and dispatchespr.yml --ref develop -f tier=fullonly when the head has no full-tier run yet. It dispatches rather thanworkflow_calls: a called workflow's check runs take the caller's job name, and verify-tree looks forBuild and testandGo race tests (…)by name.scripts/ci-verified-tree.py: a develop push (CircleCIbuild-test,--branch developfromCIRCLE_BRANCH) accepts a queue-tier or full-tier GitHub run; a main push (--branch main) accepts only a full-tier run, since a tag may rely on main's build-test;--tagaccepts only a full-tier run or a green CircleCIbuild-testofmain;--full-tier(the nightly's question) accepts only a full-tier run. The docstring says which caller accepts which and why. CircleCI'sgo-race-test,go-coverageand the release workflow are untouched: no subset, no dropped-race, so a push tomainand an unverified tag still run everything.apijson-differentialjob (Derived-property differential reproduces its baseline, 18–25 min) skips the queue tier — the merge group's diff is the one the PR push already ran it over — and.github/workflows/pr.ymlleavesapijson_pattern, so a workflow-only PR no longer runs the 20-minute job for nothing (ci(pr): every pull-request push runs the quick tier; the -race suite runs in the merge queue #2154 and this PR did). It still runs on a PR push whose diff can move the baseline and under the full tier (nightly,ci:full, unclaimed path, dispatch); a stale baseline on develop is re-recorded throughci:rebaseline(.github/workflows/rebaseline.yml). Test cases: writer change on a PR push →apijson, same diff undermerge_group→ none, underci:full/schedule/workflow_dispatch→apijson; pr.yml-only PR push → none.tests/hygiene: the merge-group workflow tests follow the new shape (CI_EVENT/CI_FULL_LABEL/CI_TIER, the threemaketargets per tier, thepull_request-keyed concurrency group); new tests hold--sweepsto by-test-name race shards andmake test-queueto reading it,pr.yml's dispatch input,full-scan.yml's dispatch, and the job-name prefixesci-verified-tree.pyreads.Shared contract notes. Unchanged:
OPENSYSML_CORPUS_SUBSET(unset = whole corpus),tests/corpus/testdata/construct_cover.txt,scripts/race-shard.sh --sweeps. One detail for PR 2:pr.ymlsetsOPENSYSML_CORPUS_SUBSETto the empty string on the two static-job gate steps outside the queue tier (a YAMLenvkey cannot be omitted conditionally), so the tests must treat an empty value as unset. Until PR 2 lands the variable is ignored, so the queue tier is safe to ship first; until PR 1 lands--sweepsprints today's shard names.How it was verified
Measured from the GitHub API (job minutes = sum of non-skipped job durations):
merge_group/ fullmerge_group/ fullpull_request/ quickThe five sweep shards cost 96 job-minutes under
-racein both full runs (export-corpus34,export-settled20–21,corpus-apijson16–20,export-examples12,corpus-roundtrip11–14). Race-free over the whole corpus the same tests took ~15 job-minutes in the quick run (grouped, including setup), so five separate race-free jobs are ~20–25 job-minutes before PR 2 and ~16 once the subset (89 of 920 files) cuts the test time to setup cost. The static job's two round-trip gates drop ~4 more minutes under the subset. Queue tier estimate: ~315–335 job-minutes (–20% to –23%) per landing; the longest job is unchanged (rest, 24–34 min, thengraph23–26), so wall time on an idle pool stays ~35 min and the saving shows as less contention for the 20 slots. The full tier's job-minutes and wall are unchanged; it now runs once a night on develop plus onci:full, instead of on every landing.Gates run on this head:
scripts/ci-changed-areas-test.sh— all cases, with the new ones (including theapijson-per-tier cases above):pull_request→ quick,pull_request+ci:full→ full,merge_group→ queue (also over an unclaimed path),schedule→ full,workflow_dispatch→ full, unclaimed → full on a pull request, forcedCI_TIER=queue.python3 scripts/ci-verified-tree-test.py— 20 tests (queue-tier run verifies--branch develop, not--branch main, not a tag, not--full-tier; a full-tier run beside a queue one verifies each).go test -count=1 ./tests/hygiene— green, including the updated merge-group tests and the newTestSweepShardsAreByNameRaceShards,TestPRWorkflowAcceptsADispatchedTier,TestFullScanDispatchesTheFullTierOnAnUnprovenHead,TestVerifiedTreeReadsTheGoTestJobNames.make test-quick SHARDS=graph— ok (395 s);make test-queue SHARDS=corpus-roundtrip— takes the sweep branch (Running Go tests, shard corpus-roundtrip over the construct-cover corpus subset…, no-race), ok;make -n test-queue SHARDS="export-corpus graph"showsgraphtaking the-racebranch.scripts/race-shard.sh --sweeps,scripts/race-shard.sh graph, the usage line;GH_TOKEN=… python3 scripts/ci-verified-tree.py --sha <develop head>with and without--full-tier/--tagagainst the live API (develop's head readsverified … (full tier)from today's merge-queue run).actionlintonpr.yml(only the two pre-existing shellcheck notes) andfull-scan.yml(clean);gofmt -l,go vet ./tests/hygiene,python3 scripts/changelog.py check,python3 scripts/check-doc-links.py,python3 scripts/check-doc-ids.py.Not exercised here: a real
merge_grouprun under the new tier and the first scheduled dispatch; both are the merge of this PR and the following night.Checklist
make testandmake lintpass locally (the shards and gates above; no Go production code changes)changes/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (none moved)F4,K5) in the body, docs, or changelog🟢 Devin Review found nothing to fix · View findings · Follow Devin's work