Skip to content

ci: a pull request tests one platform and one Python, in shards, with a cached native library - #519

Merged
tae898 merged 2 commits into
mainfrom
ci/pr-checks-ten-minutes
Nov 27, 2026
Merged

tae898 merged 2 commits into
mainfrom
ci/pr-checks-ten-minutes

Conversation

@tae898

@tae898 tae898 commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

It brings the checks of an ordinary pull request from a median wait of about 34 minutes (see the issue) towards 10 minutes. Only the fast tier of a pull request changes. main, the nightly and weekly runs, manual runs of all legs, pull requests with ci:full, Dependabot pull requests, and releases keep their platforms and Python versions.

On a push to a pull request Before After
arcadedb-jvm tests, Linux x86-64 Python 3.11 and 3.14, one job each Python 3.14, 2 shards
arcadedb parity suite, Linux x86-64 Python 3.12, one job Python 3.14, 3 shards
arcadedb pyver subset Python 3.11 and 3.14 none (full tier)
Native image built on every run (about 11 min) restored from a cache when the change cannot alter it
Examples when the pull request changed them (about 20 min) full tier only (main, nightly, manual, ci:full)
Test Summary, Examples Test Summary, Examples summary, Report parity crashes ran after the last leg skipped; the summaries still run if the first job fails
  • scripts/shard_tests.py splits the test files, so every file runs in exactly one shard. A shard uploads no native-passed-* marker.
  • The cache key names every input of the image: native/ outside native/wheel/, test-native.yml, the engine release, the GraalVM archive, and the build settings. There is no partial match. Only a fast-tier pull request restores it. A release neither reads nor writes it, and a snapshot engine is never cached.
  • A red run on main still opens or updates the report issue (report-red-main.yml listens to the same workflows).
  • No branch rule requires a check, and nothing in the repository settings changes.
  • The weekly engine snapshot run uses the legs of a pull request, so it now runs the parity suite on 3.14 in 3 shards, without the 3.11 and 3.14 subset.

Related issues

Closes #517

Performance changes

None in the packages. The CI timings are in a comment below.

Docs

development/ci.adoc (the two tiers, the shards, the cache) and CONTRIBUTING.md.

Checklist

  • A regression test fails on the old code and passes on the new: the new and changed tests need the new legs and the new script, and I did not run them against the old code
  • The test suite that the change can affect passes (the checks of this pull request)
  • uvx pre-commit run --files <changed files> passes (without the two container hooks, shellcheck and hadolint, which the CI runs)

… a cached native library

A push to a pull request made me wait a median of 34 minutes. The stages ran one after the other, each could wait for a shared runner, and the two long ones (the native image build and each test suite) were single jobs.

A pull request now tests Linux x86-64 on Python 3.14 only. Each suite is cut into shards that run side by side (2 for arcadedb-jvm, 3 for arcadedb; scripts/shard_tests.py), the native library of linux-x86_64 is restored from a cache keyed on everything it is built from, the examples run in the full tier only, and the summary and crash report jobs that would queue again after the last leg are skipped in the fast tier. Dependabot and ci:full pull requests, main, the nightly run, manual runs and releases keep their legs; a release never reads or writes the cache.

Closes #517
@tae898 tae898 added this to the 27.1.1 milestone Nov 27, 2026
@tae898 tae898 added enhancement New feature or request github_actions Pull requests that update GitHub Actions code labels Nov 27, 2026
@tae898 tae898 self-assigned this Nov 27, 2026
The weekly engine snapshot run uses the legs of a pull request, which are now Python 3.14 in three shards with no pyver leg. Also pin that it is not treated as a pull request of the fast tier.
@tae898

tae898 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

Waiting time from real runs, counted from the creation of the runs to the end of the last job:

Run Wait, min Jobs that ran Image and wheel, min arcadedb-jvm test jobs, min Parity jobs, min Longest queue time of a job, min
Before, median of 8 pull request heads 33.8 20 10.6 7.8 (median) 8.7 (median) 11.1 (median)
Before, the same pipeline with idle runners, 2ad03760d 16.6 20 7.9 7.6 to 10.3 8.1 0.1
After, native library built (first push of this pull request), c2a9d6a28 16.3 16 9.0 3.6 to 3.8 2.9 to 3.7 4.0
After, native library from the cache (second push), db7718ef5 6.4 16 1.0 3.5 to 4.4 2.4 to 3.1 0.4
  • A pull request that leaves the native library alone is the common case: 34 of the last 40 merged pull requests changed none of its inputs.
  • A pull request that changes the library (native/ outside native/wheel/, or test-native.yml) waits for the image build first. The first push here took more than 15 minutes with the runner queue, and 15 is not guaranteed for that case: the jobs on its longest path add up to less (image and wheel, then the slowest parity shard), but the image build alone varies by a few minutes between runs.
  • Queue time comes on top in every case, because the runners are shared. The idle-runner row shows what the old pipeline did without it.
  • The first push was red in one test that pins the legs of the weekly run. The second commit updates it.
  • Nothing dropped out of the shards on the second push: the JVM shards collected 4,382 tests (2,212 and 2,170; the one job on main collected 4,360 before the tests this pull request adds), and the parity shards ran 212 test files.

I have not run the full tier on this branch. The push to main after the merge runs it, and I will look at that run.

@tae898
tae898 merged commit 63ced32 into main Nov 27, 2026
25 checks passed
@tae898
tae898 deleted the ci/pr-checks-ten-minutes branch November 27, 2026 11:39
@tae898

tae898 commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator Author

After the merge, from real runs.

The first three pull requests of other work that ran on the new tier, all green, with the native library restored from the cache that main saved:

Pull request head Wait, min Jobs that ran Longest queue time of a job, min
#520, c1114d4d1 9.3 16 3.2
#518, bd4bf3bf4 9.5 16 1.7
#522, 5118635d9 7.5 15 0.1

The median wait of the three is 9.3 minutes.

The full tier on main: Test JVM (arcadedb-jvm) and Test Python Examples passed on the merge commit 63ced32. The native run of that commit was cancelled by the next push before its tests started, so I checked the run of e2aaf25, which contains the change: all 8 parity legs and all 4 pyver legs passed unsharded and wrote their markers. Its example legs were still running when I wrote this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: a pull request waits a median of 34 minutes for its checks, bring it to about 10

1 participant