Skip to content

Keep preset sessions resumable after preflight errors - #4232

Open
SiluPanda wants to merge 1 commit into
dstackai:masterfrom
SiluPanda:issue_4164_preserve_interrupted_preflight
Open

Keep preset sessions resumable after preflight errors#4232
SiluPanda wants to merge 1 commit into
dstackai:masterfrom
SiluPanda:issue_4164_preserve_interrupted_preflight

Conversation

@SiluPanda

Copy link
Copy Markdown

Summary

  • resolve caller-local preset environment inputs before creating or mutating a creation session
  • leave an interrupted session unchanged when resume preflight fails, so the caller can fix the environment and retry
  • avoid creating an orphaned failed session when the same preflight check fails for a fresh creation

The existing exception handling still marks failures from the actual creation workflow as terminal. Only errors that occur before that workflow starts now leave session state untouched.

Fixes #4164.

Validation

$ uv run pytest -q src/tests/_internal/cli/services/presets/test_create.py
63 passed in 1.60s

$ uv run ruff format --check <changed Python files>
2 files already formatted

$ uv run ruff check <changed Python files>
All checks passed!

$ git diff --check
# no output

AI-assisted implementation; I reviewed the diff and ran the checks above locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: [Presets] Any failure during resume marks the creation permanently failed

1 participant