From 652239c263a00eaf78da2187be067d1283c3fb99 Mon Sep 17 00:00:00 2001 From: Taewoon Kim Date: Sun, 29 Nov 2026 09:03:46 +0900 Subject: [PATCH] docs: run the native speed smoke against two baselines (#404) A slow previous release would hide a slow candidate, so the runbook names a second baseline, the last release measured fast (26.11.1 for 26.12.1), and a candidate must pass a session against each. The release checklist says so too. --- .github/ISSUE_TEMPLATE/release.md | 2 +- .../development/release-native-smoke.adoc | 45 +++++++++++++------ 2 files changed, 32 insertions(+), 15 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/release.md b/.github/ISSUE_TEMPLATE/release.md index 060b9cd1..7f1cfcb5 100644 --- a/.github/ISSUE_TEMPLATE/release.md +++ b/.github/ISSUE_TEMPLATE/release.md @@ -36,7 +36,7 @@ Every step says who does it: script (run the command, read the result), CI (a wo git fetch origin main --no-tags && git tag origin/main && git push origin ``` -- [ ] 5. CI: both release workflows finish and publish, then `release-notes.yml` creates the GitHub Release and, for a final release, closes the milestone. Note the two run ids (the native build takes the longest). To retry a failed upload, re-run only the publish job, never the whole workflow. Both publish jobs wait for your approval (the environments `pypi-jvm` and `pypi` each have you as required reviewer): approve the JVM one when its tests are green. For the native package of a final or `postN` release (a `devN` release skips the smoke), the `pypi` deployment waits for your approval: before you approve it, run the speed smoke on the wheel of the artifact `native-release-dist` (docs page "Speed smoke of the native wheel", issue #404) and keep the library sha256 and the ratio. A wheel that fails the smoke is a slow build of the same commit: reject the deployment and re-run all jobs for a new build, up to four times. Keep the JSON of every attempt. The notes lines wait for step 10, because the GitHub Release does not exist before both packages are published. +- [ ] 5. CI: both release workflows finish and publish, then `release-notes.yml` creates the GitHub Release and, for a final release, closes the milestone. Note the two run ids (the native build takes the longest). To retry a failed upload, re-run only the publish job, never the whole workflow. Both publish jobs wait for your approval (the environments `pypi-jvm` and `pypi` each have you as required reviewer): approve the JVM one when its tests are green. For the native package of a final or `postN` release (a `devN` release skips the smoke), the `pypi` deployment waits for your approval: before you approve it, run the speed smoke on the wheel of the artifact `native-release-dist` (docs page "Speed smoke of the native wheel", issue #404), once against each of its two baselines, and keep the library sha256 and both ratios. A wheel that fails the smoke is a slow build of the same commit: reject the deployment and re-run all jobs for a new build, up to four times. Keep the JSON of every attempt. The notes lines wait for step 10, because the GitHub Release does not exist before both packages are published. ```bash gh run list -R ArcadeData/arcadedb-python --branch --limit 6 diff --git a/docs/modules/ROOT/pages/development/release-native-smoke.adoc b/docs/modules/ROOT/pages/development/release-native-smoke.adoc index cf3b0f9c..05ef6bdc 100644 --- a/docs/modules/ROOT/pages/development/release-native-smoke.adoc +++ b/docs/modules/ROOT/pages/development/release-native-smoke.adoc @@ -15,7 +15,7 @@ UPDATE Crud SET qty = 2 WHERE ckey=:c with a parameter, through `command()`. The tool records the other figures too (new-order, payment, insert, read, delete) as information. * The wheels run in an interleaved order. Round `2j` and round `2j+1` run them in mirrored order (ABBA), and the order rotates every two rounds, so no wheel always runs first. -* The ratio of a candidate is the median over the rounds of the per-round ratio against the baseline, the previously published wheel. Below 1 is faster. The interval is a 95% percentile bootstrap of that median. +* The ratio of a candidate is the median over the rounds of the per-round ratio against the session's baseline, a published wheel (see <<_two_baselines,Two baselines>>). Below 1 is faster. The interval is a 95% percentile bootstrap of that median. * The control is the baseline wheel against itself, in its own processes, in the same session. Its interval must lie inside 0.97 to 1.03. If it does not, the session is not readable: the host was not quiet, and no verdict counts. * A candidate passes when the upper end of its interval is below `--max-ratio` (default 1.10). The spread study of #404 found slow builds at 1.33 to 1.35 and fast ones at 0.95 to 0.99 on the host class that measures the published numbers. * The tool reads `Cpus_allowed_list` from `/proc/self/status`, records it, and refuses to run with more than 4 allowed cores unless `--quick`. It does not pin anything itself: the caller pins it, and every process of the session inherits the set and checks it. @@ -32,29 +32,41 @@ Run it for every final or `postN` release of the native package (a `devN` releas The smoke covers the `manylinux_2_28_x86_64` wheel only. The other platforms are not measured. +[[_two_baselines]] +== Two baselines + +Run the smoke once against each of two published wheels of `arcadedb`, and publish a candidate only when it passes against both: + +* ``, the previous release. +* ``, the last release whose published wheel was measured fast. For the 26.12.1 release that is `26.11.1`: `26.11.1.post2` and `26.11.1.post3` were slow builds, and a slow baseline would hide a slow candidate. + +When both are the same release, one session is enough. + == Get the files -The candidate is in the artifact of the release run. The previous release is on PyPI. Use a folder on a disk, not on a tmpfs: the wheels are about 66 MB each. +The candidate is in the artifact of the release run. The baselines are on PyPI. Use a folder on a disk, not on a tmpfs: the wheels are about 66 MB each. [source,bash] ---- # the candidate: the Linux x86-64 wheel of the release run (run ids: gh run list -R ArcadeData/arcadedb-python --branch ) gh run download -R ArcadeData/arcadedb-python -n native-release-dist -D smoke/cand1 -# the baseline: the previous release of `arcadedb` (not `arcadedb-jvm`), with the sha256 that PyPI lists -mkdir -p smoke -curl -fsS https://pypi.org/pypi/arcadedb//json | uv run --no-project python -I -c ' +# the baselines: releases of `arcadedb` (not `arcadedb-jvm`), with the sha256 that PyPI lists +mkdir -p smoke/base +for v in ; do + curl -fsS "https://pypi.org/pypi/arcadedb/$v/json" | uv run --no-project python -I -c ' import json, sys f = next(f for f in json.load(sys.stdin)["urls"] if f["filename"].endswith("manylinux_2_28_x86_64.whl")) print(f["url"], f["digests"]["sha256"], f["filename"])' > smoke/base.txt -read -r url sha name < smoke/base.txt -curl -fsSL --create-dirs --output-dir smoke/base -o "$name" "$url" -echo "$sha smoke/base/$name" | sha256sum -c - + read -r url sha name < smoke/base.txt + curl -fsSL -o "smoke/base/$name" "$url" + echo "$sha smoke/base/$name" | sha256sum -c - +done ---- == Run it -Run it with the cores of one compare lane: the cores that one lane of the host uses for a timed study, at most four, and no other work on them. Pin the command; the tool and all its processes inherit the set. Name the baseline with `--baseline` and the candidates as arguments. +Run it with the cores of one compare lane: the cores that one lane of the host uses for a timed study, at most four, and no other work on them. Pin the command; the tool and all its processes inherit the set. One session takes one baseline, named with `--baseline`, and the candidates as arguments; run one session for each baseline, one after the other. [source,bash] ---- @@ -64,12 +76,16 @@ cores= taskset -c "$cores" uv run --no-project python -I scripts/native_update_smoke.py --quick \ --baseline smoke/base/ --out smoke/quick.json smoke/cand1/ -# the smoke -taskset -c "$cores" uv run --no-project python -I scripts/native_update_smoke.py \ - --baseline smoke/base/ --out smoke/-attempt1.json \ - --work-dir smoke/cand1/ +# the smoke: one session against each baseline +for base in smoke/base/*.whl; do + taskset -c "$cores" uv run --no-project python -I scripts/native_update_smoke.py \ + --baseline "$base" --out "smoke/-attempt1-vs-$(basename "$base" .whl).json" \ + --work-dir smoke/cand1/ +done ---- +A candidate passes only when every session gives it `PASS`. + Several candidates can go into one session (`smoke/cand1/... smoke/cand2/...`), so they are measured against the same baseline in the same interleaved rounds. The tool refuses two wheels that hold the same library (same sha256). Useful options: [cols="2,4"] @@ -143,7 +159,7 @@ Each attempt is a full release run of all four platforms on Python 3.11 to 3.14, Record, for the wheel that is published: * The sha256 of its `libarcadedb.so` (the `library sha256` column, or `--hash-only`). The MMDBBench rows of the release name this hash too. -* The ratio and its interval, the control, the baseline version, the number of rounds, which attempt of K it was, and the host class. +* For each baseline: its version, the ratio and its interval, and the control. Then the number of rounds, which attempt of K it was, and the host class. `release-notes.yml` creates the GitHub Release from `scripts/release_notes.py`, and it rewrites the notes whenever it runs again. Add the lines to the finished release, and again after a re-run of that workflow: @@ -156,6 +172,7 @@ cat >> notes.md <<'EOF' - Library sha256 (`libarcadedb.so`, linux x86-64): `` - Single-record `UPDATE` through `command()` against ``: `` `[, ]` (95% interval of the median of `` per-round ratios, below 1 is faster); control `` `[, ]` +- The same against ``: `` `[, ]`; control `` `[, ]` - Attempt `` of at most 4, host class ``, `scripts/native_update_smoke.py`, #404 EOF gh release edit -R ArcadeData/arcadedb-python --notes-file notes.md