Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ shellcheck and hadolint run as `docker_image` hooks (Docker pulls the images aut

CI has two tiers, so that a pull request does not wait for the macOS and Windows runners that the organisation shares with ArcadeData/arcadedb.

- **A pull request runs the fast tier**, which is meant to finish in about 10 minutes. The static checks (pre-commit, Bandit, the dependency audits) run as before. The builds and tests run on one platform and one Python, Linux x86-64 and Python 3.14: the `arcadedb-jvm` wheel with its tests in two shards and, when a native path changed, the native wheel with the parity suite in three shards. The native library is taken from a cache unless the pull request changes what it is built from. The examples and the other Python versions do not run. A pull request that changes only documentation runs no platform job.
- **A pull request runs the fast tier**, which is meant to finish in about 10 minutes. The static checks (pre-commit, Bandit, the dependency audits) run as before. The builds and tests run on one platform and one Python, Linux x86-64 and Python 3.14: the `arcadedb-jvm` wheel with its tests in two shards and, when a native path changed, the native wheel with the parity suite in five shards. The native library is taken from a cache unless the pull request changes what it is built from. The examples and the other Python versions do not run. A pull request that changes only documentation runs no platform job.
- **`main` runs the full tier.** A push to `main` and the nightly run (03:00 to 04:00 UTC) test all four platforms (Linux x86-64, Linux arm64, macOS arm64 and Windows x86-64), more Python versions, and run the examples on each platform. A release tests every platform on every Python version.
- **To run the full tier on a pull request**, add the label `ci:full`, then push a commit or choose "Re-run all jobs" on its test workflows. The pull request then runs what a push to `main` runs. Use it for a change that can behave differently on another platform or Python: file paths, processes and signals, the wheel build, the native library, the examples, a workflow file. If you cannot add labels, ask for it in the pull request. Dependabot pull requests always run the full tier.

Expand Down
4 changes: 2 additions & 2 deletions docs/modules/ROOT/pages/development/ci.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The summary jobs (`Test Summary`, `Examples Test Summary`, `Examples summary`) c
The checks of a pull request are meant to finish in about 10 minutes, and in 15 at the very most, counted from the creation of the runs to the end of the last job (issue 517 has the timings). Work that takes longer belongs on a push to `main`, the nightly or weekly run, or a run on demand. These things keep the fast tier short:

* One platform and one Python for both packages.
* Each suite is cut into shards that run side by side: two for `arcadedb-jvm` (the option `--shard I/N` of `tests/conftest.py`) and three for `arcadedb` (the same option of `native/wheel/parity_wheel.py`). `scripts/shard_tests.py` makes the split from the list of test files, so every file runs in exactly one shard, and balances it with the seconds of the longest files. A new test file needs no entry there. A run that is not sharded (`main`, nightly, a manual run of all legs, a release) runs each suite whole in one job.
* Each suite is cut into shards that run side by side: two for `arcadedb-jvm` (the option `--shard I/N` of `tests/conftest.py`) and five for `arcadedb` (the same option of `native/wheel/parity_wheel.py`). `scripts/shard_tests.py` makes the split from the list of test files, so every file runs in exactly one shard, and balances it with the seconds of the longest files. A new test file needs no entry there. A run that is not sharded (`main`, nightly, a manual run of all legs, a release) runs each suite whole in one job.
* The native library is cached (see <<native-library-cache,The cached native library>>). Without a hit, the wait is set by the image build, about 11 minutes, and the shards after it.

The time a job waits for a runner comes on top and can be longer than the job: the runners are shared with ArcadeData/arcadedb.
Expand Down Expand Up @@ -163,7 +163,7 @@ At each upstream release, a person or a session reads the two lists of commits a

The workflow `test-native.yml` builds the native image of the `arcadedb` package and runs the test suite against the installed wheel. It does not follow the table above. It never publishes; `release-native.yml` calls it on a version tag.

* A pull request runs it only when native paths change: `+native/**+`, `+src/arcadedb/**+`, `+tests/**+`, `+examples/**+` (not `examples/README.md`), `pyproject.toml`, `setup.py`, `scripts/select_native_matrix.py`, `scripts/ci_tier.py`, `scripts/shard_tests.py`, `scripts/smoke_wheel.py`, `scripts/run_examples.sh`, `scripts/native_examples_skip.txt` or `test-native.yml` itself. Changes under `tests/` and `src/arcadedb/` are included because both backends share those files, so a shared test or source can break native parity without touching a native file; docs outside those paths do not run it. It then runs on `linux-x86_64` only (the fast tier): the library (restored from the <<native-library-cache,cache>> or built), the wheel, and the parity suite on Python 3.14 in three shards. It runs no `pyver` and no example leg. With the label `ci:full`, and for a Dependabot pull request, it runs the legs of a push to `main`.
* A pull request runs it only when native paths change: `+native/**+`, `+src/arcadedb/**+`, `+tests/**+`, `+examples/**+` (not `examples/README.md`), `pyproject.toml`, `setup.py`, `scripts/select_native_matrix.py`, `scripts/ci_tier.py`, `scripts/shard_tests.py`, `scripts/smoke_wheel.py`, `scripts/run_examples.sh`, `scripts/native_examples_skip.txt` or `test-native.yml` itself. Changes under `tests/` and `src/arcadedb/` are included because both backends share those files, so a shared test or source can break native parity without touching a native file; docs outside those paths do not run it. It then runs on `linux-x86_64` only (the fast tier): the library (restored from the <<native-library-cache,cache>> or built), the wheel, and the parity suite on Python 3.14 in five shards. It runs no `pyver` and no example leg. With the label `ci:full`, and for a Dependabot pull request, it runs the legs of a push to `main`.
* A push to `main` (only when a native path changed, same filter as a pull request), the nightly run (skipped when nothing changed in the last 25 hours, except on Mondays) and a manual run (dispatch) run all four platforms: `linux-x86_64`, `linux-aarch64`, `macos-arm64` and `windows-x64` (Python 3.12 and 3.14). A release (`release-native.yml` calls the workflow with `release: true`) runs the same four platforms on all four Python versions, 16 legs.
* The `pyver` job installs the already built `linux-x86_64` wheel (no rebuild) into the Pythons that the full parity runs of the event leave out (3.11 and 3.13 on a push to `main`, the nightly run and a dispatch; none on a release) into 3.15 and into the free-threaded 3.14t, and runs 13 test files there (14 where polars installs; 3.15 has no jpype1 wheel, so it leaves out the two files that need jpype1), about 20 seconds of tests per Python. A release needs it: a `pyver` leg that passes uploads the marker `native-passed-pyver-py<version>` (it holds the file name of the wheel the leg installed), and `Verify what may be published` in `release-native.yml` requires the markers of 3.15 and 3.14t, the two legs of a release, and that both tested the `linux-x86_64` wheel that is published. A red leg stops a release before anything reaches PyPI. A pull request of the fast tier runs no leg of this job: every Python but 3.14 runs in the full tier. In the 30 days before issue 442 no `pyver` leg was red on a commit where the parity suite on Linux x86-64 was green. Only `linux-x86_64` is checked on these two Pythons: the other platforms are not tested on 3.15 and 3.14t, and the JVM package has no such job. The 3.14t leg has no polars (no free-threaded wheel exists), so it skips `test_dataframe_ingest.py`. `scripts/select_native_matrix.py` decides its legs, and `tests/test_select_native_matrix.py` and `tests/test_release_native_verify.py` pin the gate.
* Every test file runs in its own process (`native/wheel/parity_wheel.py`). A process that dies without writing its result is a `CRASH` row in `parity-wheel.tsv` with its exit code, for example `CRASH(rc=0xC0000005,3221225477)`, and it fails the leg. On the Windows legs only (the crashes of issue 295 happen there), the harness runs such a file once more in a fresh process (`--retry-crash`). A retry that produces a result is a `FLAKY-CRASH` row: the gate lets the leg pass, the job summary lists the file with the first exit code, and on a release or a dispatch the `crash-report` job adds one comment to issue 295 (run URL, Python, wheel version, exit codes). A second crash, a failing test, a timeout and every crash on Linux or macOS stay failures. A process that wrote its result and then died in shutdown is a `DIRTY-EXIT` record (exit code, file, attempt) in the metadata, the job summary and the issue comment: it is not retried and does not fail the leg. Each Windows test process also writes a faulthandler trace, `parity-wheel-xml/<file>.attemptN.fault.txt`, into the parity artifact of the leg. Only a retry hides a crash, so treat a `FLAKY-CRASH` as an open bug: read the trace in the artifact before a release is announced.
Expand Down
6 changes: 4 additions & 2 deletions scripts/select_native_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,10 @@
# The newest Python the full parity suite runs on (3.15 has no jpype1 wheel yet and gets the `pyver` subset in the full tier).
PULL_REQUEST_PYTHONS = [ALL_PYTHONS[-1]]
# The shards of the parity run of a pull request: the suite takes about 9 minutes in one job, and after a native image build
# (about 11 minutes, when the pull request changes the library) the shards must be short.
PULL_REQUEST_SHARDS = 3
# (9 to 12 minutes, when the pull request changes the library) the shards must be short. With three shards such a pull request
# could wait more than 15 minutes (ArcadeData/arcadedb-python#528). The longest file takes about 1.5 minutes, so more shards than
# this gain little.
PULL_REQUEST_SHARDS = 5
MAIN_PYTHONS = ["3.12", "3.14"]
# The Pythons of the `examples` job (the examples of examples/ against the installed wheel): the parity Pythons of a push, the nightly run and a
# dispatch. A release runs the parity suite on every supported Python, but the examples only on these two.
Expand Down
8 changes: 5 additions & 3 deletions tests/test_dev_engine_pin.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,11 @@ def test_the_weekly_run_is_never_skipped_and_builds_one_platform(tmp_path):
assert [leg["key"] for leg in json.loads(lines["build"])] == ["linux-x86_64"]
# the legs of a pull request: one Python, the newest, in shards, and no pyver or example leg
assert [(leg["python"], leg["shard"]) for leg in json.loads(lines["test"])] == [
("3.14", "1/3"),
("3.14", "2/3"),
("3.14", "3/3"),
("3.14", "1/5"),
("3.14", "2/5"),
("3.14", "3/5"),
("3.14", "4/5"),
("3.14", "5/5"),
]
assert json.loads(lines["pyver"]) == []
assert json.loads(lines["examples"]) == []
Expand Down
Loading