Skip to content

Commit

Permalink
Merge branch 'main' into secrets-manager-security-issue
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorRobertson authored Feb 12, 2024
2 parents b21a0be + e890e89 commit d87ac63
Show file tree
Hide file tree
Showing 649 changed files with 128,443 additions and 11,404 deletions.
8 changes: 0 additions & 8 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@ Closes #<issue number here>.
### Checklist
- [ ] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

<!--Does this PR includes breaking changes? If it does, list them here in the following format (notice how multiple breaking changes should be formatted):
```
BREAKING CHANGE: Description of the breaking change, the previous behaviour, and the new behaviour.
* **module-name:** Another breaking change
* **module-name:** Yet another breaking change
```
-->
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ jobs:
permissions:
pull-requests: write
steps:
- uses: hmarr/auto-approve-action@v3.2.1
- uses: hmarr/auto-approve-action@v4.0.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 1 addition & 1 deletion .github/workflows/spec-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
path: ${{ runner.temp }}

- name: Make Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
# Git commit details
branch: automation/spec-update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
CONTRIB_OUTPUT_FILE: 'CONTRIBUTORS.md'
CONTRIB_IGNORE: 'github-actions[bot],mergify[bot],dependabot[bot],dependabot-preview[bot],aws-cdk-automation'
- name: Create a PR
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
# Git commit details
branch: automation/update-contributors
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-metadata-regions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
run: '[ -s ${{ runner.temp }}/update-spec.patch ] && git apply ${{ runner.temp }}/update-spec.patch || echo "Empty patch. Skipping."'

- name: Make Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
# Git commit details
branch: automation/region-update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ jobs:
}}/upgrade.patch || echo "Empty patch. Skipping."'

- name: Make Pull Request
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v6
with:
# Git commit details
branch: automation/yarn-upgrade
Expand Down
5 changes: 0 additions & 5 deletions .pre-commit-config.yaml

This file was deleted.

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

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.127.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.126.0-alpha.0...v2.127.0-alpha.0) (2024-02-09)


### Features

