From 0842b8c6ba57acaf17fbb41aa7fa08d3dad204cb Mon Sep 17 00:00:00 2001 From: rldyourmnd Date: Thu, 3 Sep 2026 18:39:21 +0500 Subject: [PATCH] Preserve system Python beside the project toolchain --- config/golden-image-container-integration.yaml | 2 +- config/golden-image-container.yaml | 2 +- config/golden-image-integration.yaml | 2 +- config/golden-image.yaml | 2 +- internal/garmbootstrap/types.go | 10 +++++----- internal/imagebuild/assets/provision.sh | 7 ++++--- internal/imagebuild/assets/smoke-integration.sh | 2 ++ internal/imagebuild/assets/smoke.sh | 2 ++ internal/imagebuild/orchestrator_test.go | 2 +- internal/imagemanifest/manifest_test.go | 2 +- 10 files changed, 19 insertions(+), 14 deletions(-) diff --git a/config/golden-image-container-integration.yaml b/config/golden-image-container-integration.yaml index 74c5e17..bba3282 100644 --- a/config/golden-image-container-integration.yaml +++ b/config/golden-image-container-integration.yaml @@ -2,7 +2,7 @@ schema_version: 1 image: type: container - alias: nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b17 + alias: nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b18 current_alias: nddev-ubuntu-24.04-amd64-container-docker-current previous_alias: nddev-ubuntu-24.04-amd64-container-docker-previous source_alias: nddev-source-ubuntu-24.04-amd64-container-r20260801 diff --git a/config/golden-image-container.yaml b/config/golden-image-container.yaml index e2db9a8..9f8f065 100644 --- a/config/golden-image-container.yaml +++ b/config/golden-image-container.yaml @@ -2,7 +2,7 @@ schema_version: 1 image: type: container - alias: nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b23 + alias: nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b24 current_alias: nddev-ubuntu-24.04-amd64-container-current previous_alias: nddev-ubuntu-24.04-amd64-container-previous source_alias: nddev-source-ubuntu-24.04-amd64-container-r20260801 diff --git a/config/golden-image-integration.yaml b/config/golden-image-integration.yaml index 434a7b9..93b5fc8 100644 --- a/config/golden-image-integration.yaml +++ b/config/golden-image-integration.yaml @@ -1,7 +1,7 @@ schema_version: 1 image: - alias: nddev-ubuntu-24.04-amd64-docker-runner-2.336.0-r20260801-b18 + alias: nddev-ubuntu-24.04-amd64-docker-runner-2.336.0-r20260801-b19 current_alias: nddev-ubuntu-24.04-amd64-docker-current previous_alias: nddev-ubuntu-24.04-amd64-docker-previous source_alias: nddev-source-ubuntu-24.04-amd64-r20260801 diff --git a/config/golden-image.yaml b/config/golden-image.yaml index 281fe2d..8355419 100644 --- a/config/golden-image.yaml +++ b/config/golden-image.yaml @@ -1,7 +1,7 @@ schema_version: 1 image: - alias: nddev-ubuntu-24.04-amd64-runner-2.336.0-r20260801-b19 + alias: nddev-ubuntu-24.04-amd64-runner-2.336.0-r20260801-b20 current_alias: nddev-ubuntu-24.04-amd64-current previous_alias: nddev-ubuntu-24.04-amd64-previous source_alias: nddev-source-ubuntu-24.04-amd64-r20260801 diff --git a/internal/garmbootstrap/types.go b/internal/garmbootstrap/types.go index bad32ae..a28800c 100644 --- a/internal/garmbootstrap/types.go +++ b/internal/garmbootstrap/types.go @@ -36,17 +36,17 @@ const ( DefaultPoolBalancerType = "roundrobin" DefaultProviderName = "nddev-incus" DefaultImage = "nddev-ubuntu-24.04-amd64-container-current" - IntegrationImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b17" - PriorityStandardImage = "nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b23" - PriorityIntegrationImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b17" + IntegrationImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b18" + PriorityStandardImage = "nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b24" + PriorityIntegrationImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b18" // Every Linux class is an ephemeral Incus container. Docker-capable classes // use their nested-runtime image; release uses a separately stage-smoked // standard image so OIDC authority does not inherit Docker/nesting. FastImage = ContainerCanaryImage UntrustedImage = IntegrationImage - ReleaseImage = "nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b23" + ReleaseImage = "nddev-ubuntu-24.04-amd64-container-runner-2.336.0-r20260801-b24" ContainerCanaryImage = "nddev-ubuntu-24.04-amd64-container-current" - DockerContainerCanaryImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b17" + DockerContainerCanaryImage = "nddev-u24-amd64-ctr-docker-runner-2.336.0-r20260801-b18" DefaultFlavor = "nddev-linux-standard" IntegrationFlavor = "nddev-linux-integration" FastFlavor = "nddev-linux-fast" diff --git a/internal/imagebuild/assets/provision.sh b/internal/imagebuild/assets/provision.sh index 0f9e261..44ddc15 100644 --- a/internal/imagebuild/assets/provision.sh +++ b/internal/imagebuild/assets/provision.sh @@ -422,14 +422,15 @@ for toolchain_name in "${toolchain_names[@]}"; do "/opt/hostedtoolcache/Python/${toolchain_version}/x64.complete" ln -sfn "/opt/hostedtoolcache/Python/${toolchain_version}" "${python_runner_root}" chown -h runner:runner "${python_runner_root}" - for executable in python python3 pip pip3; do + # Keep python3/pip3 on Ubuntu's interpreter. Host automation imports + # apt-owned modules from it; replacing that command with the project + # interpreter makes a fully provisioned image less compatible, not more. + for executable in python pip; do target="${python_hosted_root}/bin/${executable}" if [[ ! -e "${target}" ]]; then case "${executable}" in python) target="${python_hosted_root}/bin/python3.14" ;; - python3) target="${python_hosted_root}/bin/python3.14" ;; pip) target="${python_hosted_root}/bin/pip3.14" ;; - pip3) target="${python_hosted_root}/bin/pip3.14" ;; esac fi ln -sfn "${target}" "/usr/local/bin/${executable}" diff --git a/internal/imagebuild/assets/smoke-integration.sh b/internal/imagebuild/assets/smoke-integration.sh index f54570d..63ce354 100644 --- a/internal/imagebuild/assets/smoke-integration.sh +++ b/internal/imagebuild/assets/smoke-integration.sh @@ -161,6 +161,8 @@ for smoke_toolchain in "${smoke_toolchain_names[@]}"; do [[ "$(runuser -u runner -- env HOME=/home/runner "${python_hosted_root}/bin/python3.14" --version)" == "Python ${expected_version}" ]] runuser -u runner -- env HOME=/home/runner "${python_hosted_root}/bin/python3.14" -m pip --version >/dev/null [[ "$(python --version)" == "Python ${expected_version}" ]] + [[ "$(python3 --version)" == "Python 3.12."* ]] + python3 -m pip --version >/dev/null ;; pnpm) [[ "$(pnpm --version)" == "${expected_version}" ]] ;; rustup) diff --git a/internal/imagebuild/assets/smoke.sh b/internal/imagebuild/assets/smoke.sh index 30deaa5..f468e7f 100644 --- a/internal/imagebuild/assets/smoke.sh +++ b/internal/imagebuild/assets/smoke.sh @@ -159,6 +159,8 @@ for smoke_toolchain in "${smoke_toolchain_names[@]}"; do [[ "$(runuser -u runner -- env HOME=/home/runner "${python_hosted_root}/bin/python3.14" --version)" == "Python ${expected_version}" ]] runuser -u runner -- env HOME=/home/runner "${python_hosted_root}/bin/python3.14" -m pip --version >/dev/null [[ "$(python --version)" == "Python ${expected_version}" ]] + [[ "$(python3 --version)" == "Python 3.12."* ]] + python3 -m pip --version >/dev/null ;; pnpm) [[ "$(pnpm --version)" == "${expected_version}" ]] ;; rustup) diff --git a/internal/imagebuild/orchestrator_test.go b/internal/imagebuild/orchestrator_test.go index b987a40..31bcf55 100644 --- a/internal/imagebuild/orchestrator_test.go +++ b/internal/imagebuild/orchestrator_test.go @@ -165,7 +165,7 @@ func TestRecipeFingerprintIsDeterministic(t *testing.T) { // coupling is the point: the alias is part of the recipe, so a manifest // whose contents changed under an unchanged alias would otherwise ask the // builder to produce different bytes for a name that is already promoted. - if first != "sha256:6595cdc1795927be79055c6bc5d7a834cd1bb63c1eaa13233b51973067515e22" { + if first != "sha256:1398675d254c1a054a25e88d7a0fe50271fb48191adcf1ed8e39a73c24c58e22" { t.Fatalf("deployed standard recipe fingerprint drifted: %q", first) } smoke, err := SmokeFingerprint(plan) diff --git a/internal/imagemanifest/manifest_test.go b/internal/imagemanifest/manifest_test.go index d838f09..f72c2b0 100644 --- a/internal/imagemanifest/manifest_test.go +++ b/internal/imagemanifest/manifest_test.go @@ -42,7 +42,7 @@ func TestRepositoryManifestIsValidAndPinned(t *testing.T) { if !strings.HasPrefix(fingerprint, "sha256:") || len(fingerprint) != len("sha256:")+64 { t.Fatalf("unexpected fingerprint %q", fingerprint) } - if fingerprint != "sha256:3ab8bc1630fe32db7b8e5943045e238c60b1f5ef129e4ac60aa69e9ae11c2f6c" { + if fingerprint != "sha256:155753285612c6a7ae6525cd8875ca22031c4f7b7e4f067837b07f77ea9beadf" { t.Fatalf("standard manifest fingerprint drifted: %q", fingerprint) } }