Skip to content

Pin commits, test the DEB in clean containers, stage published cores and payloads - #1

Draft
timosachsenberg wants to merge 4 commits into
mainfrom
claude/admiring-tesla-n9a3lm
Draft

timosachsenberg wants to merge 4 commits into
mainfrom
claude/admiring-tesla-n9a3lm

Conversation

@timosachsenberg

@timosachsenberg timosachsenberg commented Dec 2, 2026 •

Copy link
Copy Markdown

Summary

Deployment pilot, distribution side (steps 2 and 3 of the handoff plan).

  • Pinned commits. manifest.json pins every source component to a full SHA and names its ref, the branch the commit is checked out as (the OpenMS version string is made from the branch name; a detached HEAD would give HEAD): OpenMS 9ad3eeb6 (develop, removal of MetaProSIP, Move MetaProSIP to the OpenMS-MetaProSIP repository OpenMS#11036), OpenMS-TOPP-GUI 5e581957 (develop), OpenMS-MetaProSIP 56962126 (main, with the bug fixes of Fix out-of-bounds reads, merge window, peak fraction and R package installation in MetaProSIP OpenMS-MetaProSIP#2). tools/ci/fetch_components.py fetches them before the build (their dependency scripts must run first) and records what it fetched.
  • Clean installation test (install-test job, tools/ci/test_deb_install.sh): a fresh ubuntu:24.04 container gets only the DEB (/artifacts) and MetaProSIP's src/tests/topp at the commit the shipped tool was built from (/fixtures), both read-only. It installs the DEB with APT, finds the executables through the package database, checks file ownership and that MetaProSIP is registered exactly once, and reproduces both reference CSVs of TOPP test 1 with the installed MetaProSIP and FuzzyDiff (same inputs, references, FuzzyDiff.ini), with no OPENMS_* variables or LD_LIBRARY_PATH. The same in the runtime image docker/Dockerfile (Ubuntu 24.04 with only the DEB installed).
  • Upgrade test (upgrade-test job): installs OpenMS 3.6.0 (package openms, which still contains MetaProSIP) first; the distribution DEB must replace it, own MetaProSIP afterwards and pass the same test.
  • build-info.json next to the DEB: component commits / published core / payloads as fetched, the DEB's name, version and sha256, the distribution commit that was built (on a pull request the merge commit, with the PR head separately) and the run.
  • CMake-only builds (without fetch_components.py) check a cloned component out as the branch ref too, so the version string is -pre-<ref>- and not -pre-HEAD-. A source component must list packaged_components.
  • Published core (optional mode): the SDK + installer DEB of an archive.openms.de nightly or release, checked to come from one build (version, GNU build IDs of libOpenMS/libOpenMS_CLI); unpacked from the DEB into the staging prefix, add-ons from source build against the SDK.
  • Artifact add-on (optional mode): the runtime payload of an add-on's CI (MetaProSIP-payload-Linux-X64, CI: build against OpenMS develop, publish docs and a runtime payload OpenMS-MetaProSIP#4), pinned by run, name and sha256. cmake/stage_artifact.cmake checks before staging: tarball sha256 (manifest and metadata), platform, core build IDs against the staged core, only regular files inside the prefix (listed before unpacking), exact inventory with checksums, no existing files overwritten, no duplicate registry names. Because of the build-ID check, a payload can only be combined with the published core whose SDK the add-on's CI used. Downloading another repository's artifact in CI takes the secret DIST_ARTIFACT_TOKEN when it is set, and the workflow's own token otherwise. The pilot's download from OpenMS-MetaProSIP worked in CI.
  • Re-staging a published core or a payload in the same build tree (new pin, package type added later) first removes what the earlier run staged (cmake/unstage_payload.cmake).

The default manifest stays all-source.

Pilot of the published and artifact modes (manifests/pilot-published-artifact.json):

  • Core: OpenMS nightly 2026.12.03 (develop 414eb811, the first nightly without MetaProSIP), published.
  • OpenMS-TOPP-GUI: built from source against that nightly's SDK.
  • OpenMS-MetaProSIP: the runtime payload that its CI built and tested against that nightly. That was run 47056224980 on main in SDK mode; it also installed the payload into /usr and ran the TOPP test from there.

Pilot run 47058468115 is green:

  • fetch_components.py found that the SDK and the installer are one build. The payload was downloaded from the other repository's run inside CI and checked against its pinned sha256.
  • stage_artifact.cmake accepted the payload: its build IDs match the staged core.
  • TOPP-GUI passed its 20 tests and the staged-installation test passed.
  • The DEB openms-distribution 3.7.0~nightly.2026.12.02 reproduces both MetaProSIP reference CSVs in a clean container and in the runtime image, and replaces OpenMS 3.6.0 in the upgrade test.

The first pilot run showed a bug, fixed in 6fc6843: the record of an artifact add-on carried the artifact's name in place of the component's name, so fetch_fixtures.sh found no OpenMS-MetaProSIP.

Test plan

  • superbuild with toy components in all three modes: DEB and TGZ layouts, every refusal path of stage_artifact.cmake (wrong sha256, platform, build ID, extra/unlisted file, overwritten file, duplicate registry name, symbolic link, .. entry)
  • re-staging in one build tree: none → deb reconfigure, new payload pin, newer published core (stale files removed), touched payload, no-op rebuild
  • clone path checks out the branch ref; several DIST_OPENMS_CMAKE_ARGS arrive as separate arguments
  • fetch_components.py against the real archive (nightly 2026.12.02: SDK/DEB version and build IDs agree) and GitHub (source clone at a SHA as a branch)
  • fetch_fixtures.sh against GitHub; shellcheck on all scripts
  • CI of 792845b: build (all source, add-on tests, staged-installation test), install-test (clean container + runtime image: openms-distribution 3.7.0~develop.2026.12.02 reproduces both reference CSVs), upgrade-test (3.6.0 → replaced, same test passes)
  • CI of 63cfba6 (review fixes): build, install-test and upgrade-test green
  • artifact pilot with nightly 2026.12.03 and the MetaProSIP payload of run 47056224980: run 47058468115 green (build, install-test, upgrade-test)

https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN


Generated by Claude Code

…and payloads

manifest.json pins every source component to a full commit SHA (core
9ad3eeb6, the removal of MetaProSIP from OpenMS develop; OpenMS-TOPP-GUI
5e581957; OpenMS-MetaProSIP 56962126, main with the bug fixes) and names its
ref, the branch the commit is checked out as, because the version string of
OpenMS is made from it. tools/ci/fetch_components.py fetches the components as
pinned before the build and records what it fetched.

Two more component modes:
- published core: the SDK and installer DEB of an OpenMS nightly or release
  from archive.openms.de, checked to be one build (version, GNU build IDs);
  the core is unpacked from the DEB into the staging prefix and add-ons built
  from source build against the SDK;
- artifact add-on: the runtime payload of an add-on's CI (e.g.
  MetaProSIP-payload-Linux-X64), pinned by sha256. cmake/stage_artifact.cmake
  checks checksum, platform, core build IDs against the staged core,
  inventory, overwritten files and duplicate registry names before staging.

