Skip to content

Pin the PyPI Docker fixture to the tested PDM lock format - #2388

Merged
Mikola Lysenko (mikolalysenko) merged 9 commits into
mainfrom
fix/pin-pdm-docker-fixture
Dec 1, 2026
Merged

Mikola Lysenko (mikolalysenko) merged 9 commits into
mainfrom
fix/pin-pdm-docker-fixture

Conversation

@mikolalysenko

@mikolalysenko Mikola Lysenko (mikolalysenko) commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Refs #2398.

The problem

The PyPI Docker image installed the latest PDM on each rebuild. PDM 2.29.8 writes lock format 4.6.0, which vendor refuses (pypi_pdm_lock_version_unsupported). Since then the nightly e2e-docker (pypi) and coverage-docker (pypi) jobs fail on main in pdm_vendor_fresh_checkout_install_and_revert, before its fresh-checkout install and revert assertions run. Failing nightly run

The change

  • The image installs PDM 2.29.7, the last release that writes the supported 4.5.1 format. PDM gets its own venv and its locked extra, so its dependencies are the 42 exact versions that release shipped with. PDM_CHECK_UPDATE=false keeps it from printing an upgrade notice on every command.
  • uv, Poetry, Hatch and pipenv stay unpinned, and the Dockerfile now says so: the nightly rebuild is what shows a new release of one of them breaking a suite.
  • docs/testing/pdm-compatibility.md said PDM "2.8.1 – current" is supported. The supported range now ends at 2.29.7, and the lock table has a row for 4.6.0 (refused).

No production code changes.

What it does not change

A user on PDM 2.29.8 or later is still refused in hosted and vendored mode: the rewriter does not read lock format 4.6.0 yet. That is the lasting fix and stays open on #2398. With the pin, no CI job runs the newest PDM any more, so the next lock format will not show up in CI by itself; #2398 is linked from the pin's comment for that reason.

Proof

PR runs skip the Docker jobs, so they were run by dispatch on this branch.

  • Pin alone, after main was merged in (567b8fe58): run 46728890574 passed, all 204 jobs, e2e-docker (pypi) and coverage-docker (pypi) among them.
  • With PDM in its own venv (96b1a4709): run 46732473617 passed, all 204 jobs, both PyPI Docker jobs among them.
  • Built the image locally and ran the suite's PDM steps in it: pdm init -n, pdm add six==1.16.0 (lock declares 4.5.1, the project's .venv is created from the system Python, not from PDM's venv), pdm install --check, then a fresh pdm sync. PDM's venv holds filelock 3.29.0, hishel 2.0.0 and unearth 0.19.0, the versions of the locked extra.

Review

/code-review high on the two-file diff returned six findings. Fixed: PDM's own dependencies floated under the pin (one important); the compatibility guide claimed "current" PDM is supported; the upgrade notice; the suite header repeated the pinned version. Answered without a code change: the four other tools are left unpinned on purpose, and the Dockerfile says why. Not done: a non-blocking job on the newest PDM; #2398 tracks the 4.6.0 format instead.

🤖 Generated with Claude Code

Claude (claude) and others added 7 commits November 26, 2026 09:23
Refs #2276.

Assisted-by: Claude Code:claude-fable-5-2
Two gem_refresh unit tests built the expected `rm -rf ... && bundle
install` command from Path::display(), but the code renders each path
of that command through shell_word, which single-quotes a path holding
a character outside its safe set. A Windows temp path holds a
backslash, so both tests failed on the Windows nightly. A temp dir
with a space in its path fails them the same way on Linux.

Build the expected commands with shell_word. The warning detail lists
the paths unquoted, so its assertions stay as they are.

Fixes #2276.

Assisted-by: Claude Code:claude-fable-5-2
a_copy_no_ruby_owns_is_removed_with_its_gem_dir joined
`specifications/json-1.0.0.gemspec` onto the gem home as one
component. The code joins the directory and the file name apart, so on
Windows the test's path kept a `/` where the remedy has a `\\`, and
the expected command and detail would still not match there.

the_rm_remedy_quotes_a_path_the_shell_would_split wrapped display() in
literal quotes, which breaks under a temp dir with a `'` in its path.
It now uses shell_word too.

Refs #2276.

Assisted-by: Claude Code:claude-fable-5-2
Base automatically changed from agent/fix-gem-remedy-tests-shell-quoting to main November 30, 2026 20:35
…M locks are refused

The image pinned PDM but let PDM's own dependencies float, so a rebuild
could still install a set that 2.29.7 never shipped with. PDM now gets
its own venv and its `locked` extra. PDM_CHECK_UPDATE is off, so a log
does not tell its reader to upgrade past the pin.

The PDM compatibility guide said "2.8.1 - current" is supported. PDM
2.29.8 writes lock format 4.6.0, which hosted and vendored mode refuse
(#2398): the guide now ends the supported range at 2.29.7 and lists the
4.6.0 row. The suite's header names the Dockerfile's pin and no longer
repeats its version.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@mikolalysenko
Mikola Lysenko (mikolalysenko) marked this pull request as ready for review December 1, 2026 19:59
@cursor

cursor Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Test infrastructure and documentation only; production vendor behavior is unchanged except for accurately documented PDM version boundaries.

Overview
Pins PDM 2.29.7 in the PyPI Docker test image so nightly e2e-docker (pypi) and coverage-docker (pypi) no longer fail when a rebuild pulls PDM 2.29.8+, which writes lock format 4.6.0 that vendor still refuses (#2398).

tests/docker/Dockerfile.pypi installs PDM in /opt/pdm with pdm[locked]==2.29.7, symlinks it to PATH, sets PDM_CHECK_UPDATE=false, and leaves uv, Poetry, Hatch, and pipenv unpinned so those suites can still surface upstream breakage. docs/testing/pdm-compatibility.md narrows the documented supported PDM range to 2.8.1–2.29.7 and documents 4.6.0 as refused until #2398 lands. The vendor e2e module comment now points at the Dockerfile pin instead of a floating PDM version.

No application or rewriter code changes.

Reviewed by Cursor Bugbot for commit 96b1a47. Configure here.

@mikolalysenko Mikola Lysenko (mikolalysenko) added the Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review label Dec 1, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[agent] Reviewed; LGTM.

@mikolalysenko
Mikola Lysenko (mikolalysenko) added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit cc87e05 Dec 1, 2026
287 checks passed
@mikolalysenko
Mikola Lysenko (mikolalysenko) deleted the fix/pin-pdm-docker-fixture branch December 1, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready for review Agent-verified: mergeable, CI green, Bugbot clean — awaiting human review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants