Skip to content

[MOD-16514] Fix Alpine 3.23 flow tests: re-bootstrap venv pip after uv sync - #10457

Merged
kei-nan merged 4 commits into
masterfrom
jk-alpine-venv-pip-ensurepip
Jul 14, 2026
Merged

kei-nan merged 4 commits into
masterfrom
jk-alpine-venv-pip-ensurepip

Conversation

@kei-nan

@kei-nan kei-nan commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Describe the changes in the pull request

  1. Current: Every test-*platforms / alpine:3.23 flow-test job (periodic + nightly master validation, x86_64 and aarch64) fails. The RedisJSON build during make pytest dies with deps/readies/mk/main:49: *** Cannot find python3 interpreter, and .venv/bin/python3 -m pip reports No module named pip.
  2. Change: After uv sync, on Alpine re-bootstrap pip from the stdlib (python -m ensurepip --upgrade) so the venv's python3 -m pip works.
  3. Outcome: RedisJSON's readies getpy3 check (python3 -m pip --version) passes again, so make pytest proceeds and Alpine flow tests run.

Root cause

This is a regression from #10372, which 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 still works). RedisJSON's build shells out to readies getpy3, whose CHECK is literally python3 -m pip --version, so it fails and takes down make pytest. Alpine flow tests passed on 2026-07-10 (before #10372) and failed from 2026-07-13 (after). RedisJSON itself was unchanged.

This keeps #10372's prebuilt-wheel benefit and only restores a working python3 -m pip.

Which additional issues this PR fixes

  1. MOD-16514 (regression introduced alongside it)

Main objects this PR modified

  1. .install/test_deps/install_python_deps.sh

Mark if applicable

  • This PR introduces API changes
  • This PR introduces serialization changes

Release Notes

  • This PR requires release notes
  • This PR does not require release notes

Internal CI fix (restores Alpine 3.23 test coverage); no user-facing change.

🤖 Generated with Claude Code

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]>
@kei-nan kei-nan self-assigned this Jul 14, 2026
@kei-nan
kei-nan requested a review from Itzikvaknin July 14, 2026 11:24
kei-nan and others added 3 commits July 14, 2026 15:29
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.
#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]>
@github-actions github-actions Bot added size:XS and removed size:S labels Jul 14, 2026
@sonarqubecloud

Copy link
Copy Markdown

@kei-nan
kei-nan marked this pull request as ready for review July 14, 2026 14:34
@kei-nan
kei-nan enabled auto-merge July 14, 2026 14:35
@codecov

codecov Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.20%. Comparing base (5864147) to head (2087726).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #10457      +/-   ##
==========================================
+ Coverage   82.15%   82.20%   +0.05%     
==========================================
  Files         563      564       +1     
  Lines       75745    76180     +435     
  Branches    30816    31272     +456     
==========================================
+ Hits        62228    62627     +399     
- Misses      13227    13255      +28     
- Partials      290      298       +8     
Flag Coverage Δ
flow 83.73% <ø> (+0.03%) ⬆️
unit 53.14% <ø> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kei-nan
kei-nan added this pull request to the merge queue Jul 14, 2026
Merged via the queue into master with commit 582160a Jul 14, 2026
73 of 76 checks passed
@kei-nan
kei-nan deleted the jk-alpine-venv-pip-ensurepip branch July 14, 2026 16:28
gonen-red pushed a commit that referenced this pull request Jul 14, 2026
…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]>
oshadmi pushed a commit that referenced this pull request Jul 15, 2026
…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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants