integ-runner: update workflow fails when deploying an existing snapshot
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 32/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- aws, node.js, typescript
調査の方向性
Start in packages/@aws-cdk/integ-runner at the CdkTestApp class exported from lib/runner: follow getContext('deployment') and the configureLegacyEnableLookups/_legacyEnableLookups guard to see why deployment context demands snapshot-synthesis state. Reproduce with the inline Node script from the issue (fixture test/test-data/xxxxx.test-with-snapshot.js) to confirm the throw happens before the mocked deploy. Done means deployment context resolves without prior synthesis, the snapshot path still enforces the guard, and regression tests cover both. Note a scoped fix and tests are already proposed in PR #2151, so coordinate before starting.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
The integration-test update workflow fails before deploying an existing golden snapshot with Must call configureLegacyEnableLookups before synthing.
runIntegTestCase({ updateWorkflow: true }) creates the previous app with CdkTestApp.forGoldenSnapshot(), loads its suite, then calls previousVersion.deploy(). That instance has not synthesized, so _legacyEnableLookups is unset. deploy() requests deployment context, but getContext() requires the snapshot-synthesis setting even for deployment.
Regression Issue
Not confirmed against an earlier released version. Reproduced on current main f970341e439efc4ba6c40515b975b011b4e9eab3.
Expected Behavior
With the update workflow enabled and an existing golden snapshot, deploy the previous snapshot and then update it. Obtaining deployment context should not require a prior snapshot synthesis.
Current Behavior
CdkTestApp.getContext('deployment') throws before the mock CDK deployment is reached:
Error: Must call configureLegacyEnableLookups before synthing
The full runner also fails when the snapshot exists at the merge-base and Git checkout succeeds without warnings.
Reproduction Steps
Build the repository normally, then run the following from packages/@aws-cdk/integ-runner. It uses the existing repository fixture and a mock CDK provider; no AWS credentials or service calls are needed. This isolates the same factory/load/deploy sequence as the update workflow.
node <<'NODE'
const { CdkTestApp, IntegTest } = require(process.cwd() + '/lib/runner');
(async () => {
const app = await CdkTestApp.forGoldenSnapshot({
test: new IntegTest({
fileName: 'test/test-data/xxxxx.test-with-snapshot.js',
discoveryRoot: 'test/test-data',
}),
region: 'eu-west-1',
cdk: {
deploy: async () => {
console.log('mock deploy reached');
return { deleteFailures: [] };
},
},
});
const suite = await app.loadExistingSuite();
if (!suite) throw new Error('Expected the repository fixture to exist');
await app.deploy({ stacks: ['test-stack'] });
})().catch(error => {
console.error(error.stack);
process.exitCode = 1;
});
NODE
For the full runner, both RunOptions.updateWorkflow and the manifest test case's stackUpdateWorkflow must be true.
Possible Solution
Keep the initialization requirement for snapshot synthesis, while allowing deployment context to be obtained without that snapshot-only state. I am preparing a scoped fix and regression tests.
Additional Information/Context
This differs from #1443 / #2149: the existing snapshot is present here, so skipping a missing baseline does not address the failure.
CDK CLI Version
Source checkout at f970341e439efc4ba6c40515b975b011b4e9eab3 (development version 0.0.0).
Framework Version
No deployed app; repository test fixture.
Node.js Version
v22.23.2
OS
macOS arm64
Language
TypeScript
Other information
AI tools assisted debugging and drafting. Verification was local with mocked CDK calls; an AWS deployment was not performed.
- 主要言語
- TypeScript
- スター
- 110
- フォーク
- 138
- 平均マージ
- 1日 9時間
- マージ済み PR(30日)
- 56
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws/aws-cdk-cli のほかの issue
-
aws-cdk bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/aws-cdk-cli#2179 ·
メンテナーはふだん 1 日以内に返信
-
(cli): deploy waits forever when an AWS API call gets no response, because requestTimeout only logs a warning対応中かも @abhiramshaji-cyber が 27 日前に担当しました。 オープンaws-cdk bug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
aws/aws-cdk-cli#2097 ·
メンテナーはふだん 1 日以内に返信
-
(bootstrap) FilePublishingRoleDefaultPolicy permission incorrect when FileAssetsBucketKmsKeyId is an ARN value対応中かも @lemon0333 が 95 日前に担当しました。 オープンbug p2
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
aws/aws-cdk-cli#921 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
(garbage-collection): cdk gc takes hours on a large bootstrap bucket対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
aws/aws-cdk-cli#2165 ·
メンテナーはふだん 1 日以内に返信
-
(cli): cdk flags --set always reports no template differences before applying flags対応中かも @go-to-k が 9 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
aws/aws-cdk-cli#2153 ·
メンテナーはふだん 1 日以内に返信
aws/aws-cdk-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
volcengine/OpenViking#8432 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
jupyterlab/eslint-plugin#178 · コメント 2 件 ·
-
bug from-app needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nightly-labs/openbot#16303 ·
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100