Skip to content

Commit 144bda7

Browse files
fix(images): pin the pip installed in the salt-master image
Every image build fails since pip 26.2 was published (2026-07-29 21:57 UTC): TypeError: InstallRequirement.install() got an unexpected keyword argument 'script_executable' Salt patches pip through relenv, and 26.2 changed the internals that patch relies on, so the `salt-pip install` that follows the unpinned `--upgrade pip` dies. The last green build of this branch (2026-07-28) still installed 26.1.2, the release before that one. Pin the upgrade to that version, declared in `versions.py` next to the other pinned versions and passed as a build argument like `SALT_VERSION`. Keep the upgrade itself: the pip bundled in the Salt onedir is too old to install the dependencies below it, which is why it was added when the image moved to `salt-pip` (7700955), losing the pin the previous pip install had. `SALT_MASTER_BUILD_ID` goes to 2, since the image content changes. `development/133.0` is not affected: it still installs the system pip with its own pin, so there is nothing to merge up.
1 parent 72f1e6e commit 144bda7

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

buildchain/buildchain/image.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ def _local_image(name: str, **kwargs: Any) -> targets.LocalImage:
274274
"BASE_IMAGE": versions.ROCKY_BASE_IMAGE,
275275
"BASE_IMAGE_SHA256": versions.ROCKY_BASE_IMAGE_9_SHA256,
276276
"SALT_VERSION": versions.SALT_VERSION,
277+
"PIP_VERSION": versions.PIP_VERSION,
277278
},
278279
),
279280
_local_image(

buildchain/buildchain/versions.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,14 @@ def load_version_information() -> None:
7575
"e1d0a9f5ed99d52e7faf03afe7ee32e48b231c4dd9586808b3d1aedf894dff04"
7676
)
7777

78+
# pip installed in the Salt onedir of the salt-master image. Pinned because
79+
# Salt patches pip through relenv: pip 26.2 changed the internals that patch
80+
# relies on, so `salt-pip install` fails with
81+
# `InstallRequirement.install() got an unexpected keyword argument
82+
# 'script_executable'`. Bump only after checking that `salt-pip` still works
83+
# with the Salt version above.
84+
PIP_VERSION: str = "26.1.2"
85+
7886
ETCD_VERSION: str = "3.6.11"
7987
ETCD_IMAGE_VERSION: str = f"{ETCD_VERSION}-0"
8088
NGINX_IMAGE_VERSION: str = "1.31.2-alpine"
@@ -88,7 +96,7 @@ def load_version_information() -> None:
8896
# installed in the image needs to be updated.
8997
# This should be reset to 1 when the service exposed by the container changes
9098
# version.
91-
SALT_MASTER_BUILD_ID = 1
99+
SALT_MASTER_BUILD_ID = 2
92100

93101

94102
def _version_prefix(version: str, prefix: str = "v") -> str:

images/salt-master/Dockerfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ FROM ${BASE_IMAGE}@sha256:${BASE_IMAGE_SHA256}
66

77
# Versions to use
88
ARG SALT_VERSION
9+
ARG PIP_VERSION
910

1011
# Install Saltstack and other dependencies
1112
RUN curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/download/salt.repo > /etc/yum.repos.d/salt.repo \
@@ -19,7 +20,11 @@ RUN curl -fsSL https://github.com/saltstack/salt-install-guide/releases/latest/d
1920
openssh-clients procps-ng \
2021
dnf \
2122
glibc-all-langpacks langpacks-en \
22-
&& salt-pip install --no-cache-dir --upgrade pip \
23+
# The bundled pip is too old to install the dependencies below, but the
24+
# latest one cannot be used either: Salt patches pip through relenv, and
25+
# pip 26.2 changed the internals that patch relies on, which breaks every
26+
# later `salt-pip install`. Hence a pinned upgrade.
27+
&& salt-pip install --no-cache-dir --upgrade "pip==${PIP_VERSION}" \
2328
&& salt-pip install --no-cache-dir "etcd3gw ~= 2.6.0" "kubernetes ~= 33.1.0" \
2429
&& microdnf clean all
2530

0 commit comments

Comments
 (0)