Skip to content

Commit

Permalink
Merge branch 'main' into 29225
Browse files Browse the repository at this point in the history
  • Loading branch information
msambol authored Apr 22, 2024
2 parents 1a3b36d + 1d16304 commit 32d90e2
Show file tree
Hide file tree
Showing 907 changed files with 294,088 additions and 252,652 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/request-cli-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
persist-credentials: false
- name: Find changed cli files
id: changed-cli-files
uses: tj-actions/changed-files@2d756ea4c53f7f6b397767d8723b3a10a9f35bf2
uses: tj-actions/changed-files@635f118699dd888d737c15018cd30aff2e0274f8
with:
base_sha: ${{ github.event.pull_request.base.sha }}
files_yaml: |
Expand All @@ -36,6 +36,12 @@ jobs:
- packages/aws-cdk-lib/cloud-assembly-schema/test/**
- packages/@aws-cdk/cloudformation-diff/lib/**
- packages/@aws-cdk/cloudformation-diff/test/**
- packages/@aws-cdk-testing/cli-integ/bin/**
- packages/@aws-cdk-testing/cli-integ/entrypoints/**
- packages/@aws-cdk-testing/cli-integ/lib/**
- packages/@aws-cdk-testing/cli-integ/resources/**
- packages/@aws-cdk-testing/cli-integ/test/**
- packages/@aws-cdk-testing/cli-integ/tests/**
submit-to-test-pipeline:
environment: test-pipeline
needs: cli-changes
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,6 @@ read*lock
# VSCode jest plugin
.test-output

# Nx cache
.nx/

11 changes: 11 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.138.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.137.0-alpha.0...v2.138.0-alpha.0) (2024-04-18)


### ⚠ BREAKING CHANGES TO EXPERIMENTAL FEATURES

* **cognito-identitypool-alpha:** The argument of `IdentityPoolProviderUrl.userPool()` has been changed from `url: string` to `userPool: UserPool, userPoolClient: UserPoolClient`. If you want to specify custom identifier string, use `IdentityPoolProviderUrl.custom()` instead.

### Bug Fixes

* **cognito-identitypool-alpha:** inconvenient IdentityPoolProviderUrl.userPool() ([#29025](https://github.com/aws/aws-cdk/issues/29025)) ([90a7734](https://github.com/aws/aws-cdk/commit/90a773407753b4ff868dede4442bf20243dfeaec))

## [2.137.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.136.1-alpha.0...v2.137.0-alpha.0) (2024-04-10)


Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,31 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.138.0](https://github.com/aws/aws-cdk/compare/v2.137.0...v2.138.0) (2024-04-18)


### Features

* **AppSync:** addRdsDataSource support for DatabaseCluster ([#29544](https://github.com/aws/aws-cdk/issues/29544)) ([1894f2d](https://github.com/aws/aws-cdk/commit/1894f2db54eed7d65c9f54cb07cee6dd84200ad7)), closes [#29302](https://github.com/aws/aws-cdk/issues/29302)
* **cognito:** support provider details for `UserPoolIdentityProviderSaml` ([#29588](https://github.com/aws/aws-cdk/issues/29588)) ([375f1a6](https://github.com/aws/aws-cdk/commit/375f1a6c0bd5952091b1bb4634faaabcb4ca126e)), closes [#29494](https://github.com/aws/aws-cdk/issues/29494) [#29598](https://github.com/aws/aws-cdk/issues/29598)
* **custom-resources:** add logging property to `AwsSdkCall` and create `Logging` class ([#29648](https://github.com/aws/aws-cdk/issues/29648)) ([b049064](https://github.com/aws/aws-cdk/commit/b0490640a25eb1946aa9db748cf85867e841f243))
* **ec2:** well-known port aliases ([#29793](https://github.com/aws/aws-cdk/issues/29793)) ([f10494c](https://github.com/aws/aws-cdk/commit/f10494cab79c033d7913a435b0e2db12fe59698d))
* **elasticloadbalancingv2:** add removeSuffix param for ExternalApplicationListener.addAction() ([#29746](https://github.com/aws/aws-cdk/issues/29746)) ([f4af330](https://github.com/aws/aws-cdk/commit/f4af33018e374ea97346e8ec70776feb46f6ab7b)), closes [#29496](https://github.com/aws/aws-cdk/issues/29496)
* **route53:** `DNSSEC` zone signing ([#28604](https://github.com/aws/aws-cdk/issues/28604)) ([213fffc](https://github.com/aws/aws-cdk/commit/213fffc84f2206f064ae5143b8dc6eff9d21b50d))
* **sns:** add TracingConfig prop ([#29783](https://github.com/aws/aws-cdk/issues/29783)) ([f14b60f](https://github.com/aws/aws-cdk/commit/f14b60fc990cb98d1d2b0e48f9a89492bddf868c)), closes [#29714](https://github.com/aws/aws-cdk/issues/29714)
* **stepfunctions-tasks:** add httpinvoke step functions task ([#28673](https://github.com/aws/aws-cdk/issues/28673)) ([178e481](https://github.com/aws/aws-cdk/commit/178e48189524c608decd631c5e76e95a34fe5122)), closes [#28278](https://github.com/aws/aws-cdk/issues/28278)
* update L1 CloudFormation resource definitions ([#29798](https://github.com/aws/aws-cdk/issues/29798)) ([7103fed](https://github.com/aws/aws-cdk/commit/7103fed9bc03062e464d907818afcf32c27ba6b2)), closes [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html/issues/aws-resource-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html#aws-resource-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-launchtemplate.html/issues/aws-resource-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html/issues/cfn-ec2) [/docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html#cfn-ec2](https://github.com/aws//docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-security-group.html/issues/cfn-ec2)


### Bug Fixes

* **ecs-patterns:** integ test failed with certificate error ([#29623](https://github.com/aws/aws-cdk/issues/29623)) ([5347369](https://github.com/aws/aws-cdk/commit/5347369fa11f4f11ab3893b9ac4c8467c5d514c3)), closes [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406) [/github.com/aws/aws-cdk/pull/29186#issuecomment-1959231406](https://github.com/aws//github.com/aws/aws-cdk/pull/29186/issues/issuecomment-1959231406)
* **eks:** add support of Helm charts located in ECR of AWS CN region ([#29778](https://github.com/aws/aws-cdk/issues/29778)) ([0da25e5](https://github.com/aws/aws-cdk/commit/0da25e5da491b0778eed0444cbb05455bd562b42)), closes [#28460](https://github.com/aws/aws-cdk/issues/28460)
* **globalaccelerator:** changing `installLatestAwsSdk` breaks Security Group reference ([#29620](https://github.com/aws/aws-cdk/issues/29620)) ([ece7eb6](https://github.com/aws/aws-cdk/commit/ece7eb671e588aff6e9d0f2ee4b53933cb9589a5)), closes [#23796](https://github.com/aws/aws-cdk/issues/23796) [/github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-globalaccelerator/lib/_accelerator-security-group.ts#L32](https://github.com/aws//github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-globalaccelerator/lib/_accelerator-security-group.ts/issues/L32)
* **lambda:** version.fromVersionArn creates invalid Version object ([#29820](https://github.com/aws/aws-cdk/issues/29820)) ([8198884](https://github.com/aws/aws-cdk/commit/819888470248fed2ddbdac689f14254688eef88f))
* **spec2cdk:** get tag gives null result in Java CDK ([#29870](https://github.com/aws/aws-cdk/issues/29870)) ([5a918d1](https://github.com/aws/aws-cdk/commit/5a918d12ec0455626b5630b35aa47e6d9da6df7c))
* **stepfunctions:** the catch field in CustomState is not rendered ([#29654](https://github.com/aws/aws-cdk/issues/29654)) ([77e9fc6](https://github.com/aws/aws-cdk/commit/77e9fc6bd2066862312355801f7f04c5a5f02d6a))

## [2.137.0](https://github.com/aws/aws-cdk/compare/v2.136.1...v2.137.0) (2024-04-10)


Expand Down
4 changes: 2 additions & 2 deletions aws-cdk.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
"rootPath": "packages/@aws-cdk/integ-tests-alpha"
},
{
"name": "sdk-v2-to-v3-adapter",
"rootPath": "packages/@aws-cdk/sdk-v2-to-v3-adapter"
"name": "aws-custom-resource-sdk-adapter",
"rootPath": "packages/@aws-cdk/aws-custom-resource-sdk-adapter"
}
]
},
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@
"jsii-diff": "1.97.0",
"jsii-pacmak": "1.97.0",
"jsii-reflect": "1.97.0",
"jsii-rosetta": "~5.4.0",
"lerna": "^7.4.2",
"nx": "^16.10.0",
"jsii-rosetta": "~5.4.2",
"lerna": "^8.1.2",
"nx": "^18.3.1",
"patch-package": "^6.5.1",
"semver": "^7.6.0",
"standard-version": "^9.5.0",
Expand Down
42 changes: 42 additions & 0 deletions packages/@aws-cdk-testing/cli-integ/lib/eventually.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/**
* @param maxAttempts the maximum number of attempts
* @param interval interval in milliseconds to observe between attempts
*/
export type EventuallyOptions = {
maxAttempts?: number;
interval?: number;
};

const wait = (ms: number): Promise<void> => new Promise((resolve) => setTimeout(resolve, ms));
const DEFAULT_INTERVAL = 1000;
const DEFAULT_MAX_ATTEMPTS = 10;

/**
* Runs a function on an interval until the maximum number of attempts has
* been reached.
*
* Default interval = 1000 milliseconds
* Default maxAttempts = 10
*
* @param fn function to run
* @param options EventuallyOptions
*/
const eventually = async <T>(call: () => Promise<T>, options?: EventuallyOptions): Promise<T> => {
const opts = {
interval: options?.interval ? options.interval : DEFAULT_INTERVAL,
maxAttempts: options?.maxAttempts ? options.maxAttempts : DEFAULT_MAX_ATTEMPTS,
};

while (opts.maxAttempts-- >= 0) {
try {
return await call();
} catch (err) {
if (opts.maxAttempts <= 0) throw err;
}
await wait(opts.interval);
}

throw new Error('An unexpected error has occurred.');
};

export default eventually;
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
},
"dependencies": {
"@octokit/rest": "^18.12.0",
"aws-sdk": "^2.1596.0",
"aws-sdk": "^2.1600.0",
"axios": "^1.6.8",
"fs-extra": "^9.1.0",
"glob": "^7.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import * as fs from 'fs';
import * as path from 'path';
import * as yaml from 'yaml';
import { integTest, randomString, withoutBootstrap } from '../../lib';
import eventually from '../../lib/eventually';

jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime

Expand Down Expand Up @@ -283,17 +284,25 @@ integTest('can remove customPermissionsBoundary', withoutBootstrap(async (fixtur
}),
});
policyArn = policy.Policy?.Arn;
await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
toolkitStackName: bootstrapStackName,
customPermissionsBoundary: policyName,
});

