Skip to content

CI: run Linux x86-64 on every pull request and the full platform matrix on main, nightly and with the label ci:full - #443

Merged
tae898 merged 3 commits into
mainfrom
ci/442-tiered-pr-matrix
Nov 22, 2026
Merged

tae898 merged 3 commits into
mainfrom
ci/442-tiered-pr-matrix

Conversation

@tae898

@tae898 tae898 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

It makes pull-request CI faster with two tiers. A pull request now runs the fast tier: Linux x86-64 only and no example job, so it no longer waits for the macOS, Windows and arm64 runners or for the examples. The full platform matrix and the examples still run where they protect a release: on a push to main, in the nightly run, on a manual run, for a release, and on a pull request that carries the label ci:full.

Wall time of a pull request

Version Jobs that ran Wall time, min
Before: median of the sampled pushes 42 70.9
First version of #443 (Linux x86-64 only, with the examples), 794acd8 21 31.8
Final version (no example leg on a pull request), f83a5db 20 17.2
Final version when the pull request changes the examples (both example legs run), c420873 23 25.1

The counts include the Docs job, because this pull request changes a docs page.

The target was about 15 minutes. The run without example legs took 17.2 minutes. What is left is the part to keep on every pull request: the native wheel built from the pull request and the parity suite against it. The two jobs run one after the other, and neither can be dropped or started earlier. All three runs of #443 have this chain:

Run Image and wheel, min of which the native image build, s Parity, min of which the parity suite, s Parity done after, min
794acd8 11.4 654 9.2 537 20.8
f83a5db 8.8 496 7.9 465 17.0
c420873 6.9 385 6.8 392 13.9

So the wait of a pull request is this chain: between 13.9 and 20.8 minutes in these 3 runs, 1 of them under 15 minutes. The three commits build the same native sources, so the spread is the runner: the native image build took between 385 and 654 s and the parity suite between 392 and 537 s. About 15 minutes is reached on a fast runner and missed on a slow one, and I stop here, because the next step is not to build the image for every pull request (see below), which is a decision and not a cheap fix. The two steps are close in size: the image build was the longer one in 2 of the 3 runs. The arcadedb-jvm side was done after 9.4 minutes (Test Summary), so a pull request that changes no native path waits about that long.

Jobs of a ready pull request, counted from the leg planners:

Workflow Jobs today Jobs in the fast tier Jobs with ci:full
test-jvm.yml 18 7 18
test-python-examples.yml 10 2 22
test-native.yml (when a native path changed) 11 7 27
pre-commit.yml, dependency-review.yml, gitignore-hygiene.yml 3 3 3
Total 42 19 70
Total when no native path changed 31 12 43

What a pull request ran before and what it runs now:

Before Now (fast tier)
Static checks pre-commit, Bandit, dependency audits, dependency review, gitignore hygiene the same
arcadedb-jvm tests 4 wheel builds, 10 legs: Linux x86-64 on four Pythons, Linux arm64, macOS and Windows on 3.11 and 3.14 1 wheel build, 2 legs: Linux x86-64 on 3.11 and 3.14
arcadedb-jvm examples 4 wheel builds, 4 legs: every platform on 3.14 none; Linux x86-64 on 3.14 when the pull request changes the examples
arcadedb native (when a native path changed) Linux x86-64: image and wheel, parity on 3.12, the short pyver subset on five other Pythons, examples on 3.12 Linux x86-64: image and wheel, parity on 3.12, the pyver subset on 3.11 and 3.14; examples on 3.12 only when the pull request changes them

Nothing changes for a push to main, the nightly run (03:00 to 04:00 UTC), a manual run and a release. The release workflows are not touched, and no test inside a leg is skipped: this only changes which legs start.

Every job of the final fast run (f83a5db)

