From 0218463e977eba4477ac5e0353ec60b043f45550 Mon Sep 17 00:00:00 2001 From: Ian Hou <45278651+iankhou@users.noreply.github.com> Date: Mon, 26 Oct 2026 15:51:58 -0400 Subject: [PATCH 1/2] fix: limit SAR application test to regions that have SAR enabled, flyby simplification for docker asset test --- .../@aws-cdk-testing/cli-integ/lib/regions.ts | 22 ++++++++++++++++++- ...loy-docker-asset-multi-region.integtest.ts | 3 +-- ...rl-change-for-sar-application.integtest.ts | 3 ++- 3 files changed, 24 insertions(+), 4 deletions(-) diff --git a/packages/@aws-cdk-testing/cli-integ/lib/regions.ts b/packages/@aws-cdk-testing/cli-integ/lib/regions.ts index 37af0a9b9..a3a810a34 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/regions.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/regions.ts @@ -43,7 +43,7 @@ export function allBut(exclude: string[]): string[] { } /** - * Regions that don't support CloudFormation Stack Refactoring + * Regions that support CloudFormation Stack Refactoring */ export const STACK_REFACTORING_REGIONS = allBut([ 'ap-southeast-5', @@ -51,3 +51,23 @@ export const STACK_REFACTORING_REGIONS = allBut([ 'mx-central-1', ]); +/** + * Regions that support the Serverless Application Repository + * + * @see https://docs.aws.amazon.com/general/latest/gr/serverlessrepo.html + */ +export const SAR_REGIONS = allBut([ + 'ap-northeast-3', + 'af-south-1', + 'ap-south-2', + 'ap-southeast-3', + 'ap-southeast-4', + 'ap-southeast-5', + 'ap-southeast-7', + 'eu-central-2', + 'eu-south-1', + 'eu-south-2', + 'il-central-1', + 'ca-west-1', + 'mx-central-1', +]); diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/deploy/cdk-deploy-docker-asset-multi-region.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/deploy/cdk-deploy-docker-asset-multi-region.integtest.ts index ab811b9c0..be6a499a8 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/deploy/cdk-deploy-docker-asset-multi-region.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/deploy/cdk-deploy-docker-asset-multi-region.integtest.ts @@ -4,8 +4,7 @@ integTest( 'deploy same docker asset to multiple regions', withDefaultFixture(async (fixture) => { const primaryRegion = fixture.aws.region; - const availableRegions = (process.env.AWS_REGIONS ?? 'us-east-1,us-west-2').split(','); - const secondaryRegion = availableRegions.find((r) => r !== primaryRegion) ?? 'us-west-2'; + const secondaryRegion = ['us-east-1', 'us-west-2'].find((r) => r !== primaryRegion)!; // Bootstrap the secondary region (with the same random qualifier the app // is synthesized with, and a unique stack name to avoid clashing with diff --git a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/diff/cdk-diff---method-change-set-does-not-show-templateurl-change-for-sar-application.integtest.ts b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/diff/cdk-diff---method-change-set-does-not-show-templateurl-change-for-sar-application.integtest.ts index ad5550e94..941854cf3 100644 --- a/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/diff/cdk-diff---method-change-set-does-not-show-templateurl-change-for-sar-application.integtest.ts +++ b/packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/diff/cdk-diff---method-change-set-does-not-show-templateurl-change-for-sar-application.integtest.ts @@ -1,4 +1,5 @@ import { integTest, withSpecificFixture } from '../../../lib'; +import { SAR_REGIONS } from '../../../lib/regions'; /** * Regression test for https://github.com/aws/aws-cdk-cli/issues/2025 @@ -21,5 +22,5 @@ integTest( // THEN expect(diff).not.toContain('TemplateURL'); expect(diff).toContain('There were no differences'); - }), + }, { aws: { regions: SAR_REGIONS } }), ); From 37b1126e7c85a85687e6da663b499fd875444ad0 Mon Sep 17 00:00:00 2001 From: Ian Hou <45278651+iankhou@users.noreply.github.com> Date: Mon, 26 Oct 2026 16:25:57 -0400 Subject: [PATCH 2/2] comment changes --- packages/@aws-cdk-testing/cli-integ/lib/regions.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/@aws-cdk-testing/cli-integ/lib/regions.ts b/packages/@aws-cdk-testing/cli-integ/lib/regions.ts index a3a810a34..323b9e8be 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/regions.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/regions.ts @@ -46,6 +46,7 @@ export function allBut(exclude: string[]): string[] { * Regions that support CloudFormation Stack Refactoring */ export const STACK_REFACTORING_REGIONS = allBut([ + // Unsupported regions 'ap-southeast-5', 'ap-southeast-7', 'mx-central-1', @@ -57,6 +58,7 @@ export const STACK_REFACTORING_REGIONS = allBut([ * @see https://docs.aws.amazon.com/general/latest/gr/serverlessrepo.html */ export const SAR_REGIONS = allBut([ + // Unsupported regions 'ap-northeast-3', 'af-south-1', 'ap-south-2',