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

Đang mở
#1,973 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
aws, typescript
Lĩnh vực
api, cli, cloud

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
110
Fork
138
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
55

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/aws-cdk-cli

Tất cả issue của aws/aws-cdk-cli

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.