Repository navigation
fix: install cargo-nextest in bootstrap so make bootstrap && make test works - #10372
Conversation
|
Pushed Note: on Alpine the musl sdist build here needs |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7541602ada
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cc301a6c8d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #10372 +/- ##
==========================================
- Coverage 81.67% 81.66% -0.02%
==========================================
Files 561 561
Lines 75410 75410
Branches 30478 30478
==========================================
- Hits 61591 61581 -10
- Misses 13531 13541 +10
Partials 288 288
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Fixed the red CI ( |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6eb05d29ff
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| # `make bootstrap` also covers the pytest flow (tests/deps/setup_rejson.sh | ||
| # builds RedisJSON through readies, which needs a python3 with pip — the | ||
| # venv provides one). Runs from the repo root, where the uv project lives. | ||
| (cd "$(dirname "${BASH_SOURCE[0]}")/.." && bash .install/test_deps/install_python_deps.sh $MODE) |
There was a problem hiding this comment.
Avoid syncing Python deps in the trimmed Docker context
When the cached CI image is built, Dockerfile runs install_script.sh after COPY . ., but .dockerignore still sends only .install/** plus a few version files and omits pyproject.toml, uv.lock, and tests/pytests/pyproject.toml. This new unconditional call therefore reaches uv sync --locked --all-packages in /project without the uv project metadata and breaks docker build/the cached-container build path; either keep this step out of the Docker image setup or include the required uv workspace files in the build context.
Useful? React with 👍 / 👎.
| # `make bootstrap` also covers the pytest flow (tests/deps/setup_rejson.sh | ||
| # builds RedisJSON through readies, which needs a python3 with pip — the | ||
| # venv provides one). Runs from the repo root, where the uv project lives. | ||
| (cd "$(dirname "${BASH_SOURCE[0]}")/.." && bash .install/test_deps/install_python_deps.sh $MODE) |
There was a problem hiding this comment.
Avoid modifying users' shell startup files from bootstrap
In a normal local make bootstrap, this new call runs install_python_deps.sh, whose activate_venv appends this checkout's .venv activation to ~/.bashrc/~/.bash_profile (and a relative .venv activation on macOS). After bootstrapping, every new shell is forced into the RediSearch venv or emits activation errors outside the repo, even though this PR also activates the venv directly in setup_rejson.sh; keep the profile mutation out of the default bootstrap path or gate it to the CI/test-deps flow that needs it.
Useful? React with 👍 / 👎.
|
Pushed |
…st' works 'make test' (and 'make rust-tests') runs the Rust suite via 'cargo nextest', but 'make bootstrap' only provisioned the toolchain — on a fresh machine the documented bootstrap -> test flow dies with "error: no such command: `nextest`" after all C/C++ unit tests pass. CI never sees this because it provisions nextest separately via .install/test_deps/install_rust_deps.sh; consumers following the manual (e.g. the redis/redis bundled-modules flow) do. Install the pinned prebuilt from install_rust.sh: statically-linked musl artifact on Linux (glibc-independent, same preference test_deps documents for its binstall fallbacks), universal binary on macOS. Idempotent like the cheadergen block. The pin moves to a .nextest-version file (like .rust-nightly / .cheadergen-version) and test_deps/install_rust_deps.sh reads the same file, so the two paths cannot drift. Verified in clean debian:bookworm (glibc) and alpine:3 (musl) containers: fresh run installs and 'cargo nextest --version' reports 0.9.130; a second run skips. Co-Authored-By: Claude Fable 5 <[email protected]>
…est' works make test's pytest phase builds RedisJSON@master through readies, which needs a pip-capable python3; make bootstrap never ran the python test-deps installer (same bootstrap-vs-test-deps gap the nextest fix closed for Rust). Verified end-to-end in a clean container: unit + Rust + pytest phases all execute. - install_script.sh: run test_deps/install_python_deps.sh so a plain make bootstrap also seeds the pip-capable uv venv + RLTest. - setup_rejson.sh: activate the repo venv when the caller hasn't, so the readies-driven RedisJSON build gets a python3 with pip (PEP 668 system interpreters lack it). - install_python_deps.sh: on musl (Alpine) uv's standalone CPython is clang-built and bakes clang-only flags into sysconfig, breaking gcc sdist builds — build sdists with clang and pin the venv to cp313, the newest CPython with musllinux wheels for the heavy scientific deps (numpy/scipy) so nothing large compiles from source. Co-Authored-By: Claude Fable 5 <[email protected]>
The image-build .dockerignore ignores '*' and re-includes only specific files; .rust-nightly and .cheadergen-version are listed but the new .nextest-version (read by install_rust.sh) was not, so 'COPY . .' dropped it and the image build failed with 'cat: /project/.nextest-version: No such file or directory'. Add it alongside the other version files. Co-Authored-By: Claude Fable 5 <[email protected]>
…rch64-musl ml-dtypes (a redisearch pytest dep, no musllinux wheel) source-builds with clang --rtlib=compiler-rt; without the compiler-rt package clang can't find libclang_rt.builtins-aarch64.a and the link fails, so 'make test all' could not run on arm64 Alpine. Verified: with compiler-rt, ml-dtypes==0.5.3 builds cleanly on alpine:3.23 aarch64. Co-Authored-By: Claude Fable 5 <[email protected]>
137884c to
e5f0783
Compare
|
#10372 set UV_PYTHON=3.13 on Alpine (for prebuilt scipy/numpy musl wheels) but only in install_python_deps.sh's own process. The test harness later runs `uv run python3 -m RLTest`; `uv run` re-provisions the venv and, without UV_PYTHON in scope, falls back to the system CPython 3.12, relinking .venv. pip was installed under python3.13/site-packages, so the 3.12 interpreter can't import it and RedisJSON's readies getpy3 (`python3 -m pip --version`) fails with 'Cannot find python3 interpreter', taking down make pytest — every Alpine 3.23 flow-test job since 2026-07-13. Persist UV_PYTHON=3.13 to $GITHUB_ENV so every uv invocation in the job stays on 3.13 and the venv can't drift to system 3.12. Keeps #10372's wheel benefit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…v sync (RediSearch#10457) * [MOD-16514] fix Alpine flow tests: re-bootstrap venv pip after uv sync PR RediSearch#10372 set UV_PYTHON=3.13 on Alpine to get prebuilt scipy/numpy musl wheels. Side effect: on uv's standalone musl CPython, the venv ends up without an importable `python3 -m pip` after `uv sync` (though `uv run pip` works). RedisJSON's build runs readies `getpy3`, whose CHECK is `python3 -m pip --version`, so it fails with "Cannot find python3 interpreter" and takes down `make pytest` — breaking every Alpine 3.23 flow-test job in periodic/nightly validation since 2026-07-13. Re-bootstrap pip from the stdlib via `python -m ensurepip --upgrade` on Alpine after `uv sync`, restoring a working `python3 -m pip`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [DEBUG MOD-16514] instrument Alpine venv/pip state (temporary) Remove the ineffective ensurepip line (uv run re-syncs it away) and add diagnostic dumps at install_python_deps end + before RedisJSON make to capture why python3 -m pip is import-broken only in CI. To be reverted. * [DEBUG] sharper pip probe at RedisJSON build (temporary) * [MOD-16514] fix Alpine flow tests: persist UV_PYTHON=3.13 across the job RediSearch#10372 set UV_PYTHON=3.13 on Alpine (for prebuilt scipy/numpy musl wheels) but only in install_python_deps.sh's own process. The test harness later runs `uv run python3 -m RLTest`; `uv run` re-provisions the venv and, without UV_PYTHON in scope, falls back to the system CPython 3.12, relinking .venv. pip was installed under python3.13/site-packages, so the 3.12 interpreter can't import it and RedisJSON's readies getpy3 (`python3 -m pip --version`) fails with 'Cannot find python3 interpreter', taking down make pytest — every Alpine 3.23 flow-test job since 2026-07-13. Persist UV_PYTHON=3.13 to $GITHUB_ENV so every uv invocation in the job stays on 3.13 and the venv can't drift to system 3.12. Keeps RediSearch#10372's wheel benefit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…st` works (#10372) * fix: install cargo-nextest in bootstrap so 'make bootstrap && make test' works 'make test' (and 'make rust-tests') runs the Rust suite via 'cargo nextest', but 'make bootstrap' only provisioned the toolchain — on a fresh machine the documented bootstrap -> test flow dies with "error: no such command: `nextest`" after all C/C++ unit tests pass. CI never sees this because it provisions nextest separately via .install/test_deps/install_rust_deps.sh; consumers following the manual (e.g. the redis/redis bundled-modules flow) do. Install the pinned prebuilt from install_rust.sh: statically-linked musl artifact on Linux (glibc-independent, same preference test_deps documents for its binstall fallbacks), universal binary on macOS. Idempotent like the cheadergen block. The pin moves to a .nextest-version file (like .rust-nightly / .cheadergen-version) and test_deps/install_rust_deps.sh reads the same file, so the two paths cannot drift. Verified in clean debian:bookworm (glibc) and alpine:3 (musl) containers: fresh run installs and 'cargo nextest --version' reports 0.9.130; a second run skips. Co-Authored-By: Claude Fable 5 <[email protected]> * bootstrap: provision the python test env so 'make bootstrap && make test' works make test's pytest phase builds RedisJSON@master through readies, which needs a pip-capable python3; make bootstrap never ran the python test-deps installer (same bootstrap-vs-test-deps gap the nextest fix closed for Rust). Verified end-to-end in a clean container: unit + Rust + pytest phases all execute. - install_script.sh: run test_deps/install_python_deps.sh so a plain make bootstrap also seeds the pip-capable uv venv + RLTest. - setup_rejson.sh: activate the repo venv when the caller hasn't, so the readies-driven RedisJSON build gets a python3 with pip (PEP 668 system interpreters lack it). - install_python_deps.sh: on musl (Alpine) uv's standalone CPython is clang-built and bakes clang-only flags into sysconfig, breaking gcc sdist builds — build sdists with clang and pin the venv to cp313, the newest CPython with musllinux wheels for the heavy scientific deps (numpy/scipy) so nothing large compiles from source. Co-Authored-By: Claude Fable 5 <[email protected]> * bootstrap: harden nextest and Alpine Python setup * ci: allowlist .nextest-version in .dockerignore The image-build .dockerignore ignores '*' and re-includes only specific files; .rust-nightly and .cheadergen-version are listed but the new .nextest-version (read by install_rust.sh) was not, so 'COPY . .' dropped it and the image build failed with 'cat: /project/.nextest-version: No such file or directory'. Add it alongside the other version files. Co-Authored-By: Claude Fable 5 <[email protected]> * bootstrap: skip Python test deps in Docker image setup * bootstrap(alpine): install compiler-rt so clang links test deps on aarch64-musl ml-dtypes (a redisearch pytest dep, no musllinux wheel) source-builds with clang --rtlib=compiler-rt; without the compiler-rt package clang can't find libclang_rt.builtins-aarch64.a and the link fails, so 'make test all' could not run on arm64 Alpine. Verified: with compiler-rt, ml-dtypes==0.5.3 builds cleanly on alpine:3.23 aarch64. Co-Authored-By: Claude Fable 5 <[email protected]> * ci: run cargo-deny license check directly --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: oshadmi <[email protected]>
…v sync (#10457) * [MOD-16514] fix Alpine flow tests: re-bootstrap venv pip after uv sync PR #10372 set UV_PYTHON=3.13 on Alpine to get prebuilt scipy/numpy musl wheels. Side effect: on uv's standalone musl CPython, the venv ends up without an importable `python3 -m pip` after `uv sync` (though `uv run pip` works). RedisJSON's build runs readies `getpy3`, whose CHECK is `python3 -m pip --version`, so it fails with "Cannot find python3 interpreter" and takes down `make pytest` — breaking every Alpine 3.23 flow-test job in periodic/nightly validation since 2026-07-13. Re-bootstrap pip from the stdlib via `python -m ensurepip --upgrade` on Alpine after `uv sync`, restoring a working `python3 -m pip`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [DEBUG MOD-16514] instrument Alpine venv/pip state (temporary) Remove the ineffective ensurepip line (uv run re-syncs it away) and add diagnostic dumps at install_python_deps end + before RedisJSON make to capture why python3 -m pip is import-broken only in CI. To be reverted. * [DEBUG] sharper pip probe at RedisJSON build (temporary) * [MOD-16514] fix Alpine flow tests: persist UV_PYTHON=3.13 across the job #10372 set UV_PYTHON=3.13 on Alpine (for prebuilt scipy/numpy musl wheels) but only in install_python_deps.sh's own process. The test harness later runs `uv run python3 -m RLTest`; `uv run` re-provisions the venv and, without UV_PYTHON in scope, falls back to the system CPython 3.12, relinking .venv. pip was installed under python3.13/site-packages, so the 3.12 interpreter can't import it and RedisJSON's readies getpy3 (`python3 -m pip --version`) fails with 'Cannot find python3 interpreter', taking down make pytest — every Alpine 3.23 flow-test job since 2026-07-13. Persist UV_PYTHON=3.13 to $GITHUB_ENV so every uv invocation in the job stays on 3.13 and the venv can't drift to system 3.12. Keeps #10372's wheel benefit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…v sync (#10457) * [MOD-16514] fix Alpine flow tests: re-bootstrap venv pip after uv sync PR #10372 set UV_PYTHON=3.13 on Alpine to get prebuilt scipy/numpy musl wheels. Side effect: on uv's standalone musl CPython, the venv ends up without an importable `python3 -m pip` after `uv sync` (though `uv run pip` works). RedisJSON's build runs readies `getpy3`, whose CHECK is `python3 -m pip --version`, so it fails with "Cannot find python3 interpreter" and takes down `make pytest` — breaking every Alpine 3.23 flow-test job in periodic/nightly validation since 2026-07-13. Re-bootstrap pip from the stdlib via `python -m ensurepip --upgrade` on Alpine after `uv sync`, restoring a working `python3 -m pip`. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * [DEBUG MOD-16514] instrument Alpine venv/pip state (temporary) Remove the ineffective ensurepip line (uv run re-syncs it away) and add diagnostic dumps at install_python_deps end + before RedisJSON make to capture why python3 -m pip is import-broken only in CI. To be reverted. * [DEBUG] sharper pip probe at RedisJSON build (temporary) * [MOD-16514] fix Alpine flow tests: persist UV_PYTHON=3.13 across the job #10372 set UV_PYTHON=3.13 on Alpine (for prebuilt scipy/numpy musl wheels) but only in install_python_deps.sh's own process. The test harness later runs `uv run python3 -m RLTest`; `uv run` re-provisions the venv and, without UV_PYTHON in scope, falls back to the system CPython 3.12, relinking .venv. pip was installed under python3.13/site-packages, so the 3.12 interpreter can't import it and RedisJSON's readies getpy3 (`python3 -m pip --version`) fails with 'Cannot find python3 interpreter', taking down make pytest — every Alpine 3.23 flow-test job since 2026-07-13. Persist UV_PYTHON=3.13 to $GITHUB_ENV so every uv invocation in the job stays on 3.13 and the venv can't drift to system 3.12. Keeps #10372's wheel benefit. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> (cherry picked from commit 582160a)
…ml changes (#15442) Follow-up to #15253 (bundled data-type modules). Adds a GitHub Actions workflow (`.github/workflows/modules-build-flow.yml`) that replays the from-source flow documented in [modules/README.md](https://github.com/redis/redis/blob/unstable/modules/README.md) on **every OS the bundled modules support** — the same 15-OS list the modules' own nightlies build against — across **x64 and arm64**, each in a **clean stock container** (no Dockerfiles): ``` make modules-update # clone each module pinned in modules.yaml make bootstrap # per-module build/test prereqs make -j all BUILD_TLS=yes # Redis + all modules (LTO=1 via redisearch build_env) ./src/redis-server redis-full.conf + redis-cli MODULE LIST # smoke test ``` ### When it runs - **On pull requests that change `modules/modules.yaml`.** Bumping a module's pinned `ref` is exactly when the from-source build/load can break on some OS, so the whole matrix re-verifies then. On a PR it checks out the PR merge ref, so it builds the **bumped pins**, not `unstable` (works for fork PRs too). - **`workflow_dispatch`** for manual runs, with `use_repo`/`use_git_ref` inputs to point at any repo/branch. It **builds and smoke-tests only** — starts the server and asserts `MODULE LIST` contains `bf`/`search`/`ReJSON`/`timeseries`. It does **not** run the per-module `make test all` suites; those live in each module's own CI. ### Design - **Clean containers, no Dockerfiles** — one matrix job per `arch × osnick`; every image is a stock multi-arch base (ubuntu/debian/alma/rocky/amazonlinux/azurelinux/alpine). - **Prereqs = only what the manual assumes present** before its first command (git, make, CA certs; `gawk`/`findutils` on minimal rpm images; `bash` on alpine; `openssl` + dev headers). Compilers and per-module toolchains must come from `make bootstrap` — if they don't, the manual is broken on that OS and this workflow catches exactly that. - **`BUILD_TLS=yes`** — the README's documented full-build flag (redisearch's TLS test env expects it). - **No node-based actions inside containers** (plain `git clone`) — they can't start on older-glibc images. ### Validation Ran the full matrix on a fork against the upcoming module refs (redisearch + redistimeseries at `master`, i.e. post-RediSearch#10372): **30/30 jobs green** across all 15 OSes on both arches — build + `MODULE LIST` smoke (fork Actions run `29747001924`). Once `modules.yaml` is bumped to the retagged versions carrying the merged bootstrap/LTO fixes (RediSearch [#10372](RediSearch/RediSearch#10372) / [#10373](RediSearch/RediSearch#10373), RedisTimeSeries [#2089](RedisTimeSeries/RedisTimeSeries#2089)), the matrix is green with no per-module workarounds in the workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Adds CI-only automation with no changes to Redis runtime, auth, or data paths. > > **Overview** > Adds **`.github/workflows/modules-build-flow.yml`**, a GitHub Actions workflow that replays the documented from-source modules flow (`make modules-update` → `make bootstrap` → `make all BUILD_TLS=yes`) inside **stock** container images on **x64 and arm64** across **15 OS variants** (Ubuntu, Debian, Alma/Rocky, Amazon Linux 2023, Azure Linux 3, Alpine). > > It runs on **PRs that touch `modules/modules.yaml`** and on **`workflow_dispatch`** (optional repo/ref). Each job installs only the manual’s baseline packages (git, make, TLS/openssl tooling, etc.), uses a **plain `git fetch` checkout** (including the PR merge ref on path-filtered PRs) instead of `actions/checkout`, then **starts `redis-server` with `redis-full.conf`** and asserts **`MODULE LIST`** includes **bf**, **search**, **ReJSON**, and **timeseries**. > > The workflow also encodes several container-specific fixes: pinned **`PATH`** after bootstrap, job-level **`CXXFLAGS`** for GCC/clang `-Werror` noise, **`rm /.dockerenv`** so module bootstrap installs test Python envs, and **tdnf install retries** on Azure Linux. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 80d2e37. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Fable 5 <[email protected]> Co-authored-by: TalBarYakar <[email protected]>



Problem
make test(andmake rust-tests) runs the Rust suite viacargo nextest, butmake bootstraponly provisions the toolchain. On a fresh machine the documented flowmake bootstrap make build make testdies after all C/C++ unit tests pass:
Your CI never sees this because it provisions nextest separately (
.install/test_deps/install_rust_deps.sh); consumers following the manual do. We hit it in the redis/redis bundled-modules work (redis/redis#15253): itsmake bootstrap && make test allflow failed on every OS/arch in a clean-container matrix with exactly this signature (e.g. this run).Fix
install_rust.sh(what bootstrap runs) installs the pinnedcargo-nextestprebuilt: statically-linked musl artifact on Linux — glibc-independent, the same preferencetest_deps/install_rust_deps.shalready documents for its binstall fallbacks — and the universal binary on macOS. Idempotent, modeled on the existing cheadergen block..nextest-versionfile (same pattern as.rust-nightly/.cheadergen-version), andtest_deps/install_rust_deps.shnow reads it too, so the bootstrap and CI pins cannot drift.Verified
Clean
debian:bookworm(glibc) andalpine:3(musl) containers, both arches' artifacts checked: fresh run installs andcargo nextest --versionreports 0.9.130; a second run skips ("already installed").Release Notes
🤖 Generated with Claude Code