const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
expect(
response.Stacks?.[0].Parameters?.some(
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
)).toEqual(true);
// Policy creation and consistency across regions is "almost immediate"
// See: https://docs.aws.amazon.com/IAM/latest/UserGuide/troubleshoot_general.html#troubleshoot_general_eventual-consistency
// We will put this in an `eventually` block to retry stack creation with a reasonable timeout
const createStackWithPermissionBoundary = async (): Promise<void> => {
await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
toolkitStackName: bootstrapStackName,
customPermissionsBoundary: policyName,
});

const response = await fixture.aws.cloudFormation('describeStacks', { StackName: bootstrapStackName });
expect(
response.Stacks?.[0].Parameters?.some(
param => (param.ParameterKey === 'InputPermissionsBoundary' && param.ParameterValue === policyName),
)).toEqual(true);
};

await eventually(createStackWithPermissionBoundary, { maxAttempts: 3 });

await fixture.cdkBootstrapModern({
// toolkitStackName doesn't matter for this particular invocation
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk-testing/framework-integ/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
"@aws-cdk/lambda-layer-kubectl-v24": "^2.0.242",
"@aws-cdk/lambda-layer-kubectl-v29": "^2.0.0",
"aws-cdk-lib": "0.0.0",
"aws-sdk": "^2.1596.0",
"aws-sdk": "^2.1600.0",
"aws-sdk-mock": "5.6.0",
"cdk8s": "2.68.58",
"cdk8s": "2.68.60",
"cdk8s-plus-27": "2.7.88",
"constructs": "^10.0.0"
},
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 32d90e2

Please sign in to comment.