integ-runner: update workflow fails when deploying an existing snapshot
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
- 32/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, node.js, typescript
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- 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
- 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/aws-cdk-cli
-
aws-cdk bug needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/aws-cdk-cli#2179 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(cli): deploy waits forever when an AWS API call gets no response, because requestTimeout only logs a warningCó thể đã có người làm @abhiramshaji-cyber đã nhận 27 ngày trước. Đang mởaws-cdk bug p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
aws/aws-cdk-cli#2097 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(bootstrap) FilePublishingRoleDefaultPolicy permission incorrect when FileAssetsBucketKmsKeyId is an ARN valueCó thể đã có người làm @lemon0333 đã nhận 95 ngày trước. Đang mởbug p2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
aws/aws-cdk-cli#921 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(garbage-collection): cdk gc takes hours on a large bootstrap bucketCó thể đã có người làm Có pull request liên kết đang mở hoặc đã được merge. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
aws/aws-cdk-cli#2165 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
(cli): cdk flags --set always reports no template differences before applying flagsCó thể đã có người làm @go-to-k đã nhận 9 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
aws/aws-cdk-cli#2153 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của aws/aws-cdk-cli
Issue tương tự
-
進捗部屋の管理画面で削除対象を月ごとに絞り込むĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
traPtitech/knoQ_R-UI#290 ·
Maintainer thường phản hồi trong vòng 24 ngày
-
account bug course exam iris lecture
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
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 64/100
-
Add: New Star SDĐang mởcheck:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 2 ngày