Repository navigation
fix: retry failed generated CLI teardown - #620
Merged
alongubkin merged 4 commits intoSep 14, 2026
Merged
alongubkin merged 4 commits into
alongubkin merged 4 commits into
Conversation
Member
Author
|
@greptileai Please review the current head. |
|
Member
Author
|
@greptileai Please review the current head. The retry test now exercises the request-to-acquisition sequence, and the lifecycle comment reflects the API re-arming the canonical failed delete operation. |
…ted-deploy-cli-cannot-retry-failed-setup-teardown
Member
Author
## Summary - reuse the shared lease-renewal guard around setup-owned teardown - cancel setup teardown before ownership can expire when renewals fail - cover lease renewal during an operation longer than the renewal interval ## Root cause Setup-owned teardown has its own long-running resource loop. Unlike the normal deployment runner, it did not renew the deployment lease. A real generated-CLI AWS destroy therefore lost its claim after exactly five minutes while Aurora was still deleting. ## Validation - `cargo test -p alien-deployment --lib` (103 passed) - Real pre-fix reproduction: deployment `dep_timzeyh4w5ia0owdlytoow3wes0k` acquired at 06:45:20 UTC, lease expired at 06:50:20.625, and its next checkpoint returned `DEPLOYMENT_UPDATE_CLAIM_LOST` while RDS remained in `deleting`. - Supported retry then completed teardown; exact-prefix AWS and Alien metadata audits were empty. A post-fix >5-minute real teardown remains the final acceptance gate. ## Stack Stacked on #620 because the generated CLI retry behavior is needed to recover the pre-fix failure fixture cleanly. Linear: ALIEN-794
Member
Author
|
@greptileai Please review the current head after the stacked lease-renewal PR merged into this branch. Both changes have focused lifecycle coverage; please assess the combined diff. |
alongubkin
deleted the
alon/alien-793-generated-deploy-cli-cannot-retry-failed-setup-teardown
branch
September 14, 2026 10:03
alongubkin
added a commit
that referenced
this pull request
Sep 14, 2026
## Summary - return a typed delete response that tells setup clients whether setup-owned cleanup is still required - let generated deployment CLIs finish cleanly when the manager already removed a never-provisioned deployment - preserve compatibility with older managers by treating an absent cleanup result as cleanup required - regenerate the Manager OpenAPI and Rust SDK inputs from the route schema ## Why A deployment that fails initial preflights before creating stack state owns no cloud resources. The Platform can safely remove that empty record, but the generated CLI previously continued into setup teardown and received a 404 because the deployment was already gone. The response is explicit rather than inferred from messages or errors. Existing managers remain safe: a new CLI defaults a missing field to continuing cleanup. ## Validation - `cargo test -p alien-manager routes::deployments::tests --lib` (6 passed, including both route response outcomes) - `cargo test -p alien-deploy-cli commands::down::tests` (7 passed) - `pnpm run generate:manager-rust-sdk` reproduced the checked-in OpenAPI inputs with no diff - real malformed generated-CLI fixture `dep_np5lyeeke2aqndq5raweleoi3cak`: one ordinary destroy removed the deployment, operation, certificate, and local tracker without setup teardown; an exact-tag AWS audit was empty ## Stack Stacked on #620 until its teardown retry and lease-renewal changes merge. Linear: ALIEN-796
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
teardown-requiredidempotent while work is still activeValidation
cargo test -p alien-deploy-cli failed_setup_teardown_requests_a_new_delete_attemptLinear: ALIEN-793