Skip to content

fix(cli): preserve release during setup refresh - #543

Merged
alongubkin merged 2 commits into
mainfrom
alon/alien-618-preserve-release-across-setup
Aug 31, 2026
Merged

alongubkin merged 2 commits into
mainfrom
alon/alien-618-preserve-release-across-setup

Conversation

@alongubkin

Copy link
Copy Markdown
Member

Summary

  • reconstruct setup release state after acquiring the deployment lock
  • preserve the current release while using desired-or-current as the setup target
  • avoid erasing hosted release authority during setup refresh handoff

Test

  • cargo test -p alien-deploy-cli commands::up::tests -- --nocapture

@greptile-apps

greptile-apps Bot commented Aug 30, 2026 •

Copy link
Copy Markdown

Greptile Summary

This PR reconstructs current and target release state after acquiring the deployment lock and ensures setup-preparation failures release that lock.

  • Loads the current release and the desired-or-current setup target from lock-protected deployment state.
  • Reuses one fetched release when current and target release IDs match.
  • Wraps post-acquisition setup work so early errors release the deployment before returning.
  • Adds tests for preserving the current release and selecting or reusing the target release.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/alien-deploy-cli/src/commands/up.rs Reconstructs release state under the acquired lock and adds mutually exclusive cleanup paths that release the deployment once on both preparation failure and normal completion.

Sequence Diagram

sequenceDiagram
    participant CLI
    participant Manager
    CLI->>Manager: Acquire deployment lock
    Manager-->>CLI: Lock-protected deployment state
    CLI->>Manager: Fetch current release
    opt Desired release differs from current
        CLI->>Manager: Fetch desired release
    end
    alt Setup preparation fails
        CLI->>Manager: Release deployment lock
        CLI-->>CLI: Return error
    else Setup attempt completes
        CLI->>Manager: Final reconcile
        CLI->>Manager: Release deployment lock
    end
Loading

Reviews (2): Last reviewed commit: "fix(cli): release setup lease on prepara..." | Re-trigger Greptile

Comment thread crates/alien-deploy-cli/src/commands/up.rs Outdated
@alongubkin
alongubkin merged commit 489fea5 into main Aug 31, 2026
25 checks passed
@alongubkin
alongubkin deleted the alon/alien-618-preserve-release-across-setup branch August 31, 2026 00:27
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.

1 participant