Express Mode: the CLI offers a retry-with-rollback that cannot succeed

未关闭
#1,973 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
38/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
aws, typescript
领域
api, cli, cloud

调研方向

Start in toolkit-lib at DeployStackResult and the ReplacementRequiresUnwedge path, then read the related context in #1969, #1970, and #1745. Determine the public API shape for this express-mode case and verify how consumers can distinguish it from the existing result members; done means the API decision is implemented without reopening the SEV path.

由索引模型根据 Issue 内容生成。

描述

needs-cfn p1

When a replacement was detected on a stack that is already failed, cdk deploy --express returned replacement-requires-rollback; cdk-toolkit then prompted to redeploy with rollback enabled, and because the confirmation defaults to yes, a non-interactive caller ran it. That deployment cannot succeed:

Change includes a replacement which cannot be deployed with "--no-rollback". Proceeding with deployment with rollback enabled (--force).
ValidationError: This stack is currently in a non-terminal [UPDATE_FAILED] state. To update the stack from this state, please use the disable-rollback parameter with update-stack API. To rollback to the last known good state, use the rollback-stack API

Both remedies in that error are dead ends for an express stack: disable-rollback is the condition CloudFormation refuses replacements under, and RollbackStack is unsupported for stacks last updated with EXPRESS mode. Only replaying the last stable template works, which is what #1970 documents.

#1969 closes this path by throwing ReplacementRequiresUnwedge instead of returning a result, so no prompt is offered and CI cannot auto-run the doomed deployment.

What remains open is the API shape. toolkit-lib consumers now get an error rather than a typed result for this case, where a third member of DeployStackResult — e.g. replacement-needs-unwedge-first — would let programmatic callers branch on it. Neither existing member fits: replacement-requires-rollback means "retry with rollback enabled", and failpaused-need-rollback-first routes to RollbackStack, which #1745 deliberately steered express deployments away from. That is a public addition, so it was kept out of the SEV fix.

CloudFormation is expected to lift the underlying restriction around 2026-11-15, which would make this case rare without changing the API question.

#NNNN here means aws/aws-cdk-cli; note aws/aws-cdk#1931 is an unrelated closed issue.

主要语言
TypeScript
星标
110
派生
138
平均合并
1 天 9 小时
30 天内合并 PR
55

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

aws/aws-cdk-cli 的其他 Issue

查看 aws/aws-cdk-cli 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。