Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@aws-sdk/client-acm": "3.632.0",
"@aws-sdk/client-rds": "3.632.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
},
"devDependencies": {
"aws-cdk-lib": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"constructs": "^10.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-sdk/client-amplify": "3.632.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"aws-cdk-lib": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"constructs": "^10.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-cloud9-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-codestar-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ec2-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "^0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-eks-v2-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.242",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-gamelift-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-actions-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iot-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iotevents-actions-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-iotevents-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-ivs-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-go-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/integ-tests-alpha": "0.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-python-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-location-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-msk-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-neptune-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-enrichments-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-sources-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-pipes-targets-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-redshift-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/custom-resource-handlers": "0.0.0",
"@aws-sdk/client-redshift": "3.632.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-route53resolver-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-s3objectlambda-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-sagemaker-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"aws-cdk-lib": "0.0.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/cx-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@
"semver": "^7.7.2"
},
"peerDependencies": {
"@aws-cdk/cloud-assembly-schema": ">=41.0.0"
"@aws-cdk/cloud-assembly-schema": ">=44.0.0"
},
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/cloud-assembly-schema": "^41.2.0",
"@aws-cdk/cloud-assembly-schema": "^44.0.0",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"@types/mock-fs": "^4.13.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/example-construct-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"devDependencies": {
"aws-cdk-lib": "0.0.0",
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@types/jest": "^29.5.14",
"jest": "^29.7.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/integ-tests-alpha/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"license": "Apache-2.0",
"devDependencies": {
"@aws-cdk/cdk-build-tools": "0.0.0",
"@aws-cdk/integ-runner": "^2.186.9",
"@aws-cdk/integ-runner": "^2.186.10",
"@aws-cdk/pkglint": "0.0.0",
"@aws-cdk/aws-custom-resource-sdk-adapter": "0.0.0",
"@aws-sdk/client-ec2": "3.632.0",
Expand Down
7 changes: 3 additions & 4 deletions packages/aws-cdk-lib/aws-ec2/lib/prefix-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,15 +181,14 @@ export class PrefixList extends PrefixListBase {
...(options.addressFamily ? { AddressFamily: options.addressFamily } : undefined),
},
propertiesToReturn: ['PrefixListId'],
expectedMatchCount: 'exactly-one',
} satisfies Omit<cxschema.CcApiContextQuery, 'account'|'region'>,
dummyValue: [dummyResponse] satisfies PrefixListContextResponse[],
}).value;

// getValue returns a list of result objects. We are expecting 1 result or Error.
if (response.length === 0) {
throw new ValidationError(`Could not find any managed prefix lists matching ${JSON.stringify(options)}`, scope);
} else if (response.length > 1) {
throw new ValidationError(`Found ${response.length} managed prefix lists matching ${JSON.stringify(options)}; please narrow the search criteria`, scope);
if (response.length !== 1) {
throw new ValidationError('Unexpected response received from the context provider. Please clear out the context key using `cdk context --remove` and try again.', scope);
}

const prefixList = response[0];
Expand Down
26 changes: 7 additions & 19 deletions packages/aws-cdk-lib/aws-ec2/test/prefix-list.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ describe('prefix list', () => {
PrefixListName: 'com.amazonaws.us-east-1.testprefixlist',
},
propertiesToReturn: ['PrefixListId'],
expectedMatchCount: 'exactly-one',
},
dummyValue: [
{ PrefixListId: 'pl-xxxxxxxx' },
Expand Down Expand Up @@ -215,6 +216,7 @@ describe('prefix list', () => {
AddressFamily: 'IPv6',
},
propertiesToReturn: ['PrefixListId'],
expectedMatchCount: 'exactly-one',
},
dummyValue: [
{ PrefixListId: 'pl-xxxxxxxx' },
Expand All @@ -233,9 +235,11 @@ describe('prefix list', () => {
}).toThrow('All arguments to look up a managed prefix list must be concrete (no Tokens)');
});

test('fromLookup throws if not found', () => {
test.each([
[[]],
[[{ PrefixListId: 'pl-xxxxxxxx' }, { PrefixListId: 'pl-yyyyyyyy' }]],
])('fromLookup throws for unexpected result', (resultObjs) => {
// GIVEN
const resultObjs = [];
jest.spyOn(ContextProvider, 'getValue').mockReturnValue({ value: resultObjs });

// WHEN
Expand All @@ -246,22 +250,6 @@ describe('prefix list', () => {
PrefixList.fromLookup(stack, 'PrefixList', {
prefixListName: 'com.amazonaws.us-east-1.missingprefixlist',
});
}).toThrow('Could not find any managed prefix lists matching');
});

test('fromLookup throws if multiple resources found', () => {
// GIVEN
const resultObjs = [{ PrefixListId: 'pl-xxxxxxxx' }, { PrefixListId: 'pl-yyyyyyyy' }];
jest.spyOn(ContextProvider, 'getValue').mockReturnValue({ value: resultObjs });

// WHEN
const stack = new Stack(undefined, undefined, { env: { region: 'us-east-1', account: '123456789012' } });

// THEN
expect(() => {
PrefixList.fromLookup(stack, 'PrefixList', {
prefixListName: 'com.amazonaws.us-east-1.missingprefixlist',
});
}).toThrow('Found 2 managed prefix lists matching');
}).toThrow('Unexpected response received from the context provider.');
});
});
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"dependencies": {
"@aws-cdk/asset-awscli-v1": "2.2.237",
"@aws-cdk/asset-node-proxy-agent-v6": "^2.1.0",
"@aws-cdk/cloud-assembly-schema": "^41.2.0",
"@aws-cdk/cloud-assembly-schema": "^44.0.0",
"@balena/dockerignore": "^1.0.2",
"case": "1.6.3",
"fs-extra": "^11.3.0",
Expand Down
Loading