Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions deploy/docker/Dockerfile.konflux.e2e-odh
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,33 @@
# environment with awk. Every RUN must start at column 0 with `RUN ` and
# use `&& \` continuations.

# Tool versions are the source of truth for generic-fetcher.yaml. Renovate
# updates annotated versions in both files; then run
# `deploy/konflux/e2e-odh/sync-generic-fetcher.py --update` to refresh the
# amd64 and arm64 checksums.
# renovate: datasource=docker depName=quay.io/openshift-release-dev/ocp-release extractVersion=^(?<version>4\.\d+\.\d+)-x86_64$
ARG OC_VERSION=4.20.0
# renovate: datasource=github-releases depName=helm/helm extractVersion=^v(?<version>.+)$
ARG HELM_VERSION=4.2.0
# renovate: datasource=github-releases depName=nextest-rs/nextest extractVersion=^cargo-nextest-(?<version>.+)$
ARG NEXTEST_VERSION=0.9.143
# renovate: datasource=github-releases depName=astral-sh/uv
ARG UV_VERSION=0.11.29

FROM registry.redhat.io/rust-builder-image/rust-rhel9:1.99.0@sha256:b00aaa63f7d6f5b857c170e4aed9d77f013f507ba97e72ebfcac48a7d3760310 AS builder

# The builder image runs as 1001 and already ships gcc, gcc-c++, make,
# cmake, openssl-devel, git and tar, so no dnf step. Root writes /usr/local/bin.
# cmake, openssl-devel, git and tar. Install Python for the locked E2E test
# environment; root writes /usr/local/bin.
USER 0

ARG NEXTEST_VERSION
ARG UV_VERSION
ARG TARGETARCH
ARG OPENSHELL_VERSION=""

RUN dnf install -y --nodocs --setopt=install_weak_deps=0 python3.11 && \
dnf clean all

RUN dnf install -y --nodocs --setopt=install_weak_deps=0 python3.11 \
&& dnf clean all
RUN RUST_ARCH=$(case "${TARGETARCH}" in amd64) echo x86_64;; arm64) echo aarch64;; *) exit 1;; esac) && \
RUST_TRIPLE="${RUST_ARCH}-unknown-linux-gnu" && \
tar xzf "/cachi2/output/deps/generic/cargo-nextest-${NEXTEST_VERSION}-${RUST_TRIPLE}.tar.gz" \
Expand Down Expand Up @@ -64,7 +74,7 @@ RUN VER="${OPENSHELL_VERSION#v}" && \
--archive-file /opt/openshell/e2e-odh.tar.zst

RUN UV_ARCH=$(case "${TARGETARCH}" in amd64) echo x86_64;; arm64) echo aarch64;; *) exit 1;; esac) && \
tar xzf "/cachi2/output/deps/generic/uv-${UV_ARCH}-unknown-linux-gnu.tar.gz" \
tar xzf "/cachi2/output/deps/generic/uv-${UV_VERSION}-${UV_ARCH}-unknown-linux-gnu.tar.gz" \
-C /tmp && \
install -m 0555 "/tmp/uv-${UV_ARCH}-unknown-linux-gnu/uv" /usr/local/bin/uv
COPY odh/requirements.txt /tmp/requirements.txt
Expand All @@ -77,6 +87,7 @@ FROM registry.access.redhat.com/ubi9/ubi:9.8@sha256:25a147defd01e19674714f55d175

ARG OC_VERSION
ARG HELM_VERSION
ARG UV_VERSION
ARG TARGETARCH

RUN dnf install -y --nodocs --setopt=install_weak_deps=0 \
Expand All @@ -101,7 +112,7 @@ RUN OC_ARCH=$(case "${TARGETARCH}" in amd64) echo amd64;; arm64) echo arm64;; *)
tar xzf "/cachi2/output/deps/generic/helm-v${HELM_VERSION}-linux-${OC_ARCH}.tar.gz" \
-C /tmp/helm && \
install -m 0555 "/tmp/helm/linux-${OC_ARCH}/helm" /usr/local/bin/helm && \
tar xzf "/cachi2/output/deps/generic/uv-${UV_ARCH}-unknown-linux-gnu.tar.gz" \
tar xzf "/cachi2/output/deps/generic/uv-${UV_VERSION}-${UV_ARCH}-unknown-linux-gnu.tar.gz" \
-C /tmp && \
install -m 0555 "/tmp/uv-${UV_ARCH}-unknown-linux-gnu/uv" /usr/local/bin/uv