Job Result Queue, s Run, min Done after, min Three longest steps
Dependency review success 2 0.1 0.1 Set up job 1 s; Checkout code 1 s; Review the dependency changes 1 s
No tracked file matches .gitignore success 2 0.1 0.1 Set up job 1 s; Checkout code 1 s; Assert no tracked file is matched by an ignore pattern 0 s
Download ArcadeDB JARs [Test Python Examples] success 2 0.1 0.2 Set up job 2 s; Checkout code 1 s; Select the test matrix 1 s
Plan the legs success 2 0.1 0.2 Set up job 1 s; Run actions/checkout 1 s; Choose the legs 1 s
Examples Test Summary success 3 0.1 0.3 Check test results 1 s; Set up job 0 s; Complete job 0 s
Bandit security scan success 2 0.3 0.3 Run Bandit on src and tests (must be clean) 6 s; Run Bandit on examples (must be clean at medium+/high-confidence) 3 s; Set up job 1 s
Build docs site success 2 0.4 0.4 Build with Antora 6 s; Run actions/checkout 4 s; Run actions/setup-node 4 s
Dependency floor audit success 3 0.3 0.4 Audit declared dependency floors on every supported interpreter 10 s; Checkout code 4 s; Set up job 2 s
Download ArcadeDB JARs [Test JVM (arcadedb-jvm)] success 2 0.5 0.5 Set up Docker Buildx 8 s; Upload JARs as artifact 7 s; Download JARs from ArcadeDB Docker image 6 s
Run pre-commit on all files success 2 1.6 1.6 Run pre-commit on all files 88 s; Set up job 1 s; Checkout code 1 s
Build arcadedb-jvm wheel (linux/amd64) success 3 1.4 1.9 Build arcadedb (linux/amd64) 55 s; Set up Docker Buildx (Linux only) 9 s; Download ArcadeDB JARs artifact 4 s
Test arcadedb (linux/amd64, Python 3.11) success 3 6.9 8.8 Run pytest on host 378 s; Install and run the wheel in manylinux_2_28 (Linux only) 22 s; Set up job 3 s
Image and wheel (linux-x86_64) success 2 8.8 9.0 Build the native image in manylinux_2_28 496 s; Build the wheel 12 s; Download GraalVM CE and verify its sha256 5 s
Examples summary success 2 0.1 9.2 Set up job 1 s; Check the examples legs 1 s; Complete job 0 s
Test arcadedb (linux/amd64, Python 3.14) success 3 7.3 9.3 Run pytest on host 390 s; Install and run the wheel in manylinux_2_28 (Linux only) 27 s; Download the wheel of linux/amd64 6 s
Test Summary success 3 0.1 9.4 Check test results 2 s; Set up job 0 s; Complete job 0 s
Python 3.11 on the wheel (linux-x86_64) success 3 0.9 9.9 Run the subset against the installed wheel 39 s; Run actions/download-artifact 3 s; Run actions/checkout 2 s
Python 3.14 on the wheel (linux-x86_64) success 3 1.1 10.1 Run the subset against the installed wheel 48 s; Run actions/download-artifact 4 s; Run actions/checkout 2 s
Parity against the installed wheel (linux-x86_64, Python 3.12) success 3 7.9 17.0 Run the parity suite 465 s; Run actions/download-artifact 2 s; Run actions/upload-artifact 2 s
Report parity crashes success 3 0.1 17.2 Run actions/checkout 5 s; Set up job 2 s; Run actions/download-artifact 1 s
Build wheel for examples (<platform>) skipped
Test Python Examples (<platform>, Python <version>) skipped
Examples on the installed wheel (<platform>, Python <version>) skipped

What the fast tier would have let through in the last 30 days

Every red run of the three test workflows since 2026-10-24, grouped by commit and counted against the jobs the final fast tier keeps:

Event Commits with a red test workflow A job of the final fast tier was red Only example jobs were red Example jobs and another platform Only another platform or Python No job started
pull_request 70 53 2 0 4 11
push 25 7 5 1 12 0
schedule 4 2 1 0 1 0
  • Only another platform (4 pull-request commits, three on Windows and one on macOS, all Test arcadedb): intermittent vector test failures on docs, tooling and Dependabot branches, with the other Python of the same platform green in the same run. None looks like a bug of the change.
  • Only example jobs (2 pull-request commits): one is the branch that added the native examples job. The other, perf/317-native-one-row-crossings on 2026-11-09, is the cost of this change: examples 15 and 16 failed with a SchemaException on all four platforms while the unit tests were green. With the final fast tier that commit has no red job on the pull request, and the examples are red on main after the merge, unless it carries ci:full.
  • The native pyver legs that leave a pull request (3.13, 3.15, free-threaded 3.14t) were red on five commits, and on all five the parity suite on Linux x86-64 was red too.

#442 lists each commit and the limits of the count (a run that was re-run until green is not in it).

