fix(setup): failure screen hides errors raised before CloudFormation (preflights, image build)
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- aws, typescript
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- TypeScript
- スター
- 185
- フォーク
- 54
- 平均マージ
- 3日 3時間
- マージ済み PR(30日)
- 27
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws-samples/sample-autonomous-cloud-coding-agents のほかの issue
-
docs(security): record the fail-open content-screening posture as an ADR (extend ADR-009 or add ADR-023)対応中かも @krokoko が 3 日前に担当しました。 オープンdocumentation P2 security
難易度 2/5 1〜2日 初心者へのやさしさ 74/100
aws-samples/sample-autonomous-cloud-coding-agents#793 ·
メンテナーはふだん 1 日以内に返信
-
Docs: How to clear previously set attributes for a blueprint対応中かも @krokoko が 3 日前に担当しました。 オープンdocumentation
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
aws-samples/sample-autonomous-cloud-coding-agents#767 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
aws-samples/sample-autonomous-cloud-coding-agents#749 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Harden /review_prs Stage-2 sketch against `args` arriving as a JSON string対応中かも @krokoko が 3 日前に担当しました。 オープンenhancement P2
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
aws-samples/sample-autonomous-cloud-coding-agents#670 ·
メンテナーはふだん 1 日以内に返信
-
documentation security
難易度 2/5 1〜2日 初心者へのやさしさ 75/100
aws-samples/sample-autonomous-cloud-coding-agents#493 ·
メンテナーはふだん 1 日以内に返信
aws-samples/sample-autonomous-cloud-coding-agents の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
pingdotgg/t3code#42253 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
vercel-labs/ui#1108 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 半日 初心者へのやさしさ 62/100
garethgeorge/backrest#1451 ·
メンテナーはふだん 1 日以内に返信
-
fix(core): \.pluck() returns values in key insertion order instead of requested argument order対応中かも @ManyaS-Git が 1 日前に担当しました。 オープンstatus:in-linear
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
メンテナーはふだん 1 日以内に返信
-
Activity indicator ignores prefers-reduced-motion対応中かも @CapThunder19 が今日担当しました。 オープンbug
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
joinmarket-webui/jam#1675 ·
メンテナーはふだん 3 日以内に返信