You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Context
The check-generated-code CI job is failing on main and all PRs because
astral-sh/setup-uv@v7 installs version: "latest" (currently uv 0.10.6),
which produces different pylock.toml output than the committed files. The
root cause is astral-sh/uv#18081
(released in uv 0.10.5, 2026-02-23) which added wheel filtering to
pylock.toml even in --universal mode. See
opendatahub-io#3032.
Fix: pin uv version in uv.toml using required-version, remove
version: "latest" from all workflows so setup-uv auto-detects the pin,
and regenerate pylocks.
# Changes
1. Create uv.toml at repo root
required-version = "==0.10.6"
setup-uv@v7 auto-detects this and installs the pinned version.
Locally, uv errors if the running version doesn't match.
2. Update .github/workflows/code-quality.yaml
Two setup-uv blocks (lines 17-24 and 46-53):
- Remove version: "latest" line
- Rename step from "Install the latest version of uv" to "Install uv"
3. Update .github/workflows/docs.yaml
One setup-uv block (lines 21-28):
- Remove version: "latest" line
- Rename step
4. Update .github/workflows/security.yaml
One setup-uv block (lines 19-26):
- Remove version: "latest" line
- Rename step
5. Update .github/workflows/build-notebooks-TEMPLATE.yaml
One setup-uv block (lines 304-311):
- Remove version: "latest" line
- Rename step
6. Update ci/generate_code.sh
Line 4 has a fallback pip install "uv==0.9.6" — update to "uv==0.10.6"
to match the pinned version.
7. Regenerate pylocks
bash ci/generate_code.sh
This regenerates the 6 affected pylock.toml files with uv 0.10.6 filtering.
# Files modified
- uv.toml (new)
- .github/workflows/code-quality.yaml
- .github/workflows/docs.yaml
- .github/workflows/security.yaml
- .github/workflows/build-notebooks-TEMPLATE.yaml
- ci/generate_code.sh
- 6 pylock.*.toml files (regenerated)
# Verification
# Check that uv reads the required-version and doesn't error
uv version
# Regenerate and verify no diff
bash ci/generate_code.sh
git diff --stat # should show no changes after regeneration
* ISSUE opendatahub-io#3032: chore(uv): create a ./uv wrapper to run the correct version of uv
1. Pre-flight check (lines 93-100): Added explicit validation that $UV wrapper exists and is executable before the existing command -v uv check. This prevents a misleading version error if the wrapper
is missing.
2. Constraints flag (lines 291-316): Changed constraints_flag from a plain string to a bash array (local -a constraints_flag=()), and expanded it as "${constraints_flag[@]}" in the pip compile
invocation. This avoids word-splitting on paths containing spaces.
# Trivy does not support pylock.toml https://github.com/aquasecurity/trivy/discussions/9408
-**Install the exact version** so `uv` works directly:
95
+
```shell
96
+
# Standalone installer (any OS)
97
+
curl -LsSf https://astral.sh/uv/0.10.6/install.sh | sh
98
+
# Or with pip
99
+
pip install uv==0.10.6
100
+
```
101
+
102
+
If your system uv matches the pinned version, you can use `uv` directly —
103
+
`required-version` in `uv.toml` will let it through. If it doesn't match,
104
+
uv exits with a clear error telling you which version is required.
105
+
106
+
</details>
107
+
76
108
#### Running Python selftests in Pytest
77
109
By completing configuration in previous section, you are able to run any tests that don't need to start a container using following command:
78
110
@@ -106,15 +138,15 @@ sudo dnf install podman
106
138
systemctl --user start podman.service
107
139
systemctl --user status podman.service
108
140
systemctl --user status podman.socket
109
-
DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock uv run pytest tests/containers -m 'not openshift and not cuda and not rocm' --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
141
+
DOCKER_HOST=unix:///run/user/$UID/podman/podman.sock ./uv run pytest tests/containers -m 'not openshift and not cuda and not rocm' --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
110
142
111
143
# Mac OS
112
144
brew install podman
113
145
podman machine init
114
146
podman machine set --rootful=false
115
147
sudo podman-mac-helper install
116
148
podman machine start
117
-
uv run pytest tests/containers -m 'not openshift' --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
149
+
./uv run pytest tests/containers -m 'not openshift' --image quay.io/opendatahub/workbench-images@sha256:e98d19df346e7abb1fa3053f6d41f0d1fa9bab39e49b4cb90b510ca33452c2e4
118
150
```
119
151
120
152
When using lima on macOS, it might be useful to give yourself access to rootful podman socket
# The behavior has changed in uv 0.9.17 (https://github.com/astral-sh/uv/pull/16956)
282
+
# Tag filtering was added in uv 0.9.16 (https://github.com/astral-sh/uv/pull/16956)
283
+
# but bypassed in --universal mode. uv 0.10.5 (https://github.com/astral-sh/uv/pull/18081)
284
+
# now filters wheels by requires-python and marker disjointness even in --universal mode.
277
285
# Documentation at https://docs.astral.sh/uv/reference/cli/#uv-pip-compile--python-platform says that
278
286
# `--python-platform linux` is alias for `x86_64-unknown-linux-gnu`; we cannot use this to get a multiarch pylock
279
287
# Let's use --universal temporarily, and in the future we can switch to using uv.lock
@@ -285,17 +293,17 @@ for TARGET_DIR in "${TARGET_DIRS[@]}"; do
285
293
# Build constraints flag if CVE constraints file exists
286
294
# Use relative path to avoid absolute paths in pylock.toml headers
287
295
# (which would differ between CI and local environments)
288
-
local constraints_flag=""
296
+
local-a constraints_flag=()
289
297
if [[ -f"$CVE_CONSTRAINTS_FILE" ]];then
290
298
local relative_constraints
291
299
# Use Python for cross-platform relative path computation (realpath --relative-to is GNU-only)
0 commit comments