Skip to content

Commit

Permalink
chore(release): v2.38.1 (#21669)
Browse files Browse the repository at this point in the history
See CHANGELOG
  • Loading branch information
mergify[bot] authored Aug 18, 2022
2 parents 317fe7a + 7713e45 commit a5ced21
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 425 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.v2.alpha.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

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.38.1-alpha.0](https://github.com/aws/aws-cdk/compare/v2.38.0-alpha.0...v2.38.1-alpha.0) (2022-08-18)

## [2.38.0-alpha.0](https://github.com/aws/aws-cdk/compare/v2.37.1-alpha.0...v2.38.0-alpha.0) (2022-08-17)


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

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.38.1](https://github.com/aws/aws-cdk/compare/v2.38.0...v2.38.1) (2022-08-18)

### Reverts

* cli: revert "feat(cli): --concurrency option" ([#21664](https://github.com/aws/aws-cdk/pull/21664)) ([2ad2163b](https://github.com/aws/aws-cdk/commit/2ad2163b96254f9715dff405100a047d6c2c5958))
* cli: revert "feat(cli): cdk watch --concurrency" ([#21665](https://github.com/aws/aws-cdk/pull/21665)) ([6048d4fc](https://github.com/aws/aws-cdk/commit/6048d4fc37239bcd5193d5487464590c786bf56b))

## [2.38.0](https://github.com/aws/aws-cdk/compare/v2.37.1...v2.38.0) (2022-08-17)


Expand Down
11 changes: 0 additions & 11 deletions packages/aws-cdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,6 @@ In order to deploy them, you can list the stacks you want to deploy. If your app

If you want to deploy all of them, you can use the flag `--all` or the wildcard `*` to deploy all stacks in an app. Please note that, if you have a hierarchy of stacks as described above, `--all` and `*` will only match the stacks on the top level. If you want to match all the stacks in the hierarchy, use `**`. You can also combine these patterns. For example, if you want to deploy all stacks in the `Prod` stage, you can use `cdk deploy PipelineStack/Prod/**`.

`--concurrency N` allows deploying multiple stacks in parallel while respecting inter-stack dependencies to speed up deployments. It does not protect against CloudFormation and other AWS account rate limiting.

#### Parameters

Pass parameters to your template during deployment by using `--parameters
Expand Down Expand Up @@ -458,15 +456,6 @@ locally to your terminal. To disable this feature you can pass the `--no-logs` o
$ cdk watch --no-logs
```

You can increase the concurrency by which `watch` will deploy and hotswap
your stacks by specifying `--concurrency N`. `--concurrency` for `watch`
acts the same as `--concurrency` for `deploy`, in that it will deploy or
hotswap your stacks while respecting inter-stack dependencies.

```console
$ cdk watch --concurrency 5
```

**Note**: This command is considered experimental, and might have breaking changes in the future.
The same limitations apply to to `watch` deployments as do to `--hotswap` deployments. See the
*Hotswap deployments for faster development* section for more information.
Expand Down
80 changes: 0 additions & 80 deletions packages/aws-cdk/THIRD_PARTY_LICENSES
Original file line number Diff line number Diff line change
Expand Up @@ -1143,32 +1143,6 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


----------------

** [email protected] - https://www.npmjs.com/package/eventemitter3/v/4.0.7 | MIT
The MIT License (MIT)

Copyright (c) 2014 Arnout Kazemier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


----------------

** [email protected] - https://www.npmjs.com/package/fast-deep-equal/v/3.1.3 | MIT
Expand Down Expand Up @@ -2300,60 +2274,6 @@ ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.


----------------

** [email protected] - https://www.npmjs.com/package/p-finally/v/1.0.0 | MIT
The MIT License (MIT)

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


----------------

** [email protected] - https://www.npmjs.com/package/p-queue/v/6.6.2 | MIT
MIT License

Copyright (c) Sindre Sorhus <[email protected]> (https://sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


----------------

** [email protected] - https://www.npmjs.com/package/p-timeout/v/3.2.0 | MIT
MIT License

Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


----------------

** [email protected] - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT
Expand Down
50 changes: 5 additions & 45 deletions packages/aws-cdk/lib/cdk-toolkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { CloudExecutable } from './api/cxapp/cloud-executable';
import { findCloudWatchLogGroups } from './api/logs/find-cloudwatch-logs';
import { CloudWatchLogEventMonitor } from './api/logs/logs-monitor';
import { StackActivityProgress } from './api/util/cloudformation/stack-activity-monitor';
import { deployStacks } from './deploy';
import { printSecurityDiff, printStackDiff, RequireApproval } from './diff';
import { ResourceImporter } from './import';
import { data, debug, error, highlight, print, success, warning } from './logging';
Expand Down Expand Up @@ -138,7 +137,7 @@ export class CdkToolkit {
}

const startSynthTime = new Date().getTime();
const stackCollection = await this.selectStacksForDeploy(options.selector, options.exclusively, options.cacheCloudAssembly);
const stacks = await this.selectStacksForDeploy(options.selector, options.exclusively, options.cacheCloudAssembly);
const elapsedSynthTime = new Date().getTime() - startSynthTime;
print('\n✨ Synthesis time: %ss\n', formatTime(elapsedSynthTime));

Expand All @@ -164,19 +163,11 @@ export class CdkToolkit {
warning('⚠️ It should only be used for development - never use it for your production Stacks!');
}

const stacks = stackCollection.stackArtifacts;

const stackOutputs: { [key: string]: any } = { };
const outputsFile = options.outputsFile;

const concurrency = options.concurrency || 1;
const progress = concurrency > 1 ? StackActivityProgress.EVENTS : options.progress;
if (concurrency > 1 && options.progress && options.progress != StackActivityProgress.EVENTS) {
warning('⚠️ The --concurrency flag only supports --progress "events". Switching to "events".');
}

const deployStack = async (stack: cxapi.CloudFormationStackArtifact) => {
if (stackCollection.stackCount !== 1) { highlight(stack.displayName); }
for (const stack of stacks.stackArtifacts) {
if (stacks.stackCount !== 1) { highlight(stack.displayName); }
if (!stack.environment) {
// eslint-disable-next-line max-len
throw new Error(`Stack ${stack.displayName} does not define an environment, and AWS credentials could not be obtained from standard locations or no region was configured.`);
Expand All @@ -196,7 +187,7 @@ export class CdkToolkit {
ci: options.ci,
});
}
return;
continue;
}

if (requireApproval !== RequireApproval.Never) {
Expand All @@ -210,13 +201,6 @@ export class CdkToolkit {
'but terminal (TTY) is not attached so we are unable to get a confirmation from the user');
}

// only talk to user if concurreny is 1 (otherwise, fail)
if (concurrency > 1) {
throw new Error(
'"--require-approval" is enabled and stack includes security-sensitive updates, ' +
'but concurrency is greater than 1 so we are unable to get a confirmation from the user');
}

const confirmed = await promptly.confirm('Do you wish to deploy these changes (y/n)?');
if (!confirmed) { throw new Error('Aborted by user'); }
}
Expand Down Expand Up @@ -245,7 +229,7 @@ export class CdkToolkit {
force: options.force,
parameters: Object.assign({}, parameterMap['*'], parameterMap[stack.stackName]),
usePreviousParameters: options.usePreviousParameters,
progress,
progress: options.progress,
ci: options.ci,
rollback: options.rollback,
hotswap: options.hotswap,
Expand Down Expand Up @@ -294,13 +278,6 @@ export class CdkToolkit {
}
}
print('\n✨ Total time: %ss\n', formatTime(elapsedSynthTime + elapsedDeployTime));
};

try {
await deployStacks(stacks, { concurrency, deployStack });
} catch (e) {
error('\n ❌ Deployment failed: %s', e);
throw e;
}
}

Expand Down Expand Up @@ -737,7 +714,6 @@ export class CdkToolkit {
cacheCloudAssembly: false,
hotswap: hotswap,
extraUserAgent: `cdk-watch/hotswap-${hotswap ? 'on' : 'off'}`,
concurrency: options.concurrency,
};

try {
Expand Down Expand Up @@ -901,14 +877,6 @@ interface WatchOptions extends Omit<CfnDeployOptions, 'execute'> {
* @default - false
*/
readonly traceLogs?: boolean;

/**
* Maximum number of simulatenous deployments (dependency permitting) to execute.
* The default is '1', which executes all deployments serially.
*
* @default 1
*/
readonly concurrency?: number;
}

export interface DeployOptions extends CfnDeployOptions, WatchOptions {
Expand Down Expand Up @@ -980,14 +948,6 @@ export interface DeployOptions extends CfnDeployOptions, WatchOptions {
* @default - not monitoring CloudWatch logs
*/
readonly cloudWatchLogMonitor?: CloudWatchLogEventMonitor;

/**
* Maximum number of simulatenous deployments (dependency permitting) to execute.
* The default is '1', which executes all deployments serially.
*
* @default 1
*/
readonly concurrency?: number;
}

export interface ImportOptions extends CfnDeployOptions {
Expand Down
8 changes: 2 additions & 6 deletions packages/aws-cdk/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ async function parseCommandLineArguments() {
desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' +
"'true' by default, use --no-logs to turn off. " +
"Only in effect if specified alongside the '--watch' option",
})
.option('concurrency', { type: 'number', desc: 'Maximum number of simulatenous deployments (dependency permitting) to execute.', default: 1, requiresArg: true }),
}),
)
.command('import [STACK]', 'Import existing resource(s) into the given STACK', (yargs: Argv) => yargs
.option('execute', { type: 'boolean', desc: 'Whether to execute ChangeSet (--no-execute will NOT execute the ChangeSet)', default: true })
Expand Down Expand Up @@ -216,8 +215,7 @@ async function parseCommandLineArguments() {
default: true,
desc: 'Show CloudWatch log events from all resources in the selected Stacks in the terminal. ' +
"'true' by default, use --no-logs to turn off",
})
.option('concurrency', { type: 'number', desc: 'Maximum number of simulatenous deployments (dependency permitting) to execute.', default: 1, requiresArg: true }),
}),
)
.command('destroy [STACKS..]', 'Destroy the stack(s) named STACKS', (yargs: Argv) => yargs
.option('all', { type: 'boolean', default: false, desc: 'Destroy all available stacks' })
Expand Down Expand Up @@ -482,7 +480,6 @@ async function initCommandLine() {
hotswap: args.hotswap,
watch: args.watch,
traceLogs: args.logs,
concurrency: args.concurrency,
});