CI tests the DEB as users get it: install-test installs it with APT into a
clean Ubuntu 24.04 container that gets only the DEB and MetaProSIP's fixtures
(read-only) and reproduces both reference CSVs of MetaProSIP's TOPP test with
the installed tool and FuzzyDiff (tools/ci/test_deb_install.sh), then does the
same in the runtime image (docker/Dockerfile); upgrade-test installs OpenMS
3.6.0, whose package still contains MetaProSIP, first. build-info.json records
the components, the DEB's checksum and the run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
- Staging a published core or an artifact again in the same build tree (a
  new pin, a package type added later, an earlier component staged again)
  failed: the artifact refused its own earlier files and deleted its payload
  before failing, and an earlier core's files stayed behind. Both now first
  remove what their earlier run staged (cmake/unstage_payload.cmake, only
  files still identical to what was copied), and their install steps depend
  on the DEB / payload files and the staging scripts.
- A payload is listed before it is unpacked: only regular files (and
  directories) inside the installation prefix, so no entry can write outside
  the directory it is unpacked to.
- Without fetch_components.py, a cloned source component is checked out as
  the branch 'ref' (right after the clone), so OpenMS gets the version string
  <version>-pre-<ref>-<date> instead of -pre-HEAD-.
- A source component needs a non-empty packaged_components again; it was
  silently left out of the package while the DEB replaced its package.
- DIST_OPENMS_CMAKE_ARGS with several arguments reached the core's configure
  as one argument.
- build-info.json records the commit that was built (on a pull request the
  merge commit), the ref, and the head of the pull request separately.
- Artifact downloads from other repositories use the secret
  DIST_ARTIFACT_TOKEN when set (the GITHUB_TOKEN covers this repository
  only), with an error naming it when the download fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
manifests/pilot-published-artifact.json: the OpenMS nightly 2026.12.03 (the
first nightly without MetaProSIP) as published core, OpenMS-TOPP-GUI from
source against its SDK, and the MetaProSIP payload that OpenMS-MetaProSIP's CI
built and tested against that nightly (run 47056224980, sha256 7d9d61a4).
Built with the manifest input of build.yml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
The record of an artifact add-on carried the artifact's name under "name",
and it was merged after the component's own name, so build-info.json listed
OpenMS-MetaProSIP as MetaProSIP-payload-Linux-X64 and fetch_fixtures.sh found
no OpenMS-MetaProSIP: the install and upgrade tests of the pilot
(manifests/pilot-published-artifact.json) failed before installing anything.
The artifact's name is recorded as artifact_name, and the component's name
and kind are now merged last, so no mode can replace them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0149aXmZhZtnMkPBQ7zPTrXN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants