fix(setup): failure screen hides errors raised before CloudFormation (preflights, image build)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- aws, typescript
Hướng nghiên cứu
Start with cli/src/commands/setup.ts and trace how the standard bootstrap preparation result is reflected in the review screen and passed to the //cdk:deploy spawn. Read cdk/src/bootstrap/preflight.ts and inspect the failure cause extraction path; add coverage using a standard-bootstrap describeStack fixture. Done when the chosen standard-bootstrap behavior is shown consistently and the preflight message appears in the failure screen's Cause.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Component
CLI: bgagent setup (cli/src/commands/setup.ts, from #973 / #836), together with the //cdk:deploy bootstrap preflight (cdk/mise.toml, cdk/src/bootstrap/preflight.ts, from #976).
Describe the bug
In an account whose CDKToolkit is a standard CDK bootstrap, bgagent setup promises to deploy and leave the bootstrap unchanged. The deploy then fails at the bootstrap preflight.
planAccountPreparationdeliberately leaves a standard bootstrap alone (DEPLOYMENT_GUIDE: "A standard CDK bootstrap (no ABCA policy outputs): left unchanged, because other apps in the account may depend on it").- Setup deploys through
mise //cdk:deploy. Since #976, the first command of that task isnpx tsx scripts/preflight-bootstrap.ts. - That preflight returns FAIL for a default bootstrap (
cdk/src/bootstrap/preflight.ts:96-102). Setup doesn't setABCA_SKIP_BOOTSTRAP_PREFLIGHT, so the deploy fails.
This affects any customer whose account already uses CDK for something else, which is likely common.
Steps to reproduce (verified at #973 head 1544814c)
npx cdk bootstrap aws://<account>/<scratch-region> # standard bootstrap
bgagent setup --region <scratch-region> --stack-name backgroundagent-dev-std --features none --yes
Output:
This account uses the standard CDK bootstrap; setup deploys with it and leaves it unchanged.
✓ Checking what will change 317 to create · 0 to update · 0 to remove
✓ Saved your selection to abca.deployment.backgroundagent-dev-std.json
✗ Deployment failed after 3s
Cause:
[//cdk:deploy] ERROR task failed
setup-deploy.log:
bootstrap preflight: FAIL: CDKToolkit is a default CDK bootstrap (no BootstrapPolicyVersion output), whose execution role has AdministratorAccess. ABCA expects its least-privilege bootstrap. Run `mise //cdk:bootstrap`, or bypass deliberately with ABCA_SKIP_BOOTSTRAP_PREFLIGHT=1.
No stack is created. The profile file is written anyway.
Expected behavior
The review screen and the deploy should agree. Pick one:
- Deploy as promised: when
preparation.standardBootstrapis true, spawn//cdk:deploywithABCA_SKIP_BOOTSTRAP_PREFLIGHT=1, and say so on the review screen ("deploys with your standard bootstrap's admin execution role"). - Refuse up front: before the diff, stop with: "This account uses a standard CDK bootstrap, which ABCA's deploy check rejects. Run
mise //cdk:bootstrapto switch to ABCA's least-privilege bootstrap (this changes the bootstrap for every CDK app in this account and Region), or re-run with an explicit opt-in flag." Then update the DEPLOYMENT_GUIDE bullet.
Either way:
- Surface the preflight's message in the failure screen's "Cause". Today it shows only
[//cdk:deploy] ERROR task failed, because the cause extractor only reads CloudFormation events. - Add a test with a standard-bootstrap
describeStackfixture, asserting either the env passed to the deploy spawn or the up-front refusal.
Additional context
This was found while reviewing #988, which has a related issue: its installer replaces a standard bootstrap via mise //cdk:bootstrap. Left as a follow-up to #973 rather than blocking it.
- Ngôn ngữ chính
- TypeScript
- Star
- 185
- Fork
- 54
- Merge trung bình
- 3 ngày 3 giờ
- Pull request đã merge (30 ngày)
- 27
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-samples/sample-autonomous-cloud-coding-agents
-
docs(security): record the fail-open content-screening posture as an ADR (extend ADR-009 or add ADR-023)Có thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởdocumentation P2 security
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docs: How to clear previously set attributes for a blueprintCó thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởdocumentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
aws-samples/sample-autonomous-cloud-coding-agents#749 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Harden /review_prs Stage-2 sketch against `args` arriving as a JSON stringCó thể đã có người làm @krokoko đã nhận 3 ngày trước. Đang mởenhancement P2
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 92/100
aws-samples/sample-autonomous-cloud-coding-agents#670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation security
Độ khó 2/5 1-2 ngày Mức phù hợp với người mới 75/100
aws-samples/sample-autonomous-cloud-coding-agents#493 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws-samples/sample-autonomous-cloud-coding-agents
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
pingdotgg/t3code#42253 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
vercel-labs/ui#1108 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 62/100
garethgeorge/backrest#1451 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument orderCó thể đã có người làm @ManyaS-Git đã nhận 1 ngày trước. Đang mởstatus:in-linear
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
n8n-io/n8n#45027 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Activity indicator ignores prefers-reduced-motionCó thể đã có người làm @CapThunder19 đã nhận hôm nay. Đang mởbug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
joinmarket-webui/jam#1675 ·
Maintainer thường phản hồi trong vòng 3 ngày