case 'import':
Expand Down Expand Up @@ -517,7 +514,6 @@ async function initCommandLine() {
rollback: configuration.settings.get(['rollback']),
hotswap: args.hotswap,
traceLogs: args.logs,
concurrency: args.concurrency,
});

case 'destroy':
Expand Down
60 changes: 0 additions & 60 deletions packages/aws-cdk/lib/deploy.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/aws-cdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
"glob": "^7.2.3",
"json-diff": "^0.9.0",
"minimatch": ">=3.1",
"p-queue": "^6.6.2",
"promptly": "^3.2.0",
"proxy-agent": "^5.0.0",
"semver": "^7.3.7",
Expand Down
12 changes: 0 additions & 12 deletions packages/aws-cdk/test/cdk-toolkit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -642,18 +642,6 @@ describe('watch', () => {
expect(excludeArgs[1]).toBe('**/my-dir2');
});

test('allows watching with deploy concurrency', async () => {
cloudExecutable.configuration.settings.set(['watch'], {});
const toolkit = defaultToolkitSetup();
const cdkDeployMock = jest.fn();
toolkit.deploy = cdkDeployMock;

await toolkit.watch({ selector: { patterns: [] }, concurrency: 3 });
fakeChokidarWatcherOn.readyCallback();

expect(cdkDeployMock).toBeCalledWith(expect.objectContaining({ concurrency: 3 }));
});

describe('with file change events', () => {
let toolkit: CdkToolkit;
let cdkDeployMock: jest.Mock;
Expand Down
Loading

0 comments on commit a5ced21

Please sign in to comment.