Skip to content

Commit b705f43

Browse files
committed
Merge remote-tracking branch 'upstream/main'
2 parents 5e1d05e + e999bd0 commit b705f43

18 files changed

Lines changed: 2065 additions & 65 deletions
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Midstream cluster-free deploy contract checks. Runs the digest/Helm
2+
# regression suite for the Quay deploy script without a cluster, so PRs
3+
# touching the deploy path get automated validation. Kept separate from
4+
# branch-checks.yml so ODH does not depend on NVIDIA self-hosted runners.
5+
6+
name: ODH Deploy Contract
7+
8+
on:
9+
pull_request:
10+
paths:
11+
- odh/scripts/**
12+
- e2e/support/gateway-common.sh
13+
- e2e/rust/tests/odh/tier_plan.py
14+
- e2e/rust/tests/odh/tiers.toml
15+
- deploy/helm/openshell/ci/values-openshift-e2e.yaml
16+
- odh/values-openshift-e2e.yaml
17+
- deploy/docker/Dockerfile.konflux.e2e-odh
18+
- deploy/konflux/e2e-odh/**
19+
- renovate.json
20+
- tasks/test-odh.toml
21+
- .github/workflows/odh-deploy-contract.yml
22+
workflow_dispatch:
23+
24+
permissions:
25+
contents: read
26+
27+
concurrency:
28+
group: odh-deploy-contract-${{ github.ref }}
29+
cancel-in-progress: true
30+
31+
jobs:
32+
deploy-contract:
33+
name: Cluster-free deploy script contract
34+
runs-on: ubuntu-latest
35+
timeout-minutes: 10
36+
steps:
37+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
38+
with:
39+
persist-credentials: false
40+
41+
# The deploy plan resolver imports tomllib (Python 3.11+); pin the
42+
# interpreter so the check does not depend on the runner default.
43+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
44+
with:
45+
python-version: "3.12"
46+
47+
- name: Run the deploy digest contract suite
48+
run: bash odh/scripts/tests/test-openshell-deploy-from-quay.sh
49+
50+
- name: Verify generic-fetcher synchronization
51+
run: |
52+
python3 deploy/konflux/e2e-odh/sync-generic-fetcher.py --check
53+
python3 deploy/konflux/e2e-odh/sync-generic-fetcher_test.py

‎deploy/docker/Dockerfile.konflux.e2e-odh‎

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,33 @@
1313
# environment with awk. Every RUN must start at column 0 with `RUN ` and
1414
# use `&& \` continuations.
1515

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

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

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

2636
ARG NEXTEST_VERSION
37+
ARG UV_VERSION
2738
ARG TARGETARCH
2839
ARG OPENSHELL_VERSION=""
2940

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

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

7888
ARG OC_VERSION
7989
ARG HELM_VERSION
90+
ARG UV_VERSION
8091
ARG TARGETARCH
8192

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

@@ -115,6 +126,7 @@ COPY --chown=1001:1001 .config/ .config/
115126
COPY --chown=1001:1001 crates/ crates/
116127
COPY --chown=1001:1001 proto/ proto/
117128
COPY --from=builder --chown=1001:1001 /home/odh/openshell-e2e-odh/python/ python/
129+
COPY --chown=1001:1001 sdk/conformance/ sdk/conformance/
118130
COPY --chown=1001:1001 providers/ providers/
119131
COPY --chown=1001:1001 examples/ examples/
120132
COPY --chown=1001:1001 e2e/ e2e/

‎deploy/konflux/e2e-odh/README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,14 @@ The image name is `odh-openshell-e2e`; Konflux automation generates the
6363
Tekton YAML files.
6464
Before merging, validate the local hermetic build on both `linux/amd64` and
6565
`linux/arm64` using `PLATFORM` with `deploy/konflux/build-local.sh e2e-odh`.
66+
67+
`sync-generic-fetcher.py` keeps the Dockerfile tool versions and the Hermeto
68+
generic artifacts consistent. `--check` (offline) verifies that the URLs and
69+
filenames derive from the Dockerfile versions and that checksums are
70+
well-formed. `--update <tool>` recomputes checksums by downloading both
71+
architectures concurrently, retrying transient failures and comparing each
72+
hash with the publisher-provided checksum sidecar. This catches corruption or
73+
inconsistent responses, but the sidecar is not an independent trust root
74+
because it comes from the same origin as the artifact. Run it after a Renovate
75+
bump, as the PR note instructs. Nothing is written unless every download
76+
succeeds and matches its sidecar.

‎deploy/konflux/e2e-odh/generic-fetcher.yaml‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@
55
metadata:
66
version: "1.0"
77
artifacts:
8-
- download_url: https://github.com/astral-sh/uv/releases/download/0.11.29/uv-x86_64-unknown-linux-gnu.tar.gz
9-
checksum: "sha256:04f8b82f5d47f0512dcd32c67a4a6f16a0ea27c81537c338fd0ad6b23cebe829"
10-
filename: uv-x86_64-unknown-linux-gnu.tar.gz
11-
- download_url: https://github.com/astral-sh/uv/releases/download/0.11.29/uv-aarch64-unknown-linux-gnu.tar.gz
12-
checksum: "sha256:94500fb064ae3c971a873cba64d94694c50677e0a4dbf78735c80509e7429919"
13-
filename: uv-aarch64-unknown-linux-gnu.tar.gz
8+
- download_url: https://github.com/astral-sh/uv/releases/download/0.13.1/uv-x86_64-unknown-linux-gnu.tar.gz
9+
checksum: "sha256:eadd9d27c134ab5ac1ffd4473b97a741407f3ea238288f03121fc4deddf90220"
10+
filename: uv-0.13.1-x86_64-unknown-linux-gnu.tar.gz
11+
- download_url: https://github.com/astral-sh/uv/releases/download/0.13.1/uv-aarch64-unknown-linux-gnu.tar.gz
12+
checksum: "sha256:9041c73c99fdc5892cf128140beb354eca9231d502068cc36e6cb53a8e59ad14"
13+
filename: uv-0.13.1-aarch64-unknown-linux-gnu.tar.gz
14+
1415
- download_url: https://mirror.openshift.com/pub/openshift-v4/clients/ocp/4.20.0/openshift-client-linux-amd64-rhel9-4.20.0.tar.gz
1516
checksum: "sha256:dbc11aa32c8fa967c47c46900c524798b782b355615c9ca8ec2bbba647850420"
1617
filename: openshift-client-linux-amd64-rhel9-4.20.0.tar.gz

‎deploy/konflux/e2e-odh/rpms.in.yaml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ packages:
2323
- libxslt
2424
- util-linux
2525
- openssh-clients
26+
- openssl
2627
arches:
2728
- x86_64
2829
- aarch64

0 commit comments

Comments
 (0)