The Windows-only problems I know (#295, #352, #409) were all first seen on main, in a nightly run or in a manual run, on legs that no pull request ran before either.

How to get more on a pull request

  • The full matrix: add the label ci:full, then push a commit or choose "Re-run all jobs" on the test workflows. The pull request then runs the legs of a push to main. To go back, remove the label and push. Dependabot pull requests always run the full tier, because the hourly job merges them without a reader and an action bump can touch a step that only macOS or Windows runs.
  • The examples: they run by themselves when the pull request changes a file under examples/ (not examples/README.md), scripts/run_examples.sh, scripts/native_examples_skip.txt or test-python-examples.yml. Otherwise use ci:full. I left out the docs pages: no page includes a file of examples/, and the test workflows do not start for a docs-only change.

How it works

  • scripts/ci_tier.py decides the tier of a pull request and hands the planners the event pull_request (fast), pull_request_examples (fast and the example legs) or pull_request_full (the legs of a push). The planners (scripts/select_matrix.py, scripts/select_native_matrix.py) hold the legs, as before.
  • The script reads the labels and the changed files from the API. A re-run keeps the event of the first attempt, so the labels are read again. If the labels cannot be read, the pull request runs the full tier. If the changed files cannot be read, it runs the example legs.
  • The label is not a trigger on purpose. A labeled trigger would start a run for every label, and a run whose jobs are all skipped would replace red checks with skipped ones.
  • The example decision is made at job level. Both workflows still start, and Examples Test Summary and Examples summary still report, so no check is left pending. They are green for exactly one skipped case (the plan has no example leg and the job was skipped) and red when a planned leg failed, was cancelled or did not run. I ran the shell of the three summary jobs on 34 combinations of results for the two shapes.
  • Test Summary keeps its logic: its legs are matrix jobs, so a smaller matrix gives the same one-word result. The summaries no longer say "all platforms" when one platform ran.
  • A red main: the README gets a badge for test-python-examples.yml next to the two it has, so each test workflow shows its last run on main.

main has no branch protection and the repository has no ruleset, so no required check has to change.

What I looked at and did not change

  • The native image build. It is the same library for every pull request that changes only Python files, so it could be restored from a cache keyed on the files the image is built from, and only the wheel rebuilt (Build the wheel took 12 s). That could bring such a pull request under 15 minutes. I did not try it: a wrong key means a stale library is tested, so it needs its own issue and decision.
  • Download datasets is the longest step of both example jobs (891 s and 608 s in the first run, against 849 s and 490 s for Run all examples). It is not download time. In the log of the native example job of the first run the last download progress line comes 10 s into the step, the embedding model is loaded after 21 s, and the step ends after 608 s with 19,591 vectors built on the CPU. A cache of the built dataset would save that, but it needs care: I did not check whether examples/download_data.py reuses vectors that are already there, a dataset whose host was down must not be cached as complete, and the size of the cache on four platforms is unknown. It no longer costs a pull request anything. On main every example leg still pays it.
  • Download ArcadeDB JARs runs twice because test-jvm.yml and test-python-examples.yml are two workflows: each downloads the jars and builds its own wheel. In the fast tier the second one now only chooses the legs and neither downloads nor builds. On main both still do.
  • Dependency installs: no install step is among the three longest steps of any job, so I added no cache.
  • The parity suite runs its test files one after the other (native/wheel/parity_wheel.py). Splitting it into parallel legs would shorten the chain, but the release reads one marker for each parity leg, so I left it.

Related issues

Closes #442

Docs

  • CONTRIBUTING.md: a new section "What CI runs".
  • docs/modules/ROOT/pages/development/ci.adoc: a new section "Fast tier and full tier", the table of legs, the job counts, the native section and "Change the selection".
  • README.md: the sentence about pull requests and the third badge.

Checklist

  • A regression test fails on the old code and passes on the new (tests/test_ci_tier.py is new, tests/test_select_matrix.py and tests/test_select_native_matrix.py pin the new legs)
  • The test suite that the change can affect passes (the runs of this pull request)
  • uvx pre-commit run --files <changed files> passes

…in, nightly and with the label ci:full (#442)

A ready pull request started 42 jobs and waited a median of 70.9 minutes
for the last one; 46% of the job time was queueing, mostly for the macOS
runners the organisation shares with ArcadeData/arcadedb (issue 442 has the
measurement). In 30 days no pull request had another platform catch a bug
of its own change: the four commits that were red only outside Linux
x86-64 were intermittent vector failures on docs and tooling branches.

Two tiers:

- fast, every pull request: the static checks, and on linux/amd64 only the
  arcadedb-jvm wheel with the tests on the oldest and the newest Python and
  the examples on the newest, and (when a native path changed) the native
  image and wheel with parity and examples on Python 3.12. 20 jobs instead
  of 42 (14 instead of 31 when no native path changed).
- full: push to main, nightly, dispatch and release keep the legs they
  had. A pull request with the label ci:full, and one Dependabot opened
  (the hourly job merges it without a reader), runs the legs of a push to
  main.

scripts/ci_tier.py decides the tier of a pull request and hands the
planners the event pull_request or pull_request_full. It reads the labels
again from the API, because a re-run keeps the event of the first attempt:
adding the label and re-running is enough. It fails open (labels not
readable: full tier). The label is not a trigger: a `labeled` trigger would
start a run for every label, and a run whose jobs are all skipped would
replace red checks with skipped ones.

The summary jobs keep their logic: their legs are matrix jobs, so a
smaller matrix gives the same one-word result, red when a started leg
failed or was cancelled. The pyver job of test-native.yml has no legs in
the fast tier and is skipped (an empty matrix is an error); no job needs
it, and the release still requires its markers. The summaries no longer
say "all platforms" when one platform ran.

The README gets a badge for test-python-examples.yml, so each of the three
test workflows shows its last run on main.
@tae898 tae898 added this to the 26.12.1 milestone Nov 22, 2026
@tae898 tae898 added the github_actions Pull requests that update GitHub Actions code label Nov 22, 2026
@tae898 tae898 self-assigned this Nov 22, 2026
…ps the oldest and the newest Python (#442)

The first run of this pull request took 31.8 minutes, and both jobs that
ended it were example jobs: `Test Python Examples (linux/amd64, Python
3.14)` (29.8 minutes) and `Examples on the installed wheel (linux-x86_64,
Python 3.12)` (19.0). Their longest step is `Download datasets` (891 s and
608 s), which mostly builds the vectors of the Stack Overflow dataset. The
target for a pull request is about 15 minutes.

- A pull request runs no example leg in either workflow. The examples run
  on a push to main, in the nightly run, on a manual run and with the
  label ci:full, like the rest of the full tier.
- Exception, by path and at job level: a pull request that changes a file
  under examples/ (not examples/README.md), scripts/run_examples.sh or
  scripts/native_examples_skip.txt runs the example leg of Linux x86-64.
  scripts/ci_tier.py reads the changed files from the API and hands the
  planners the event pull_request_examples. Files that cannot be read:
  the example legs run (fails open).
- The workflows still start and their summary checks still report, so no
  check is left pending: `Examples Test Summary` and `Examples summary`
  are green for exactly the case "the plan has no example leg and the job
  was skipped", and red when a planned leg failed, was cancelled or did
  not run. In test-python-examples.yml the first job downloads no jars
  when there is no leg.
- The native `pyver` job runs Python 3.11 and 3.14 on a pull request (the
  ends of the range, about a minute each, beside the parity suite). 3.13,
  3.15 and the free-threaded 3.14t stay in the full tier: in 30 days no
  pyver leg was red on a commit whose Linux parity run was green.

What stays on every pull request: the arcadedb-jvm wheel and its tests,
the native image and wheel built from the pull request, and the parity
suite against the installed wheel.
… pull request (#442)

The workflow whose only work is to run the examples joins the paths that
start the example legs (examples/, scripts/run_examples.sh,
scripts/native_examples_skip.txt): a pull request that edits it would
otherwise merge without one run of what it changed.

test-native.yml and test-jvm.yml are left out on purpose. They change for
many other reasons, and the example job of test-native.yml takes about 20
minutes; a change to it can ask for the full tier with the label ci:full.

This pull request edits test-python-examples.yml, so from this commit on
its own run has the example legs: the run of the commit before
(f83a5db) is the measurement of a pull request without them, and this
one shows the example jobs and their two summaries with legs.
@tae898
tae898 merged commit df35a6a into main Nov 22, 2026
24 checks passed
@tae898
tae898 deleted the ci/442-tiered-pr-matrix branch November 22, 2026 17:51
tae898 added a commit that referenced this pull request Nov 22, 2026
…ates one issue (#447) (#448)

Since #443 a pull request runs only the fast tier, so a failure that only macOS, Windows, arm64 or an example leg shows is first seen on `main`, where only three README badges show it. A new workflow, report-red-main.yml, reacts to the end of the three test workflows (`workflow_run`), only for a push, the nightly schedule or a manual run on `main`, and opens "Full CI is red on main: <workflow name>" or comments on the open one. A green run of the same workflow adds "Green again" (it needs more passed than skipped jobs, so a nightly that skipped itself says nothing) and nothing is closed.

A cancelled run is not red: a newer push cancels the run in progress in test-native.yml, and a replaced run in test-jvm.yml never starts. The one cancelled run that is reported is the one where a job hit its time limit, found by the check-run annotation "exceeded the maximum execution time".

The job holds `issues: write` and `contents: read`, checks out nothing, and passes every payload value through `env`. It cannot name the failing test (the log endpoint needs `actions: read`), so a known flaky failure such as #409 is linked by a person; the issue text says so.

The shell was run against a stub `gh` for a new failure, a repeat failure, green again, a run cancelled by a newer run, a run cancelled by a time limit, a startup failure, more than 15 failing jobs and a failing job list call. actionlint (with shellcheck) and the repo's pre-commit hooks pass.
@tae898 tae898 mentioned this pull request Nov 30, 2026
1 of 10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: run Linux x86-64 on every pull request and the full platform matrix on main, nightly and with the label ci:full

1 participant