Skip to content

Commit

Permalink
Merge branch 'main' into eks-remove-nested-stack
Browse files Browse the repository at this point in the history
  • Loading branch information
xazhao authored Dec 30, 2024
2 parents 24079a1 + 6c790fd commit e41cb16
Show file tree
Hide file tree
Showing 527 changed files with 114,344 additions and 4,130 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,22 @@ jobs:
- name: Install dependencies
run: yarn install

- name: Build Library
run: npx lerna run build --scope=aws-cdk-lib

- name: Build CLI
run: npx lerna run build --scope=aws-cdk

- name: Run tests
- name: Run Core tests
run: cd packages/aws-cdk-lib && yarn test core

- name: Run CLI tests
run: cd packages/aws-cdk && yarn test

- name: Upload results to Codecov
uses: codecov/codecov-action@v4
with:
directory: packages/aws-cdk/coverage
files: packages/aws-cdk/coverage/cobertura-coverage.xml,packages/aws-cdk-lib/coverage/cobertura-coverage.xml
fail_ci_if_error: true
flags: suite.unit
token: ${{ secrets.CODECOV_TOKEN }}
8 changes: 8 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

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.173.4-alpha.0](https://github.com/aws/aws-cdk/compare/v2.173.3-alpha.0...v2.173.4-alpha.0) (2024-12-27)

## [2.173.3-alpha.0](https://github.com/aws/aws-cdk/compare/v2.173.2-alpha.0...v2.173.3-alpha.0) (2024-12-26)

## [2.173.2-alpha.0](https://github.com/aws/aws-cdk/compare/v2.173.1-alpha.0...v2.173.2-alpha.0) (2024-12-17)

## [2.173.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.173.0-alpha.0...v2.173.1-alpha.0) (2024-12-14)

## [2.173.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.172.0-alpha.0...v2.173.0-alpha.0) (2024-12-11)


Expand Down
38 changes: 33 additions & 5 deletions CHANGELOG.v2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

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.173.4](https://github.com/aws/aws-cdk/compare/v2.173.3...v2.173.4) (2024-12-27)


### Bug Fixes

* **cli:** cli still fails for some plugins returning `expiration: null` ([#32668](https://github.com/aws/aws-cdk/issues/32668)) ([4da2f65](https://github.com/aws/aws-cdk/commit/4da2f6553cf488897c0ec10cce063bd3168b726f)), closes [#32111](https://github.com/aws/aws-cdk/issues/32111)

## [2.173.3](https://github.com/aws/aws-cdk/compare/v2.173.2...v2.173.3) (2024-12-26)


### Bug Fixes

* **aspects:** "localAspects is not iterable" error ([#32647](https://github.com/aws/aws-cdk/issues/32647)) ([8948ecb](https://github.com/aws/aws-cdk/commit/8948ecb22627ef57498e68fb721b0598aaa530ee)), closes [#32470](https://github.com/aws/aws-cdk/issues/32470)

## [2.173.2](https://github.com/aws/aws-cdk/compare/v2.173.1...v2.173.2) (2024-12-17)


### Bug Fixes

* **cli:** allow credential plugins to return `null` for `expiration` ([#32554](https://github.com/aws/aws-cdk/issues/32554)) ([e59b1db](https://github.com/aws/aws-cdk/commit/e59b1db4d8da5fc11d0e3beeb136593440100325))
* **cli:** doesn't support plugins that return initially empty credentials ([#32552](https://github.com/aws/aws-cdk/issues/32552)) ([7ee9b90](https://github.com/aws/aws-cdk/commit/7ee9b909695aca317a11aad16ca983dcc6d6f85a))

## [2.173.1](https://github.com/aws/aws-cdk/compare/v2.173.0...v2.173.1) (2024-12-14)


### Bug Fixes

* **cli:** getting credentials via SSO fails when the region is set in the profile ([#32520](https://github.com/aws/aws-cdk/issues/32520)) ([01fec04](https://github.com/aws/aws-cdk/commit/01fec04ea8c0e33a406e6727801f8bc133a21196))

## [2.173.0](https://github.com/aws/aws-cdk/compare/v2.172.0...v2.173.0) (2024-12-11)


Expand Down Expand Up @@ -35,12 +64,11 @@ All notable changes to this project will be documented in this file. See [standa

* **apigateway:** We will be removing deprecated `APIGatewayV2` constructs from `aws-apigateway` module.

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*

### Features

* **aspects:** priority-ordered aspect invocation ([#32097](https://github.com/aws/aws-cdk/issues/32097)) ([8ccdff4](https://github.com/aws/aws-cdk/commit/8ccdff4ee083d66f73259223ba75ba0b8a0752a0)), closes [#21341](https://github.com/aws/aws-cdk/issues/21341) [/github.com/aws/aws-cdk/blob/8b495f9ec157c0b00674715f62b1bbcabf2096ac/packages/aws-cdk-lib/core/lib/private/synthesis.ts#L217](https://github.com/aws//github.com/aws/aws-cdk/blob/8b495f9ec157c0b00674715f62b1bbcabf2096ac/packages/aws-cdk-lib/core/lib/private/synthesis.ts/issues/L217)
* **cognito:** new `cloudFrontEndpoint` method for user pool domain without custom resource ([#31402](https://github.com/aws/aws-cdk/issues/31402)) ([deeb2ad](https://github.com/aws/aws-cdk/commit/deeb2ad0bc38101a9f1fa8162ad5d6008900a98d)), closes [#31342](https://github.com/aws/aws-cdk/issues/31342) [/github.com/go-to-k/aws-cdk/blob/fcbdc769e681f1f915cdc8cd7aa3a565d807884d/packages/aws-cdk-lib/aws-route53-targets/lib/userpool-domain.ts#L14](https://github.com/aws//github.com/go-to-k/aws-cdk/blob/fcbdc769e681f1f915cdc8cd7aa3a565d807884d/packages/aws-cdk-lib/aws-route53-targets/lib/userpool-domain.ts/issues/L14)
* **aspects:** priority-ordered aspect invocation ([#32097](https://github.com/aws/aws-cdk/issues/32097)) ([8ccdff4](https://github.com/aws/aws-cdk/commit/8ccdff4ee083d66f73259223ba75ba0b8a0752a0)), closes [#21341](https://github.com/aws/aws-cdk/issues/21341)
* **cognito:** new `cloudFrontEndpoint` method for user pool domain without custom resource ([#31402](https://github.com/aws/aws-cdk/issues/31402)) ([deeb2ad](https://github.com/aws/aws-cdk/commit/deeb2ad0bc38101a9f1fa8162ad5d6008900a98d)), closes [#31342](https://github.com/aws/aws-cdk/issues/31342)
* **cognito:** support for ALLOW_USER_AUTH explicit auth flow ([#32273](https://github.com/aws/aws-cdk/issues/32273)) ([c5bcfdc](https://github.com/aws/aws-cdk/commit/c5bcfdc57aa763539b31f4e7f6f115f707c401a4))
* **elasticloadbalancingv2:** ip address type for both network and application target group ([#32189](https://github.com/aws/aws-cdk/issues/32189)) ([7cc5f30](https://github.com/aws/aws-cdk/commit/7cc5f305c839048454240f8d6db1614e2dfa4c53))
* **events:** add filter rules for prefixEqualsIgnoreCase, suffixEqualsIgnoreCase, wildcard, and anythingBut* matches ([#32063](https://github.com/aws/aws-cdk/issues/32063)) ([0ce71fc](https://github.com/aws/aws-cdk/commit/0ce71fc50cffffc04d9d1bc9c98c9c04e77bfe1f)), closes [#28462](https://github.com/aws/aws-cdk/issues/28462)
Expand All @@ -57,14 +85,14 @@ All notable changes to this project will be documented in this file. See [standa
* **apigateway:** remove deprecated apigatewayv2 from aws-apigateway module ([#32297](https://github.com/aws/aws-cdk/issues/32297)) ([4db9565](https://github.com/aws/aws-cdk/commit/4db956597b41bb9d7dd8e1d65b39643772065353))
* **appsync:** `appsync.HttpDataSourceProps` erroneously extends `BaseDataSourceProps` ([#32065](https://github.com/aws/aws-cdk/issues/32065)) ([4e7f5c4](https://github.com/aws/aws-cdk/commit/4e7f5c4469509ed4e1d586a9c5263f19b540a7bd)), closes [#29689](https://github.com/aws/aws-cdk/issues/29689)
* **cli:** assume role calls are skipping the proxy ([#32291](https://github.com/aws/aws-cdk/issues/32291)) ([6c0f74e](https://github.com/aws/aws-cdk/commit/6c0f74e4b37b8ef81c927adca1112680d0bf2ad0))
* **cli:** lambda hotswap fails if `lambda:GetFunctionConfiguration` action is not allowed ([#32301](https://github.com/aws/aws-cdk/issues/32301)) ([be000a2](https://github.com/aws/aws-cdk/commit/be000a251b781b0b0870930992793df5a2fc4b01)), closes [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts#L10](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdatedV2.ts/issues/L10) [/github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts#L13](https://github.com/aws//github.com/aws/aws-sdk-js-v3/blob/main/clients/client-lambda/src/waiters/waitForFunctionUpdated.ts/issues/L13)
* **cli:** lambda hotswap fails if `lambda:GetFunctionConfiguration` action is not allowed ([#32301](https://github.com/aws/aws-cdk/issues/32301)) ([be000a2](https://github.com/aws/aws-cdk/commit/be000a251b781b0b0870930992793df5a2fc4b01)), closes [#32219](https://github.com/aws/aws-cdk/issues/32219)
* **cli:** mfa code is not requested when `$AWS_PROFILE` is used ([#32313](https://github.com/aws/aws-cdk/issues/32313)) ([6458439](https://github.com/aws/aws-cdk/commit/6458439b08f9ce1f49c1137dd85bb582550a5f52)), closes [#32312](https://github.com/aws/aws-cdk/issues/32312)
* **cli:** remove source maps ([#32317](https://github.com/aws/aws-cdk/issues/32317)) ([512cf95](https://github.com/aws/aws-cdk/commit/512cf952f3971cd302fb1cca7c24149b43832280)), closes [#19930](https://github.com/aws/aws-cdk/issues/19930) [#19930](https://github.com/aws/aws-cdk/issues/19930)
* **cli:** short-lived credentials are not refreshed ([#32354](https://github.com/aws/aws-cdk/issues/32354)) ([058a0bf](https://github.com/aws/aws-cdk/commit/058a0bfc22036230252fcbc026576260723f6d28))
* **cli:** warns about missing `--no-rollback` flag that is present ([#32309](https://github.com/aws/aws-cdk/issues/32309)) ([559d676](https://github.com/aws/aws-cdk/commit/559d676e2989739b38491b1f767face839d39f69)), closes [#32295](https://github.com/aws/aws-cdk/issues/32295)
* **cloudformation-include:** drops unknown policy attributes ([#32321](https://github.com/aws/aws-cdk/issues/32321)) ([20edc7f](https://github.com/aws/aws-cdk/commit/20edc7fe5e891461a8188d306dcc0f776041cf8f))
* **cloudfront:** propagate `originAccessControlId` CloudFront Origin property to CloudFormation templates ([#32020](https://github.com/aws/aws-cdk/issues/32020)) ([f9708a6](https://github.com/aws/aws-cdk/commit/f9708a634ceaef7f62e8193443ea30fe9e2fbad6)), closes [#32018](https://github.com/aws/aws-cdk/issues/32018)
* **iam:** `Role.addManagedPolicy()` does not work for imported roles `IRole` [#8307](https://github.com/aws/aws-cdk/issues/8307) ([#31212](https://github.com/aws/aws-cdk/issues/31212)) ([c78ef1b](https://github.com/aws/aws-cdk/commit/c78ef1b43a18e1ffc93fcbdee9dd2e91fa750a36)), closes [/github.com/aws/aws-cdk/blob/823ff6e03899f790a4cb1c43f92a02cc906ac356/packages/aws-cdk-lib/aws-iam/lib/identity-base.ts#L17-L21](https://github.com/aws//github.com/aws/aws-cdk/blob/823ff6e03899f790a4cb1c43f92a02cc906ac356/packages/aws-cdk-lib/aws-iam/lib/identity-base.ts/issues/L17-L21)
* **iam:** `Role.addManagedPolicy()` does not work for imported roles `IRole` ([#31212](https://github.com/aws/aws-cdk/issues/31212)) ([c78ef1b](https://github.com/aws/aws-cdk/commit/c78ef1b43a18e1ffc93fcbdee9dd2e91fa750a36)), closes [#8307](https://github.com/aws/aws-cdk/issues/8307)

## [2.171.1](https://github.com/aws/aws-cdk/compare/v2.171.0...v2.171.1) (2024-11-27)

Expand Down
2 changes: 1 addition & 1 deletion aws-cdk.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"name": "aws-custom-resource-sdk-adapter",
"rootPath": "packages/@aws-cdk/aws-custom-resource-sdk-adapter"
},
{ "name": "yargs-gen", "rootPath": "tools/@aws-cdk/yargs-gen" }
{ "name": "cli-args-gen", "rootPath": "tools/@aws-cdk/cli-args-gen" }
]
},
"extensions": {
Expand Down
12 changes: 10 additions & 2 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ coverage:
default:
# require the overall patch coverage to be at least 95%
target: 95


# https://docs.codecov.com/docs/codecovyml-reference#comment
comment:
Expand All @@ -26,7 +25,16 @@ component_management:
- type: patch
target: 95
individual_components:
- component_id: packages_aws_cdk # identifier that should not be changed
- component_id: packages_aws_cdk # identifier that should not be changed
name: packages/aws-cdk # display name that can change freely
paths:
- packages/aws-cdk/**
- component_id: packages_aws_cdk_lib_core # identifier that should not be changed
name: packages/aws-cdk-lib/core # display name that can change freely
paths:
- packages/aws-cdk-lib/core/**

# https://docs.codecov.com/docs/ignoring-paths
ignore:
- packages/aws-cdk/lib/parse-command-line-arguments.ts # this file is generated and some lines cannot be tested
- packages/aws-cdk/lib/cli.ts # we integ test this file
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"packages/@aws-cdk-testing/*",
"packages/@aws-cdk/*/lambda-packages/*",
"tools/@aws-cdk/cdk-build-tools",
"tools/@aws-cdk/yargs-gen",
"tools/@aws-cdk/cli-args-gen",
"tools/@aws-cdk/cdk-release",
"tools/@aws-cdk/node-bundle",
"tools/@aws-cdk/pkglint",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"packages/@aws-cdk-testing/*",
"packages/@aws-cdk/*/lambda-packages/*",
"tools/@aws-cdk/cdk-build-tools",
"tools/@aws-cdk/yargs-gen",
"tools/@aws-cdk/cli-args-gen",
"tools/@aws-cdk/cdk-release",
"tools/@aws-cdk/node-bundle",
"tools/@aws-cdk/pkglint",
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/query-github
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('./query-github.js');
require('../lib/cli/query-github.js');
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/run-suite
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('./run-suite.js');
require('../lib/cli/run-suite.js');
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/stage-distribution
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('./stage-distribution.js');
require('../lib/cli/stage-distribution.js');
2 changes: 1 addition & 1 deletion packages/@aws-cdk-testing/cli-integ/bin/test-root
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('./test-root.js');
require('../lib/cli/test-root.js');
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// eslint-disable-next-line jest/no-jest-import
import * as yargs from 'yargs';
import { fetchPreviousVersion } from '../lib/github';
import { fetchPreviousVersion } from '../github';

async function main() {
const args = await yargs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/* eslint-disable no-console */
import * as path from 'path';
// eslint-disable-next-line jest/no-jest-import
import * as jest from 'jest';
import * as yargs from 'yargs';
import { ReleasePackageSourceSetup } from '../lib/package-sources/release-source';
import { RepoPackageSourceSetup, autoFindRoot } from '../lib/package-sources/repo-source';
import { IPackageSourceSetup } from '../lib/package-sources/source';
import { serializeForSubprocess } from '../lib/package-sources/subprocess';
import { ReleasePackageSourceSetup } from '../package-sources/release-source';
import { RepoPackageSourceSetup, autoFindRoot } from '../package-sources/repo-source';
import { IPackageSourceSetup } from '../package-sources/source';
import { serializeForSubprocess } from '../package-sources/subprocess';

async function main() {
const args = await yargs
Expand Down Expand Up @@ -127,7 +126,7 @@ async function main() {
...args.verbose ? ['--verbose'] : [],
...passWithNoTests ? ['--passWithNoTests'] : [],
...args['test-file'] ? [args['test-file']] : [],
], path.resolve(__dirname, '..', 'resources', 'integ.jest.config.js'));
], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js'));

} finally {
await packageSource.cleanup();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ import * as path from 'path';
import * as fs from 'fs-extra';
import * as glob from 'glob';
import * as yargs from 'yargs';
import { shell } from '../lib';
import { TestRepository } from '../lib/staging/codeartifact';
import { uploadJavaPackages, mavenLogin } from '../lib/staging/maven';
import { uploadNpmPackages, npmLogin } from '../lib/staging/npm';
import { uploadDotnetPackages, nugetLogin } from '../lib/staging/nuget';
import { uploadPythonPackages, pypiLogin } from '../lib/staging/pypi';
import { UsageDir } from '../lib/staging/usage-dir';
import { shell } from '..';
import { TestRepository } from '../staging/codeartifact';
import { uploadJavaPackages, mavenLogin } from '../staging/maven';
import { uploadNpmPackages, npmLogin } from '../staging/npm';
import { uploadDotnetPackages, nugetLogin } from '../staging/nuget';
import { uploadPythonPackages, pypiLogin } from '../staging/pypi';
import { UsageDir } from '../staging/usage-dir';

async function main() {
await yargs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import * as path from 'path';
// eslint-disable-next-line no-console
console.log(path.resolve(__dirname, '..'));
console.log(path.resolve(__dirname, '..', '..'));
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,16 @@ const POOL_NAME = 'resource-pool.test';
test('take and dispose', async () => {
const pool = ResourcePool.withResources(POOL_NAME, ['a']);
const take1 = pool.take();
const take2 = pool.take();

let released = false;

const lease1 = await take1;

// We must start the take2 only after take1 has definitely
// succeeded, otherwise we have a race condition if take2 happens to
// win the race (we expect take1 to succeed and take2 to wait).
const take2 = pool.take();

// awaiting 'take2' would now block but we add an async
// handler to it to flip a boolean to see when it gets activated.
void(take2.then(() => released = true));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1114,7 +1114,7 @@ integTest(
await diffShouldSucceedWith({ fail: undefined, enableDiffNoFail: true });

async function diffShouldSucceedWith(props: DiffParameters) {
await expect(diff(props)).resolves.not.toThrowError();
await expect(diff(props)).resolves.not.toThrow();
}

async function diffShouldFailWith(props: DiffParameters) {
Expand Down Expand Up @@ -2828,7 +2828,7 @@ integTest('requests go through a proxy when configured',
});

// We don't need to modify any request, so the proxy
// passes through all requests to the host.
// passes through all requests to the target host.
const endpoint = await proxyServer
.forAnyRequest()
.thenPassThrough();
Expand All @@ -2845,13 +2845,21 @@ integTest('requests go through a proxy when configured',
'--proxy', proxyServer.url,
'--ca-bundle-path', certPath,
],
modEnv: {
CDK_HOME: fixture.integTestDir,
},
});
} finally {
await fs.rm(certDir, { recursive: true, force: true });
await proxyServer.stop();
}

const actionsUsed = actions(await endpoint.getSeenRequests());
const requests = await endpoint.getSeenRequests();

expect(requests.map(req => req.url))
.toContain('https://cli.cdk.dev-tools.aws.dev/notices.json');

const actionsUsed = actions(requests);
expect(actionsUsed).toContain('AssumeRole');
expect(actionsUsed).toContain('CreateChangeSet');
}),
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 e41cb16

Please sign in to comment.