test(sbom): build e2e fixtures on the container-factory builder image - #323
Draft
reyreavman wants to merge 7 commits into
Draft
reyreavman wants to merge 7 commits into
reyreavman wants to merge 7 commits into
Conversation
…ilder Replace the werf.io node image with the container-factory distroless builder; os-pm installs node==24.18.0 in the packages stage and pnpm is bootstrapped through a preceding javascript-npm entry plus manager, mirroring yarn_manager. yarn_simple keeps yarn on PATH via npm -g in the builder so the default-manager path stays covered. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
os-pm installs python==3.12.12; poetry and uv are bootstrapped by a
python-pip entry with PIP_TARGET=/opt/tools and referenced via manager.
uv is pinned to 0.12.8: earlier releases refuse the static busybox
/bin/sh of the distroless base ("Could not read ELF interpreter").
The base-images python package ships pip3 without a bare pip, so the
builders add the symlink the python-pip default manager expects.
Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
…tory builder os-pm installs rust/cargo 1.96.0, golang 1.25.14 and lua 5.4.8 with luarocks 3.12.2. cargo additionally needs curl: the base-images cargo package links libcurl.so.4 without declaring it. type_change/state1 installs go in the builder instead, since the test asserts the SBOM has no os-pm component after switching from os-pm to go-mod. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
…tures The container-factory builder carries pm, so broken_pm now exercises the corrupted-index path it is named after instead of a missing binary, and the assertion pins pm's parse error. no_pm_binary removes pm explicitly. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
… in e2e fixtures Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
…binary The packages stage requires PACKAGES_VERSION before running pm; broken_pm relied on the base image default. no_pm_binary removes pm before the version is read. Update the type_change By text: golang is now an os-pm component of the builder, the assertion only covers jq. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
Collaborator
Author
Verification
CI status (run 34825204476)
Review focus
Follow-up
|
The base-images lua 5.4.8 package is compiled with AVX-512 instructions (zmm registers in /usr/bin/lua) and dies with "Illegal instruction" on the CI runners and on any CPU without AVX-512. lua 5.3.6 from the same index is a plain x86-64 build; the tests only assert that the rockspec is cataloged, so the interpreter version is incidental. Signed-off-by: Radmir Khurum <radmir.khurum@flant.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every SBOM e2e fixture now builds its trusted builder from the base-images
container-factorydistroless image instead ofregistry.werf.io/base/*,python:3.12-slim,debian:bookworm-slimorrust:1.78-slim. Language runtimes are installed by anos-pmpackagesentry and yarn/pnpm/poetry/uv are bootstrapped by a preceding npm/pip entry pluspackages[].manager, so the fixtures exercise the workflow #318 was built for.Kaiten: 68939510.
What
Fixtures
Dockerfile.builder-basestartFROM registry.deckhouse.io/container-factory@sha256:b9eb…withPACKAGES_VERSION=v3.0.2;grep registry.werf.io test/e2e/sbomis empty.os-pm node==24.18.0; pnpm and yarn come from atools/javascript-npmentry and are referenced viamanager: /opt/tools/node_modules/.bin/<tool>.npm install -g yarn@1.22.22in the builder) so the default-manager path stays covered next to yarn_manager.os-pm python==3.12.12; the tool comes from atools/requirements.txtpython-pipentry withPIP_TARGET=/opt/toolsandmanager: /opt/tools/bin/<tool>. poetry runs withPYTHONPATH=/opt/toolsandPOETRY_VIRTUALENVS_CREATE=false.Could not read ELF interpreter from any of the following paths: /bin/sh, …(busybox is static).ln -s pip3 /usr/bin/pip: the base-images python package shipspip3only, and thepython-pipdefault manager ispip.os-pm rust==1.96.0 cargo==1.96.0 curl==8.12.1; without curlcargodies withlibcurl.so.4: cannot open shared object file.os-pm golang==1.25.14. type_change/state1 installs go in the builder instead, because the test asserts the SBOM loses the os-pm component after the type switch.os-pm lua==5.3.6 luarocks==3.12.2. lua 5.4.8 from the same index is compiled with AVX-512 and dies withIllegal instructionon the CI runners; 5.3.6 is a plain x86-64 build.werf.yaml(multiplatform, signing_multiplatform, gost*, sbom_disabled, ospm_scratch_secrets) usefrom: scratchinstead ofregistry.werf.io/werf/scratch:latest.Tests
invalid character 'h' in literal trueon the corrupted/var/lib/pm/index.json; before, the ubuntu builder had no pm at all and the test duplicated no_pm_binary. The table is renamed accordingly and the assertion pinsinvalid character./usr/local/bin/pmfrom the container-factory builder and still fails withpm: command not found(exit 127).pkg:generic/node@24.18.0?containerfactoryversion=v3.0.2etc.); no assertion checks for their absence.Why
The card asks to stop relabelling third-party werf.io images as trusted builders. The container-factory builder image pins
PACKAGES_VERSION=v1.3.6, whosenodepackage linkslibsqlite3.sounversioned and does not start, and whose index lacks node 24; indexv3.0.2provides working node/python/rust/golang/lua, so the fixtures override the version. Shipping yarn, pnpm, poetry and uv as base-images packages (the alternative from the card comment) would make the fixtures depend on a base-images release; themanagerbootstrap needs nothing outside this repository and is the pattern #318 documents.