Skip to content

Commit 12a1a8f

Browse files
authored
Merge branch 'main' into merge-back/2.121.1
2 parents d86bb1a + 6e9045f commit 12a1a8f

File tree

44 files changed

+5583
-470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+5583
-470
lines changed

.github/workflows/github-merit-badger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ jobs:
1717
badges: '[beginning-contributor,repeat-contributor,valued-contributor,admired-contributor,star-contributor,distinguished-contributor]'
1818
thresholds: '[0,3,6,13,25,50]'
1919
badge-type: 'achievement'
20-
ignore-usernames: '[rix0rrr,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,GavinZZ,aws-cdk-automation,dependabot[bot],mergify[bot]]'
20+
ignore-usernames: '[rix0rrr,MrArnoldPalmer,iliapolo,otaviomacedo,madeline-k,kaizencc,comcalvi,TheRealAmazonKendra,vinayak-kukreja,mrgrain,pahud,cgarvis,kellertk,HBobertz,sumupitchayan,SankyRed,udaypant,colifran,khushail,scanlonp,mikewrighton,moelasmar,paulhcsun,awsmjs,evgenyka,GavinZZ,aaythapa,xazhao,ConnorRobertson,ssenchenko,gracelu0,jfuss,SimonCMoore,aws-cdk-automation,dependabot[bot],mergify[bot]]'

.github/workflows/sync-from-upstream.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,15 @@ jobs:
1111

1212
# Check for the presence of a PROJEN_GITHUB_TOKEN secret.
1313
#
14-
# This is expected to contain a personal access token of someone
15-
# who pas permissions to bypass branch protection rules.
14+
# This is expected to contain a personal access token of someone who has
15+
# permissions to bypass branch protection rules.
1616
#
17-
# If not present, we will use GitHub Actions Token permissions,
18-
# but those are bound by branch protection rules.
17+
# If not present, we can only use GitHub Actions Token permissions,
18+
# but this has the following downsides:
19+
#
20+
# - Those are bound by branch protection rules (so automated pushing won't work).
21+
# - As soon as a workflow file needs to be changed, GitHub will reject the push.
22+
# Only Apps and Users can be allowed to modify workflows.
1923
check-secret:
2024
# Don't run on the target repo itself, only forks
2125
if: github.repository != 'aws/aws-cdk'
@@ -52,7 +56,7 @@ jobs:
5256
- name: Sync from aws/aws-cdk
5357
run: |-
5458
git remote add upstream https://github.com/aws/aws-cdk.git
55-
git fetch upstream
59+
git fetch upstream $BRANCHES
5660
5761
for branch in $BRANCHES; do
5862
git push origin --force refs/remotes/upstream/$branch:refs/heads/$branch

.mergify.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pull_request_rules:
1111
label:
1212
add: [ contribution/core ]
1313
conditions:
14-
- author~=^(rix0rrr|MrArnoldPalmer|iliapolo|otaviomacedo|madeline-k|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka|GavinZZ)$
14+
- author~=^(rix0rrr|MrArnoldPalmer|iliapolo|otaviomacedo|madeline-k|kaizencc|comcalvi|TheRealAmazonKendra|vinayak-kukreja|mrgrain|pahud|cgarvis|kellertk|HBobertz|sumupitchayan|SankyRed|udaypant|colifran|scanlonp|mikewrighton|moelasmar|paulhcsun|awsmjs|evgenyka|GavinZZ|aaythapa|xazhao|ConnorRobertson|ssenchenko|gracelu0|jfuss|SimonCMoore)$
1515
- -label~="contribution/core"
1616
- name: automatic merge
1717
actions:

packages/@aws-cdk-testing/cli-integ/resources/cdk-apps/app/app.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class YourStack extends cdk.Stack {
6565
}
6666
}
6767

