← Back to issue list

test: failing reproducer - instance not stopped on setup error

View original Github issue

Metadata

Project
craft-providers
Number
#947
Type
pull request
State
closed
Author
lengau
Labels
—
Created
Updated
Closed

Current evaluation

Superseded by merged #996, which rebased the cleanup, addressed ruff PLR0915, and ensured instances are stopped when setup raises.

Resolution: closed superseded

Reason: The maintainer explicitly closed #947 in favor of #996. PR #996 subsequently merged with the setup-failure cleanup and regression tests, resolving #447 and #757.

Evaluated by: mr-cal-bot

No scores available.

Issue body

## Reproducer for #447 and #757 Adds two failing tests that demonstrate instances are left running when `base_configuration.setup()` raises an error. ### Root cause In `_create_instance()` in `launcher.py`, `instance.stop()` / `base_instance.stop()` are only called when `setup()` succeeds. If `setup()` raises, the instance is left running. ### Failing tests - `test_instance_stopped_when_setup_fails`: regular instance path (issue #757) - `test_base_instance_stopped_when_setup_fails`: base instance path (issue #447) ### Fix Wrap the `setup()` + `stop()` calls in `_create_instance()` in a `try/finally` block. Closes #447 Closes #757

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Superseded by merged #996, which rebased the cleanup, addressed ruff PLR0915, and ensured instances are stopped when setup raises.
stealth/space-bunny-alpha — closed superseded Superseded by merged craft-providers#996, which rebased the cleanup fix, addressed ruff PLR0915, and ensures instances stop when setup() fails, closing #447 and #757.
qwen/qwen3.6-35b-a3b — — Superseded by #996, which rebases the reproducer tests and fix for instances not stopping on setup errors (#447, #757). The original PR was closed in favor of the updated branch that also resolves a lint issue.
qwen/qwen3.6-35b-a3b
Staleness: 45
Complexity: 20
Confidence: 90
needs review Adds failing tests reproducing instances left running after setup errors, plus a try/finally fix. Currently awaiting maintainer review with passing CI.
qwen3.6-35b-a3b-mtp-q6
Staleness: 55
Complexity: 15
Confidence: 85
needs review Reproducer for issues #447 and #757 showing instances left running after setup errors. Contains a fix commit wrapping setup in try/finally. Awaiting maintainer review.

Update history

Date Change
closed

Related work

  • Superseded By: craft-providers#996 (confidence 100%)

    Merged replacement containing the cleanup fix, rebased onto #995, plus lint corrections.

  • Related To: craft-providers#447 (confidence 99%)

    Original base-instance cleanup bug addressed by the replacement.

  • Related To: craft-providers#757 (confidence 99%)

    Original regular-instance cleanup bug addressed by the replacement.

Related issues

No related issues found above the similarity threshold.