Expand All @@ -113,6 +124,7 @@ COPY --chown=1000:1000 .config/ .config/
COPY --chown=1000:1000 crates/ crates/
COPY --chown=1000:1000 proto/ proto/
COPY --from=builder --chown=1000:1000 /home/odh/openshell-e2e-odh/python/ python/
COPY --chown=1000:1000 sdk/conformance/ sdk/conformance/
COPY --chown=1000:1000 providers/ providers/
COPY --chown=1000:1000 examples/ examples/
COPY --chown=1000:1000 e2e/ e2e/
Expand Down
40 changes: 38 additions & 2 deletions deploy/konflux/e2e-odh/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ client mTLS material is stored in a mode `0700` directory with mode `0600`
files. The Rust tests consume the deployed gateway.

The image also carries a fully prefetched Python 3.11 test environment and
generated protobuf bindings, so later named Python test modes can execute
without runtime dependency downloads.
generated protobuf bindings, so the `sdk` and `gateway-e2e` Python test modes
run without runtime dependency downloads. See
[Python test modes](../../../e2e/rust/tests/odh/README.md#python-test-modes)
for their invocation, reports, and environment gates.

Konflux onboarding must use the `linux-m2xlarge/*` builders and retain the
three Hermeto prefetch inputs: Cargo at `.` and `e2e/rust`, plus the locked
Expand All @@ -44,3 +46,37 @@ The image name is `odh-openshell-e2e`; Konflux automation generates the
Tekton YAML files.
Before merging, validate the local hermetic build on both `linux/amd64` and
`linux/arm64` using `PLATFORM` with `deploy/konflux/build-local.sh e2e-odh`.

## Dependency maintenance

MintMaker, the Konflux Renovate service, maintains the image inputs:

| Input | Source of truth | Updates |
|---|---|---|
| UBI base image | `FROM` lines in `deploy/docker/Dockerfile.konflux.e2e-odh` | Renovate tag and digest updates |
| `oc`, Helm, cargo-nextest, uv | `# renovate:`-annotated `ARG <TOOL>_VERSION` lines in the Dockerfile | Renovate updates the Dockerfile and `generic-fetcher.yaml` in one PR, without automerge |
| Rust | Digest-pinned `rust-rhel9` builder `FROM` line | Renovate tracks its tag and digest; updates require review and two-architecture hermetic builds |
| RPMs | `rpms.in.yaml` and `rpms.lock.yaml` | MintMaker lock file maintenance |
| Python test dependencies | `odh/requirements.in` and the hash-pinned `odh/requirements.txt` | Regenerate with the command in `requirements.in` |

Renovate cannot recompute the SHA-256 checksums in `generic-fetcher.yaml`,
so a tool update fails the hermetic build until they are refreshed. Download
both architectures and rewrite the checksums with:

```shell
deploy/konflux/e2e-odh/sync-generic-fetcher.py --update <uv|oc|helm|nextest>
```

The Dockerfile `ARG` versions are the source of truth for the artifact URLs
and filenames. Check that `generic-fetcher.yaml` matches them for both
architectures, without network access, with:

```shell
mise run konflux:e2e-odh:check-pins
```

A UBI base update can change the available RPM versions. Regenerate
`rpms.lock.yaml` with the command in `rpms.in.yaml` when the hermetic build
reports a missing package, or wait for the next lock file maintenance PR.
The uv version in the image is independent of the developer toolchain version
in `mise.toml`.
4 changes: 2 additions & 2 deletions deploy/konflux/e2e-odh/generic-fetcher.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ metadata:
artifacts:
- download_url: https://github.com/astral-sh/uv/releases/download/0.11.29/uv-x86_64-unknown-linux-gnu.tar.gz
checksum: "sha256:04f8b82f5d47f0512dcd32c67a4a6f16a0ea27c81537c338fd0ad6b23cebe829"
filename: uv-x86_64-unknown-linux-gnu.tar.gz
filename: uv-0.11.29-x86_64-unknown-linux-gnu.tar.gz
- download_url: https://github.com/astral-sh/uv/releases/download/0.11.29/uv-aarch64-unknown-linux-gnu.tar.gz
checksum: "sha256:94500fb064ae3c971a873cba64d94694c50677e0a4dbf78735c80509e7429919"
filename: uv-aarch64-unknown-linux-gnu.tar.gz
filename: uv-0.11.29-aarch64-unknown-linux-gnu.tar.gz
- download_url: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.20.0/openshift-client-linux-amd64-rhel9-4.20.0.tar.gz
checksum: "sha256:dbc11aa32c8fa967c47c46900c524798b782b355615c9ca8ec2bbba647850420"
filename: openshift-client-linux-amd64-rhel9-4.20.0.tar.gz
Expand Down
1 change: 1 addition & 0 deletions deploy/konflux/e2e-odh/rpms.in.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ packages:
- libxslt
- util-linux
- openssh-clients
- openssl
arches:
- x86_64
- aarch64
Expand Down
Loading
Loading