68-
class ImportableStack extends cdk.Stack {
68+
class MigrateStack extends cdk.Stack {
6969
constructor(parent, id, props) {
7070
super(parent, id, props);
7171

@@ -77,11 +77,22 @@ class ImportableStack extends cdk.Stack {
7777
new cdk.CfnOutput(this, 'QueueName', {
7878
value: queue.queueName,
7979
});
80+
81+
new cdk.CfnOutput(this, 'QueueUrl', {
82+
value: queue.queueUrl,
83+
});
84+
8085
new cdk.CfnOutput(this, 'QueueLogicalId', {
8186
value: queue.node.defaultChild.logicalId,
8287
});
8388
}
8489

90+
}
91+
}
92+
93+
class ImportableStack extends MigrateStack {
94+
constructor(parent, id, props) {
95+
super(parent, id, props);
8596
new cdk.CfnWaitConditionHandle(this, 'Handle');
8697
}
8798
}
@@ -470,6 +481,8 @@ switch (stackSet) {
470481

471482
new ImportableStack(app, `${stackPrefix}-importable-stack`);
472483

484+
new MigrateStack(app, `${stackPrefix}-migrate-stack`);
485+
473486
new ExportValueStack(app, `${stackPrefix}-export-value-stack`);
474487

475488
new BundlingStage(app, `${stackPrefix}-bundling-stage`);

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli.integtest.ts

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,6 +1213,45 @@ integTest('test resource import', withDefaultFixture(async (fixture) => {
12131213
}
12141214
}));
12151215

1216+
integTest('test migrate deployment for app with localfile source in migrate.json', withDefaultFixture(async (fixture) => {
1217+
const outputsFile = path.join(fixture.integTestDir, 'outputs', 'outputs.json');
1218+
await fs.mkdir(path.dirname(outputsFile), { recursive: true });
1219+
1220+
// Initial deploy
1221+
await fixture.cdkDeploy('migrate-stack', {
1222+
modEnv: { ORPHAN_TOPIC: '1' },
1223+
options: ['--outputs-file', outputsFile],
1224+
});
1225+
1226+
const outputs = JSON.parse((await fs.readFile(outputsFile, { encoding: 'utf-8' })).toString());
1227+
const stackName = fixture.fullStackName('migrate-stack');
1228+
const queueName = outputs[stackName].QueueName;
1229+
const queueUrl = outputs[stackName].QueueUrl;
1230+
const queueLogicalId = outputs[stackName].QueueLogicalId;
1231+
fixture.log(`Created queue ${queueUrl} in stack ${fixture.fullStackName}`);
1232+
1233+
// Write the migrate file based on the ID from step one, then deploy the app with migrate
1234+
const migrateFile = path.join(fixture.integTestDir, 'migrate.json');
1235+
await fs.writeFile(
1236+
migrateFile, JSON.stringify(
1237+
{ Source: 'localfile', Resources: [{ ResourceType: 'AWS::SQS::Queue', LogicalResourceId: queueLogicalId, ResourceIdentifier: { QueueUrl: queueUrl } }] },
1238+
),
1239+
{ encoding: 'utf-8' },
1240+
);
1241+
1242+
await fixture.cdkDestroy('migrate-stack');
1243+
fixture.log(`Deleted stack ${fixture.fullStackName}, orphaning ${queueName}`);
1244+
1245+
// Create new stack from existing queue
1246+
try {
1247+
fixture.log(`Deploying new stack ${fixture.fullStackName}, migrating ${queueName} into stack`);
1248+
await fixture.cdkDeploy('migrate-stack');
1249+
} finally {
1250+
// Cleanup
1251+
await fixture.cdkDestroy('migrate-stack');
1252+
}
1253+
}));
1254+
12161255
integTest('hotswap deployment supports Lambda function\'s description and environment variables', withDefaultFixture(async (fixture) => {
12171256
// GIVEN
12181257
const stackArn = await fixture.cdkDeploy('lambda-hotswap', {

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.filesystem.js.snapshot/asset.4554b47be6f57b68c6c7a7391dcc73894866d2377fe174883351e7639097f292/__entrypoint__.js

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.filesystem.js.snapshot/asset.4554b47be6f57b68c6c7a7391dcc73894866d2377fe174883351e7639097f292/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/framework-integ/test/aws-lambda/test/integ.lambda.filesystem.js.snapshot/aws-cdk-efs.assets.json

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)