From b23a0ee1befc620a39ac5e402b30fa1c55072a18 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Tue, 18 Nov 2025 16:19:32 +0100 Subject: [PATCH 1/2] fix(integ-runner): disable update workflow by default I've lost 2 hours debugging why my deployment was failing trying to deploy to nonexistent and non-requested accounts and regions, and the answer was: the checked-in snapshot was nonsensical, and the update workflow will first deploy the checked-in snapshot and only then deploy the current snapshot. Good idea, bad execution: if existing snapshots are not region-agnostic they are guaranteed to fail. We should probably resynthesize them from the previous git commit instead. Whatever it is, what we do right now doesn't work so I'm disabling it. --- packages/@aws-cdk/integ-runner/lib/cli.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/lib/cli.ts b/packages/@aws-cdk/integ-runner/lib/cli.ts index 1b7f4ce03..e600e40b3 100644 --- a/packages/@aws-cdk/integ-runner/lib/cli.ts +++ b/packages/@aws-cdk/integ-runner/lib/cli.ts @@ -40,7 +40,7 @@ export function parseCliArgs(args: string[] = []) { .option('strict', { type: 'boolean', default: false, desc: 'Fail if any specified tests are not found' }) .options('from-file', { type: 'string', desc: 'Read TEST names from a file (one TEST per line)' }) .option('inspect-failures', { type: 'boolean', desc: 'Keep the integ test cloud assembly if a failure occurs for inspection', default: false }) - .option('disable-update-workflow', { type: 'boolean', default: false, desc: 'If this is "true" then the stack update workflow will be disabled' }) + .option('disable-update-workflow', { type: 'boolean', default: true, desc: 'DEPRECATED. Update workflow has been temporarily disabled until we can make it work correctly.' }) .option('language', { alias: 'l', default: ['javascript', 'typescript', 'python', 'go'], @@ -100,7 +100,7 @@ export function parseCliArgs(args: string[] = []) { clean: argv.clean as boolean, force: argv.force as boolean, dryRun: argv['dry-run'] as boolean, - disableUpdateWorkflow: argv['disable-update-workflow'] as boolean, + disableUpdateWorkflow: true, language: arrayFromYargs(argv.language), watch: argv.watch as boolean, strict: argv.strict as boolean, @@ -186,7 +186,7 @@ async function run(options: ReturnType, { engine }: EngineO clean: options.clean, dryRun: options.dryRun, verbosity: options.verbosity, - updateWorkflow: !options.disableUpdateWorkflow, + updateWorkflow: false, watch: options.watch, }); testsSucceeded = success; From e74f8d56279ad9f3ac1ba62f63d856550182cbe8 Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Wed, 19 Nov 2025 10:46:41 +0100 Subject: [PATCH 2/2] Make it configurable but change the default --- packages/@aws-cdk/integ-runner/lib/cli.ts | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/integ-runner/lib/cli.ts b/packages/@aws-cdk/integ-runner/lib/cli.ts index 1b7f4ce03..32415c708 100644 --- a/packages/@aws-cdk/integ-runner/lib/cli.ts +++ b/packages/@aws-cdk/integ-runner/lib/cli.ts @@ -40,7 +40,8 @@ export function parseCliArgs(args: string[] = []) { .option('strict', { type: 'boolean', default: false, desc: 'Fail if any specified tests are not found' }) .options('from-file', { type: 'string', desc: 'Read TEST names from a file (one TEST per line)' }) .option('inspect-failures', { type: 'boolean', desc: 'Keep the integ test cloud assembly if a failure occurs for inspection', default: false }) - .option('disable-update-workflow', { type: 'boolean', default: false, desc: 'If this is "true" then the stack update workflow will be disabled' }) + .option('disable-update-workflow', { type: 'boolean', default: undefined, desc: 'DEPRECATED, use --[no]-update-workflow instead' }) + .option('update-workflow', { type: 'boolean', default: undefined, desc: 'Deploys the committed snapshot before the updated application. Only works if snapshots are region-agnostic.' }) .option('language', { alias: 'l', default: ['javascript', 'typescript', 'python', 'go'], @@ -81,6 +82,12 @@ export function parseCliArgs(args: string[] = []) { ? (fs.readFileSync(fromFile, { encoding: 'utf8' })).split('\n').filter(x => x) : (tests.length > 0 ? tests : undefined); // 'undefined' means no request + if (argv['disable-update-workflow'] !== undefined && argv['update-workflow'] !== undefined) { + throw new Error('--disable-update-workflow and --[no-]update-workflow cannot be used together'); + } + + let updateWorkflow = argv['update-workflow'] !== undefined ? !!argv['update-workflow'] : !argv['disable-update-workflow']; + return { tests: requestedTests, app: argv.app as (string | undefined), @@ -100,7 +107,7 @@ export function parseCliArgs(args: string[] = []) { clean: argv.clean as boolean, force: argv.force as boolean, dryRun: argv['dry-run'] as boolean, - disableUpdateWorkflow: argv['disable-update-workflow'] as boolean, + updateWorkflow, language: arrayFromYargs(argv.language), watch: argv.watch as boolean, strict: argv.strict as boolean, @@ -186,7 +193,7 @@ async function run(options: ReturnType, { engine }: EngineO clean: options.clean, dryRun: options.dryRun, verbosity: options.verbosity, - updateWorkflow: !options.disableUpdateWorkflow, + updateWorkflow: options.updateWorkflow, watch: options.watch, }); testsSucceeded = success; @@ -237,7 +244,7 @@ function validateWatchArgs(args: { maxWorkers: number; force: boolean; dryRun: boolean; - disableUpdateWorkflow: boolean; + updateWorkflow: boolean; runUpdateOnFailed: boolean; watch: boolean; }) { @@ -250,8 +257,8 @@ function validateWatchArgs(args: { 'to `--profiles` `--parallel-regions` `--max-workers'); } - if (args.runUpdateOnFailed || args.disableUpdateWorkflow || args.force || args.dryRun) { - logger.warning('args `--update-on-failed`, `--disable-update-workflow`, `--force`, `--dry-run` have no effect when running with `--watch`'); + if (args.runUpdateOnFailed || args.updateWorkflow || args.force || args.dryRun) { + logger.warning('args `--update-on-failed`, `--update-workflow`, `--force`, `--dry-run` have no effect when running with `--watch`'); } } }