← Back to issue list

Integration test for poetry plugin requires root/apt state (not marked, fails locally)

View original Github issue

Metadata

Project
craft-parts
Number
#1470
Type
issue
State
open
Author
gcomneno
Labels
—
Created
Updated
Closed
—

Current evaluation

Poetry integration tests run in non-privileged CI despite invoking apt; replacing the file marker with requires_root is locally validated, but maintainer triage is still absent.

Suggested action: needs triage

Reason: The file currently has only the python marker even though its tests call action_executor(), which attempts apt installations; CI runs the python job without sudo and routes requires_root tests through sudo. The reporter reproduced all 16 failures on current main and validated that replacing the file marker with pytestmark = [pytest.mark.requires_root] correctly reroutes them, but the issue has no labels or maintainer response.

Evaluated by: mr-cal-bot

Impact: 35 Quick Win: 30 Complexity: 10 Confidence: 96 Actionability: 95

Issue body

### Summary `tests/integration/plugins/test_poetry.py::test_poetry_plugin[...]` fails when run as a regular user because it triggers apt operations. ### Observed failure Error includes `BuildPackagesNotInstalled` and log lines like "Packages list not refreshed, not running as superuser". ### Why it happens The test appears to run `apt-get update/install` (or otherwise requires refreshed package lists / build deps installation), which typically needs root privileges and/or a CI image prepared in advance. ### Question / intended behavior Is this test expected to run only in privileged CI environments? If so, is there a recommended way to run the integration suite locally (documentation / flags / markers) that I might have missed? ### Suggested direction If the intent is "privileged only", one option could be to mark it (e.g. `@pytest.mark.requires_root`) and/or skip gracefully when not root / when apt state is not available. ### Local workaround Skip the test file, or run only non-privileged tests.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 35
Quick Win: 30
Complexity: 10
Confidence: 96
Actionability: 95
needs triage Poetry integration tests run in non-privileged CI despite invoking apt; replacing the file marker with requires_root is locally validated, but maintainer triage is still absent.
stealth/space-bunny-alpha
Impact: 32
Quick Win: 24
Complexity: 18
Confidence: 93
Actionability: 92
keep open Poetry plugin integration tests remain unmarked for root-only apt operations, causing all 16 cases to fail in unprivileged local runs.
qwen/qwen3.6-35b-a3b
Impact: 30
Quick Win: 24
Complexity: 10
Confidence: 85
Actionability: 90
keep open test_poetry.py fails for unprivileged users due to apt operations; contributor proposes changing pytestmark from python to requires_root
qwen/qwen3.8-27b
Impact: 20
Quick Win: 18
Staleness: 25
Complexity: 10
Confidence: 85
Support Request: 35
needs triage Poetry plugin integration tests fail for unprivileged users because they apt-install build deps (findutils, python3-poetry, etc.). Reporter re-verified on current main that all 16 cases fail and offered a one-line fix adding the existing requires_root marker. No maintainer response yet.
qwen/qwen3.6-35b-a3b
Staleness: 15
Complexity: 10
Confidence: 90
Support Request: 10
needs triage Integration test for poetry plugin fails for non-root users due to unmarked apt operations. Author suggests adding a requires_root pytest marker to skip gracefully locally and offers a one-line fix.
qwen/qwen3.6-35b-a3b
Staleness: 85
Complexity: 20
Confidence: 85
Support Request: 10
needs triage Integration test for poetry plugin fails locally due to unmarked root/apt requirements. No maintainer response yet. Suggests adding pytest markers or skip logic for non-privileged environments.
qwen3.6-35b-a3b-mtp-q6
Staleness: 80
Complexity: 15
Confidence: 90
Support Request: 10
needs triage Integration test for poetry plugin fails locally due to unmarked root/apt requirements. No maintainer response or labels after 136 days.

Update history

Date Change
updated
updated

Related issues

No related issues found above the similarity threshold.