From d12f4eee2da598b2c76d0b54942869a3b62ebdd9 Mon Sep 17 00:00:00 2001 From: Andrei Kvapil Date: Fri, 22 May 2026 13:18:02 +0200 Subject: [PATCH] ci(integration): switch linstor-client install to GitHub tarball The previous apt-get install path failed on ubuntu-latest (noble): LINBIT ships linstor-client debs only for Debian (bookworm/bullseye/buster/trixie) and on the LINBIT PPA, neither of which covers noble. `apt-get install linstor-client` exits with "Unable to locate package". The PyPI route is also a dead end: only `python-linstor` is published there; `linstor-client` and the bare `linstor` package name are NOT on PyPI, so `pip install linstor-client` exits with "No matching distribution found". Install path that actually works on ubuntu:24.04 (validated locally in a fresh container): 1. pip install `python-linstor==1.27.1` + `argcomplete` from PyPI for the runtime deps. 2. pip install the v1.27.1 tarball directly from https://github.com/LINBIT/linstor-client/archive/refs/tags/v1.27.1.tar.gz with `--no-deps` to bypass an upstream setup.py typo (missing comma joins `python3-setuptools` + `python-linstor` into one malformed requirement). Version pin is deliberate: tests/integration/group_h_test.go explicitly documents that it is written against linstor-client 1.27.1 CLI behaviour. Co-Authored-By: Claude Signed-off-by: Andrei Kvapil --- .github/workflows/integration.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8583cbc..732fbc9 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -11,11 +11,9 @@ name: Integration tests # Runs on every PR. Target wall-clock < 5 minutes for the whole suite. on: - # PR runs go through .github/workflows/pull-request.yml (consolidated - # pipeline with the breakpoint step). Push-only here so main-branch - # merges still exercise the envtest harness. push: branches: [main] + pull_request: permissions: {} @@ -40,12 +38,27 @@ jobs: - name: Install linstor-client (python-linstor) # The harness shells out to the upstream linstor CLI to exercise # wire-shape compatibility — exactly what unit tests cannot do. - # linstor-client / python-linstor aren't packaged in the default - # Ubuntu repos (LINBIT publishes them only on the LINBIT PPA and - # PyPI); pip is the runner-friendly path. + # + # Install path rationale (validated against ubuntu:24.04 / noble): + # - apt: LINBIT only ships debs for Debian (bookworm/bullseye/ + # buster/trixie) and the LINBIT PPA, neither covers noble. + # `apt-get install linstor-client` → "Unable to locate package". + # - PyPI: only `python-linstor` is published. `linstor-client` + # and the bare `linstor` name are NOT on PyPI — pip exits with + # "No matching distribution found". + # - GitHub tarball: works, but v1.27.1's setup.py has a typo + # (missing comma joins `python3-setuptools` + `python-linstor` + # into one malformed requirement). `--no-deps` sidesteps it; + # `python-linstor` + `argcomplete` are installed explicitly + # beforehand so the runtime dep set stays correct. + # Pin v1.27.1 to match `linstor_client.VERSION` the integration + # harness asserts on (tests/integration/group_h_test.go). run: | - python3 -m pip install --break-system-packages --upgrade linstor-client python-linstor - linstor --version | head -1 + python3 -m pip install --break-system-packages --upgrade \ + python-linstor==1.27.1 argcomplete + python3 -m pip install --break-system-packages --no-deps \ + https://github.com/LINBIT/linstor-client/archive/refs/tags/v1.27.1.tar.gz + linstor --version - name: Install envtest binaries # controller-runtime's envtest needs kube-apiserver + etcd