* **pipes-sources:** new EventBridge Pipes sources alpha module ([#29048](https://github.com/aws/aws-cdk/issues/29048)) ([2e53568](https://github.com/aws/aws-cdk/commit/2e53568af8b3939413e2fe7b6d668a006b4a02d8))


### Bug Fixes

* **appconfig:** deprecate deploy method ([#29021](https://github.com/aws/aws-cdk/issues/29021)) ([9675bcd](https://github.com/aws/aws-cdk/commit/9675bcdd22dda93258b2e2bfcd24b9ef5990e704))
* **integ-tests:** cannot use v3 package name in an awsApiCall ([#28895](https://github.com/aws/aws-cdk/issues/28895)) ([5035080](https://github.com/aws/aws-cdk/commit/5035080ecc7e9e6029478496169344d5eb4b3300)), closes [/github.com/aws/aws-cdk/pull/27313/files#diff-3ab65cbf843775673ff370c9c90deceba5f0ead8a3e016e0c2f243d27bf84609](https://github.com/aws//github.com/aws/aws-cdk/pull/27313/files/issues/diff-3ab65cbf843775673ff370c9c90deceba5f0ead8a3e016e0c2f243d27bf84609) [#28844](https://github.com/aws/aws-cdk/issues/28844)

## [2.126.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.125.0-alpha.0...v2.126.0-alpha.0) (2024-02-02)

## [2.125.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.124.0-alpha.0...v2.125.0-alpha.0) (2024-01-31)
Expand Down
6,158 changes: 2,923 additions & 3,235 deletions CHANGELOG.v2.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/bin/stage-distribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ async function main() {
}

async function validateDirectory(args: {
DIRECTORY: string,
DIRECTORY: string;
}) {
if (!await fs.pathExists(path.join(args.DIRECTORY, 'build.json'))) {
throw new Error(`${args.DIRECTORY} does not look like a CDK dist directory (build.json missing)`);
Expand Down Expand Up @@ -191,7 +191,7 @@ async function doLogin(repo: TestRepository, usageDir: UsageDir, args: {
}

async function publish(repo: TestRepository, usageDir: UsageDir, args: {
DIRECTORY: string,
DIRECTORY: string;
npm?: boolean;
python?: boolean;
java?: boolean;
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk-testing/cli-integ/lib/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { Octokit } from '@octokit/rest';
import * as semver from 'semver';

export async function fetchPreviousVersion(token: string, options?: {
priorTo?: string,
majorVersion?: string,
priorTo?: string;
majorVersion?: string;
}) {
const github = new Octokit({ auth: token });
const releases = await github.repos.listReleases({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,10 +170,10 @@ export class TestRepository {
}

private async ensureRepository(name: string, options?: {
readonly description?: string,
readonly external?: string,
readonly upstreams?: string[],
readonly tags?: Record<string, string>,
readonly description?: string;
readonly external?: string;
readonly upstreams?: string[];
readonly tags?: Record<string, string>;
}) {
if (await this.repositoryExists(name)) { return; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,76 +599,76 @@ integTest('cdk migrate generates migrate.json', withCDKMigrateFixture('typescrip
await fixture.cdkDestroy(fixture.stackNamePrefix);
}));

integTest('cdk migrate --from-scan with AND/OR filters correctly filters resources', withExtendedTimeoutFixture(async (fixture) => {
const stackName = `cdk-migrate-integ-${fixture.randomString}`;

await fixture.cdkDeploy('migrate-stack', {
modEnv: { SAMPLE_RESOURCES: '1' },
});
await fixture.cdk(
['migrate', '--stack-name', stackName, '--from-scan', 'new', '--filter', 'type=AWS::SNS::Topic,tag-key=tag1', 'type=AWS::SQS::Queue,tag-key=tag3'],
{ modEnv: { MIGRATE_INTEG_TEST: '1' }, neverRequireApproval: true, verbose: true, captureStderr: false },
);

try {
const response = await fixture.aws.cloudFormation('describeGeneratedTemplate', {
GeneratedTemplateName: stackName,
});
const resourceNames = [];
for (const resource of response.Resources || []) {
if (resource.LogicalResourceId) {
resourceNames.push(resource.LogicalResourceId);
}
}
fixture.log(`Resources: ${resourceNames}`);
expect(resourceNames.some(ele => ele && ele.includes('migratetopic1'))).toBeTruthy();
expect(resourceNames.some(ele => ele && ele.includes('migratequeue1'))).toBeTruthy();
} finally {
await fixture.cdkDestroy('migrate-stack');
await fixture.aws.cloudFormation('deleteGeneratedTemplate', {
GeneratedTemplateName: stackName,
});
}
}));

integTest('cdk migrate --from-scan for resources with Write Only Properties generates warnings', withExtendedTimeoutFixture(async (fixture) => {
const stackName = `cdk-migrate-integ-${fixture.randomString}`;

await fixture.cdkDeploy('migrate-stack', {
modEnv: {
LAMBDA_RESOURCES: '1',
},
});
await fixture.cdk(
['migrate', '--stack-name', stackName, '--from-scan', 'new', '--filter', 'type=AWS::Lambda::Function,tag-key=lambda-tag'],
{ modEnv: { MIGRATE_INTEG_TEST: '1' }, neverRequireApproval: true, verbose: true, captureStderr: false },
);

try {

const response = await fixture.aws.cloudFormation('describeGeneratedTemplate', {
GeneratedTemplateName: stackName,
});
const resourceNames = [];
for (const resource of response.Resources || []) {
if (resource.LogicalResourceId && resource.ResourceType === 'AWS::Lambda::Function') {
resourceNames.push(resource.LogicalResourceId);
}
}
fixture.log(`Resources: ${resourceNames}`);
const readmePath = path.join(fixture.integTestDir, stackName, 'README.md');
const readme = await fs.readFile(readmePath, 'utf8');
expect(readme).toContain('## Warnings');
for (const resourceName of resourceNames) {
expect(readme).toContain(`### ${resourceName}`);
}
} finally {
await fixture.cdkDestroy('migrate-stack');
await fixture.aws.cloudFormation('deleteGeneratedTemplate', {
GeneratedTemplateName: stackName,
});
}
}));
// integTest('cdk migrate --from-scan with AND/OR filters correctly filters resources', withExtendedTimeoutFixture(async (fixture) => {
// const stackName = `cdk-migrate-integ-${fixture.randomString}`;

// await fixture.cdkDeploy('migrate-stack', {
// modEnv: { SAMPLE_RESOURCES: '1' },
// });
// await fixture.cdk(
// ['migrate', '--stack-name', stackName, '--from-scan', 'new', '--filter', 'type=AWS::SNS::Topic,tag-key=tag1', 'type=AWS::SQS::Queue,tag-key=tag3'],
// { modEnv: { MIGRATE_INTEG_TEST: '1' }, neverRequireApproval: true, verbose: true, captureStderr: false },
// );

// try {
// const response = await fixture.aws.cloudFormation('describeGeneratedTemplate', {
// GeneratedTemplateName: stackName,
// });
// const resourceNames = [];
// for (const resource of response.Resources || []) {
// if (resource.LogicalResourceId) {
// resourceNames.push(resource.LogicalResourceId);
// }
// }
// fixture.log(`Resources: ${resourceNames}`);
// expect(resourceNames.some(ele => ele && ele.includes('migratetopic1'))).toBeTruthy();
// expect(resourceNames.some(ele => ele && ele.includes('migratequeue1'))).toBeTruthy();
// } finally {
// await fixture.cdkDestroy('migrate-stack');
// await fixture.aws.cloudFormation('deleteGeneratedTemplate', {
// GeneratedTemplateName: stackName,
// });
// }
// }));

// integTest('cdk migrate --from-scan for resources with Write Only Properties generates warnings', withExtendedTimeoutFixture(async (fixture) => {
// const stackName = `cdk-migrate-integ-${fixture.randomString}`;

// await fixture.cdkDeploy('migrate-stack', {
// modEnv: {
// LAMBDA_RESOURCES: '1',
// },
// });
// await fixture.cdk(
// ['migrate', '--stack-name', stackName, '--from-scan', 'new', '--filter', 'type=AWS::Lambda::Function,tag-key=lambda-tag'],
// { modEnv: { MIGRATE_INTEG_TEST: '1' }, neverRequireApproval: true, verbose: true, captureStderr: false },
// );

// try {

// const response = await fixture.aws.cloudFormation('describeGeneratedTemplate', {
// GeneratedTemplateName: stackName,
// });
// const resourceNames = [];
// for (const resource of response.Resources || []) {
// if (resource.LogicalResourceId && resource.ResourceType === 'AWS::Lambda::Function') {
// resourceNames.push(resource.LogicalResourceId);
// }
// }
// fixture.log(`Resources: ${resourceNames}`);
// const readmePath = path.join(fixture.integTestDir, stackName, 'README.md');
// const readme = await fs.readFile(readmePath, 'utf8');
// expect(readme).toContain('## Warnings');
// for (const resourceName of resourceNames) {
// expect(readme).toContain(`### ${resourceName}`);
// }
// } finally {
// await fixture.cdkDestroy('migrate-stack');
// await fixture.aws.cloudFormation('deleteGeneratedTemplate', {
// GeneratedTemplateName: stackName,
// });
// }
// }));

['typescript', 'python', 'csharp', 'java'].forEach(language => {
integTest(`cdk migrate --from-stack creates deployable ${language} app`, withExtendedTimeoutFixture(async (fixture) => {
Expand Down Expand Up @@ -746,7 +746,7 @@ integTest('enableDiffNoFail', withDefaultFixture(async (fixture) => {
await fs.writeFile(path.join(fixture.integTestDir, 'cdk.json'), JSON.stringify(cdkJson));
}

type DiffParameters = { fail?: boolean, enableDiffNoFail: boolean };
type DiffParameters = { fail?: boolean; enableDiffNoFail: boolean };
}));

integTest('cdk diff --fail on multiple stacks exits with error if any of the stacks contains a diff', withDefaultFixture(async (fixture) => {
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.

Loading

0 comments on commit d87ac63

Please sign in to comment.