Skip to content

Commit

Permalink
Merge branch 'main' into huijbers/node-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Nov 5, 2024
2 parents 949f43e + ae29bb5 commit d04c132
Show file tree
Hide file tree
Showing 486 changed files with 342,450 additions and 326,594 deletions.
58 changes: 0 additions & 58 deletions .github/workflows/repo-metrics-weekly.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/request-cli-integ-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ jobs:
git config --global user.email '[email protected]'
git push --force --atomic https://github.com/${{ github.repository }}.git FETCH_HEAD:test-main-pipeline
- name: Explain next steps
uses: thollander/actions-comment-pull-request@e2c37e53a7d2227b61585343765f73a9ca57eda9
uses: thollander/actions-comment-pull-request@24bffb9b452ba05a4f3f77933840a6a841d1b32b
with:
message: |
:arrow_right: **PR build request submitted to `test-main-pipeline`** :arrow_left:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"standard-version": "^9.5.0",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.2",
"typescript": "~5.4.5"
"typescript": "~5.5.2"
},
"resolutions": {
"colors": "1.4.0",
Expand Down
3 changes: 2 additions & 1 deletion packages/@aws-cdk-testing/cli-integ/lib/aws.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export class AwsClients {
}
}

public async emptyBucket(bucketName: string) {
public async emptyBucket(bucketName: string, options?: { bypassGovernance?: boolean }) {
const objects = await this.s3.send(
new ListObjectVersionsCommand({
Bucket: bucketName,
Expand All @@ -154,6 +154,7 @@ export class AwsClients {
Objects: deletes,
Quiet: false,
},
BypassGovernanceRetention: options?.bypassGovernance ? true : undefined,
}),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
PutRolePolicyCommand,
} from '@aws-sdk/client-iam';
import { InvokeCommand } from '@aws-sdk/client-lambda';
import { PutObjectLockConfigurationCommand } from '@aws-sdk/client-s3';
import { CreateTopicCommand, DeleteTopicCommand } from '@aws-sdk/client-sns';
import { AssumeRoleCommand, GetCallerIdentityCommand } from '@aws-sdk/client-sts';
import {
Expand Down Expand Up @@ -1318,6 +1319,43 @@ integTest(
}),
);

integTest('deploy stack with Lambda Asset to Object Lock-enabled asset bucket', withoutBootstrap(async (fixture) => {
// Bootstrapping with custom toolkit stack name and qualifier
const qualifier = fixture.qualifier;
const toolkitStackName = fixture.bootstrapStackName;
await fixture.cdkBootstrapModern({
verbose: true,
toolkitStackName: toolkitStackName,
qualifier: qualifier,
});

const bucketName = `cdk-${qualifier}-assets-${await fixture.aws.account()}-${fixture.aws.region}`;
await fixture.aws.s3.send(new PutObjectLockConfigurationCommand({
Bucket: bucketName,
ObjectLockConfiguration: {
ObjectLockEnabled: 'Enabled',
Rule: {
DefaultRetention: {
Days: 1,
Mode: 'GOVERNANCE',
},
},
},
}));

// Deploy a stack that definitely contains a file asset
await fixture.cdkDeploy('lambda', {
options: [
'--toolkit-stack-name', toolkitStackName,
'--context', `@aws-cdk/core:bootstrapQualifier=${qualifier}`,
],
});

// THEN - should not fail. Now clean the bucket with governance bypass: a regular delete
// operation will fail.
await fixture.aws.emptyBucket(bucketName, { bypassGovernance: true });
}));

integTest(
'cdk ls',
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.

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

Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-1",
"S3Key": "3ea02d32123ecd935a42a15cebb9022338000fbc3eaa4f1700001dce79df9b8c.zip"
"S3Key": "bbfb567dc956ce71e67ac1f96589821990e2ca48307b93a577bbb345d2de441b.zip"
},
"Timeout": 900,
"MemorySize": 128,
Expand Down

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

Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"Properties": {
"Code": {
"S3Bucket": "cdk-hnb659fds-assets-12345678-us-east-2",
"S3Key": "2c44d9e4e14992db032760cf3293023d14f1ad5b047eb65bf25266aefb5eae08.zip"
"S3Key": "d6fa38886a871b64de769ec5016af90a071e6429aa8e7de84f595e4e2462e17d.zip"
},
"Timeout": 900,
"MemorySize": 128,
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.

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.

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

Loading

0 comments on commit d04c132

Please sign in to comment.