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 .github/ISSUE_TEMPLATE/release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <VERSION> origin/main && git push origin <VERSION>
```

- [ ] 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 <VERSION> --limit 6
Expand Down
45 changes: 31 additions & 14 deletions docs/modules/ROOT/pages/development/release-native-smoke.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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:

* `<PREVIOUS>`, the previous release.
* `<FAST>`, 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 <VERSION>)
gh run download <run-id> -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/<PREVIOUS>/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 <PREVIOUS> <FAST>; 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]
----
Expand All @@ -64,12 +76,16 @@ cores=<the cores of one compare lane, for example 6,7>
taskset -c "$cores" uv run --no-project python -I scripts/native_update_smoke.py --quick \
--baseline smoke/base/<baseline wheel> --out smoke/quick.json smoke/cand1/<candidate wheel>

# the smoke
taskset -c "$cores" uv run --no-project python -I scripts/native_update_smoke.py \
--baseline smoke/base/<baseline wheel> --out smoke/<VERSION>-attempt1.json \
--work-dir <a folder on a disk> smoke/cand1/<candidate wheel>
# 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/<VERSION>-attempt1-vs-$(basename "$base" .whl).json" \
--work-dir <a folder on a disk> smoke/cand1/<candidate wheel>
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"]
Expand Down Expand Up @@ -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:

Expand All @@ -156,6 +172,7 @@ cat >> notes.md <<'EOF'

- Library sha256 (`libarcadedb.so`, linux x86-64): `<sha256>`
- Single-record `UPDATE` through `command()` against `<PREVIOUS>`: `<ratio>` `[<lo>, <hi>]` (95% interval of the median of `<rounds>` per-round ratios, below 1 is faster); control `<ratio>` `[<lo>, <hi>]`
- The same against `<FAST>`: `<ratio>` `[<lo>, <hi>]`; control `<ratio>` `[<lo>, <hi>]`
- Attempt `<n>` of at most 4, host class `<class>`, `scripts/native_update_smoke.py`, #404
EOF
gh release edit <VERSION> -R ArcadeData/arcadedb-python --notes-file notes.md
Expand Down
Loading