Skip to content

Commit

Permalink
Merge branch 'main' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
frankpengau authored Jan 13, 2024
2 parents eba9c7f + 6e9045f commit eace329
Show file tree
Hide file tree
Showing 846 changed files with 62,094 additions and 39,344 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/sync-from-upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,15 @@ jobs:

# Check for the presence of a PROJEN_GITHUB_TOKEN secret.
#
# This is expected to contain a personal access token of someone
# who pas permissions to bypass branch protection rules.
# This is expected to contain a personal access token of someone who has
# permissions to bypass branch protection rules.
#
# If not present, we will use GitHub Actions Token permissions,
# but those are bound by branch protection rules.
# If not present, we can only use GitHub Actions Token permissions,
# but this has the following downsides:
#
# - Those are bound by branch protection rules (so automated pushing won't work).
# - As soon as a workflow file needs to be changed, GitHub will reject the push.
# Only Apps and Users can be allowed to modify workflows.
check-secret:
# Don't run on the target repo itself, only forks
if: github.repository != 'aws/aws-cdk'
Expand Down Expand Up @@ -52,7 +56,7 @@ jobs:
- name: Sync from aws/aws-cdk
run: |-
git remote add upstream https://github.com/aws/aws-cdk.git
git fetch upstream
git fetch upstream $BRANCHES
for branch in $BRANCHES; do
git push origin --force refs/remotes/upstream/$branch:refs/heads/$branch
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

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

## [2.120.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.119.0-alpha.0...v2.120.0-alpha.0) (2024-01-12)

## [2.119.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.118.0-alpha.0...v2.119.0-alpha.0) (2024-01-11)


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

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.121.0](https://github.com/aws/aws-cdk/compare/v2.120.0...v2.121.0) (2024-01-12)


### Features

* **ec2:** add dual stack vpc support ([#28480](https://github.com/aws/aws-cdk/issues/28480)) ([754fd99](https://github.com/aws/aws-cdk/commit/754fd99e1963db9ec883c50784d3094cc463b70b)), closes [#894](https://github.com/aws/aws-cdk/issues/894)

## [2.120.0](https://github.com/aws/aws-cdk/compare/v2.119.0...v2.120.0) (2024-01-12)


### Features

* **ecs:** support for capacity provider managed instance draining ([#28672](https://github.com/aws/aws-cdk/issues/28672)) ([cf97f47](https://github.com/aws/aws-cdk/commit/cf97f47d9f9a1a8716a1673eb9b906ab365ee11b))

## [2.119.0](https://github.com/aws/aws-cdk/compare/v2.118.0...v2.119.0) (2024-01-11)


Expand Down
7 changes: 7 additions & 0 deletions allowed-breaking-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -229,3 +229,10 @@ removed:aws-cdk-lib.aws_backup.BackupPlanRuleProps.schedule

# This data identifer was added by mistake; it had never worked.
removed:aws-cdk-lib.aws_logs.DataIdentifier.PHONENUMBER

# These newly exported classes have been reverted and are no longer publicly consumeable
removed:aws-cdk-lib.custom_resources.WaiterStateMachine
removed:aws-cdk-lib.custom_resources.LogOptions
removed:aws-cdk-lib.custom_resources.WaiterStateMachineProps
removed:aws-cdk-lib.custom_resources.ProviderProps.disableWaiterStateMachineLogging
removed:aws-cdk-lib.custom_resources.ProviderProps.waiterStateMachineLogOptions
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class YourStack extends cdk.Stack {
}
}

class ImportableStack extends cdk.Stack {
class MigrateStack extends cdk.Stack {
constructor(parent, id, props) {
super(parent, id, props);

Expand All @@ -77,11 +77,22 @@ class ImportableStack extends cdk.Stack {
new cdk.CfnOutput(this, 'QueueName', {
value: queue.queueName,
});

new cdk.CfnOutput(this, 'QueueUrl', {
value: queue.queueUrl,
});

new cdk.CfnOutput(this, 'QueueLogicalId', {
value: queue.node.defaultChild.logicalId,
});
}

}
}

class ImportableStack extends MigrateStack {
constructor(parent, id, props) {
super(parent, id, props);
new cdk.CfnWaitConditionHandle(this, 'Handle');
}
}
Expand Down Expand Up @@ -470,6 +481,8 @@ switch (stackSet) {

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

new MigrateStack(app, `${stackPrefix}-migrate-stack`);

new ExportValueStack(app, `${stackPrefix}-export-value-stack`);

new BundlingStage(app, `${stackPrefix}-bundling-stage`);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1213,6 +1213,45 @@ integTest('test resource import', withDefaultFixture(async (fixture) => {
}
}));

integTest('test migrate deployment for app with localfile source in migrate.json', withDefaultFixture(async (fixture) => {
const outputsFile = path.join(fixture.integTestDir, 'outputs', 'outputs.json');
await fs.mkdir(path.dirname(outputsFile), { recursive: true });

// Initial deploy
await fixture.cdkDeploy('migrate-stack', {
modEnv: { ORPHAN_TOPIC: '1' },
options: ['--outputs-file', outputsFile],
});

const outputs = JSON.parse((await fs.readFile(outputsFile, { encoding: 'utf-8' })).toString());
const stackName = fixture.fullStackName('migrate-stack');
const queueName = outputs[stackName].QueueName;
const queueUrl = outputs[stackName].QueueUrl;
const queueLogicalId = outputs[stackName].QueueLogicalId;
fixture.log(`Created queue ${queueUrl} in stack ${fixture.fullStackName}`);

// Write the migrate file based on the ID from step one, then deploy the app with migrate
const migrateFile = path.join(fixture.integTestDir, 'migrate.json');
await fs.writeFile(
migrateFile, JSON.stringify(
{ Source: 'localfile', Resources: [{ ResourceType: 'AWS::SQS::Queue', LogicalResourceId: queueLogicalId, ResourceIdentifier: { QueueUrl: queueUrl } }] },
),
{ encoding: 'utf-8' },
);

await fixture.cdkDestroy('migrate-stack');
fixture.log(`Deleted stack ${fixture.fullStackName}, orphaning ${queueName}`);

// Create new stack from existing queue
try {
fixture.log(`Deploying new stack ${fixture.fullStackName}, migrating ${queueName} into stack`);
await fixture.cdkDeploy('migrate-stack');
} finally {
// Cleanup
await fixture.cdkDestroy('migrate-stack');
}
}));

integTest('hotswap deployment supports Lambda function\'s description and environment variables', withDefaultFixture(async (fixture) => {
// GIVEN
const stackArn = await fixture.cdkDeploy('lambda-hotswap', {
Expand Down

This file was deleted.

Loading

0 comments on commit eace329

Please sign in to comment.