← Back to issue list

test(spread): add core26 venv/bin/python reproducer for uv dispatch script bug

View original Github issue

Metadata

Project
charmcraft
Number
#2789
Type
pull request
State
open
Author
copilot-swe-agent
Labels
—
Created
Updated
Closed
—

Current evaluation

Test-only spread change adding a core26 reproducer: requires venv/bin/python in the uv charm payload and runs `venv/bin/python -c "import ops"` in the task. 2 slow-test jobs fail, 1 review comment unresolved, no reviewers.

Suggested action: keep open

Reason: The change is a deliberate reproducer for the open bug in charmcraft#2788 ("uv plugin fails on core26: dispatch script uses system Python instead of venv"), so the new `expected_files.txt` entry and `import ops` check will fail until the product-side fix lands; CI is also red (test / Slow tests (ubuntu-24.04, 3.10 and 3.12)) with 2 checks still pending and 1 unresolved review comment that has sat for 50 days with no author response. Code-file inspection was unavailable (no pinned SHA for the repo), so the exact spread-test gating could not be verified, which caps confidence; the failing slow tests may be pre-existing flakiness rather than caused by this diff.

Evaluated by: mr-cal-bot

Impact: 28 Quick Win: 7 Complexity: 22 Confidence: 66 Actionability: 32

Issue body

On core26, craft-parts removes `python*` symlinks from `venv/bin/` and falls back to the system interpreter path. The packed charm lacks `venv/bin/python`, so the dispatch script creates `ln -s $(which python3) venv/bin/python` at runtime — pointing to a Python with no `ops` installed, causing `ModuleNotFoundError`. ## Changes - **`ubuntu-26.04/charm/uv/expected_files.txt`**: Add `venv/bin/python` to the required file list. The `unzip -qql` check already fails the test if the entry is absent from the charm archive, directly reproducing the missing-symlink scenario. - **`ubuntu-26.04/charm/task.yaml`**: When `venv/bin/python` is in `expected_files.txt`, extract the charm to a temp dir and run: ```sh "$tmpdir/venv/bin/python" -c "import ops" ``` This catches two failure modes: the symlink being absent entirely, or present but pointing to a system Python that lacks venv packages. The check is gated on `expected_files.txt` content so it only fires for the uv charm, not the platforms charm.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 28
Quick Win: 7
Complexity: 22
Confidence: 66
Actionability: 32
keep open Test-only spread change adding a core26 reproducer: requires venv/bin/python in the uv charm payload and runs `venv/bin/python -c "import ops"` in the task. 2 slow-test jobs fail, 1 review comment unresolved, no reviewers.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 7
Complexity: 22
Confidence: 58
Actionability: 30
needs review Test-only spread PR: adds venv/bin/python to the core26 uv charm expected_files.txt and an extraction + "import ops" check in task.yaml, reproducing the uv dispatch symlink bug. No reviewers, 1 unresolved comment, 2 slow-test checks failing.
stealth/space-bunny-alpha
Impact: 22
Quick Win: 6
Complexity: 28
Confidence: 82
Actionability: 38
keep open Adds core26 spread checks for the uv charm's venv/bin/python symlink and importability; two slow-test jobs fail, two checks are pending, and one review comment is unresolved.
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 30
Staleness: 65
Complexity: 15
Confidence: 45
needs review Adds a spread test reproducing core26 venv/bin/python symlink removal bug; 52 days old, 0 reviewers, slow CI tests failing
qwen/qwen3.6-35b-a3b
Staleness: 25
Complexity: 10
Confidence: 85
needs review Adds a spread test to reproduce a core26 charm dispatch bug where missing venv/bin/python symlinks cause ModuleNotFoundError. Currently pending review with one unresolved comment and failing slow CI jobs.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 10
Confidence: 85
needs review Adds a spread test to reproduce a core26 bug where craft-parts removes venv/python symlinks, causing dispatch script failures. Currently pending maintainer review with passing CI.
qwen3.6-35b-a3b-mtp-q6
Staleness: 5
Complexity: 15
Confidence: 85
needs review Adds a spread test to reproduce a core26 charm dispatch bug where craft-parts removes venv/bin/python symlinks, causing ModuleNotFoundError. Currently unreviewed with no comments.

Update history

Date Change
updated

Related work

  • Related To: charmcraft#2788 (confidence 88%)

    Open issue describing the exact core26 uv charm failure this PR reproduces (payload symlink removed, dispatch links venv/bin/python to system Python, ModuleNotFoundError: ops); the PR only adds a test, so the fix is still needed.

Related issues

No related issues found above the similarity threshold.