Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cli): assets can now depend on stacks #25536

Merged
merged 129 commits into from
May 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
129 commits
Select commit Hold shift + click to select a range
ae44fc4
initial project structure
kaizencc Mar 2, 2023
b6fd1eb
skeleton implementation
kaizencc Mar 2, 2023
6b59b29
get everything to compile
kaizencc Mar 2, 2023
4ca12fe
delete extraneous files
kaizencc Mar 2, 2023
6ee9d78
more untested progress
kaizencc Mar 4, 2023
696d275
add bedrock for testing
kaizencc Mar 4, 2023
d73f27f
implement staging stack in synth
kaizencc Mar 6, 2023
5153ef5
get basic test to succeed
kaizencc Mar 6, 2023
c3628f4
remove extra lines
kaizencc Mar 7, 2023
a3a4c79
forgot to commit
kaizencc Mar 7, 2023
fc52f21
tests for docker asset and file asset
kaizencc Mar 7, 2023
e292810
add in iam roles
kaizencc Mar 8, 2023
3fd54e1
handle assets
kaizencc Mar 8, 2023
12283bd
assets
kaizencc Mar 8, 2023
8681478
small things
kaizencc Mar 8, 2023
ae2781e
2 tests
kaizencc Mar 8, 2023
143df73
add no tokens
kaizencc Mar 8, 2023
d5a50c3
better error messaging
kaizencc Mar 9, 2023
d088ec8
more work
kaizencc Mar 9, 2023
f3673ca
bootstrap role
kaizencc Mar 10, 2023
4b6944b
basic functionality for file assets
kaizencc Mar 15, 2023
70d6d85
better role
kaizencc Mar 15, 2023
3a96ee0
major clean up
kaizencc Mar 16, 2023
b7e0b6a
use bootstrapless synth
kaizencc Mar 16, 2023
b678df5
Merge branch 'main' into conroy/bootstrap
kaizencc Mar 16, 2023
b3eb0a6
expose appId to user
kaizencc Mar 17, 2023
26985ab
rename folder
kaizencc Mar 17, 2023
f1462dd
rename
kaizencc Mar 17, 2023
5dc7a5f
adr
kaizencc Mar 17, 2023
42b8566
readme start
kaizencc Mar 17, 2023
6e57c29
minor changes
kaizencc Mar 20, 2023
2a5c44e
move appId to the app props
kaizencc Mar 20, 2023
fb50b3d
new tests
kaizencc Mar 20, 2023
5483fe2
IStagingStack
kaizencc Mar 20, 2023
543bafe
lifecylce rules and kms key
kaizencc Mar 20, 2023
4085c79
wip of kms key debacle
kaizencc Mar 22, 2023
f4074b6
kms key works
kaizencc Mar 22, 2023
c3d1fff
update readme for new api
kaizencc Mar 22, 2023
827fea1
remove app chnages
kaizencc Mar 22, 2023
b77eaf9
remove app chnages
kaizencc Mar 22, 2023
b8cd873
appid
kaizencc Mar 22, 2023
7d115ca
massive changes to api but tests succeed
kaizencc Mar 23, 2023
5754712
rename folder
kaizencc Mar 23, 2023
46da1cc
add roles stuff without testing yet
kaizencc Mar 23, 2023
20c8032
minor cleanups
kaizencc Mar 24, 2023
3b55d82
error when mixing agnostic/non-agnostic stacks in an app
kaizencc Mar 24, 2023
e9b1030
additional bootstrap role test
kaizencc Mar 24, 2023
b168308
rename to app-staging-synthesizer
kaizencc Mar 24, 2023
3eee189
add documentation everywhere and comment out docker code
kaizencc Mar 24, 2023
4fbae1b
more docs
kaizencc Mar 24, 2023
d3ec8a7
couple more tests
kaizencc Mar 24, 2023
d8e3af3
Merge branch 'main' of https://github.com/aws/aws-cdk into conroy/boo…
kaizencc Apr 4, 2023
bdd8a71
get package to work under new repo restructure
kaizencc Apr 4, 2023
806221e
rename to -alpha
kaizencc Apr 5, 2023
6fcc13d
update package.json
kaizencc Apr 5, 2023
6f6c9d3
Merge branch 'main' into conroy/bootstrap
kaizencc Apr 5, 2023
477f81f
rename
kaizencc Apr 5, 2023
a9e4b5a
integ test works
kaizencc Apr 5, 2023
9269b9c
resolve qualifier in the synth
kaizencc Apr 6, 2023
9728364
90% of lifecycle rules for ephemeral assets
kaizencc Apr 6, 2023
0487959
grant access to s3 bucket to deploy role
kaizencc Apr 7, 2023
7460def
introduce new translation functions in core
kaizencc Apr 7, 2023
08cd887
use new translation functions
kaizencc Apr 7, 2023
794cc68
revamp bootstrap roles api
kaizencc Apr 10, 2023
2104e68
move tests around
kaizencc Apr 10, 2023
8a12d60
more test stuff
kaizencc Apr 10, 2023
745770f
finish s3 lifecycle rule tests
kaizencc Apr 10, 2023
5db8d0a
expose bucket prefix api
kaizencc Apr 10, 2023
2f5f962
Merge remote-tracking branch 'origin/main' into conroy/bootstrap
rix0rrr Apr 11, 2023
065e8d4
Fix build
rix0rrr Apr 11, 2023
3d83f4a
env-agnostic test
kaizencc Apr 11, 2023
b7bed7e
Move some code around
rix0rrr Apr 12, 2023
7e5ec32
Merge branch 'conroy/bootstrap' of github.com:aws/aws-cdk into conroy…
rix0rrr Apr 12, 2023
9d080b5
Merge remote-tracking branch 'origin/main' into conroy/bootstrap
rix0rrr Apr 12, 2023
6f33075
minor changes
kaizencc Apr 12, 2023
e4b15f4
Reorganize responsibilities between:
rix0rrr Apr 13, 2023
1d836aa
Merge branch 'conroy/bootstrap' of github.com:aws/aws-cdk into conroy…
rix0rrr Apr 13, 2023
cd39826
Fix build issues
rix0rrr Apr 13, 2023
d79aba3
Merge remote-tracking branch 'origin/main' into conroy/bootstrap
rix0rrr Apr 13, 2023
b642943
awslint fixes
rix0rrr Apr 13, 2023
2a84b5c
Fix unit tests
rix0rrr Apr 13, 2023
2331ef4
asset dependencies
kaizencc Apr 13, 2023
4aee77b
Merge branch 'conroy/bootstrap' of https://github.com/aws/aws-cdk int…
kaizencc Apr 13, 2023
b20cb04
wip of workgraph code. does not work yet, many errors
kaizencc Apr 14, 2023
ff3de55
Merge branch 'main' into conroy/bootstrap
kaizencc Apr 17, 2023
ffdfa8f
bigtime changes to the cli that are wip
kaizencc Apr 19, 2023
a0570d2
get to no compilation errors
kaizencc Apr 20, 2023
06dd548
all tests in deploy.test succeed
kaizencc Apr 21, 2023
16e46df
major overhaul of test to make it make sense
kaizencc Apr 21, 2023
c3268f7
fix rest of the tests in display.ts
kaizencc Apr 24, 2023
a0851eb
remove etraneous files
kaizencc Apr 24, 2023
466e3cd
callback interface for deployArtifacts
kaizencc Apr 24, 2023
13795c9
worknode is now an abstract class
kaizencc Apr 24, 2023
9c0183a
Merge branch 'main' into conroy/bootstrap
kaizencc Apr 26, 2023
01fc565
add disable prebuild to workgraph
kaizencc Apr 27, 2023
075ed8b
typo
kaizencc Apr 27, 2023
c4af16e
nested assemblies
kaizencc Apr 27, 2023
925812e
wip of app-staging stuff
kaizencc May 3, 2023
62712b8
Pass deployRoleArn
rix0rrr May 3, 2023
0c5e48c
integ tests r good
kaizencc May 3, 2023
a7b61a4
add assetname to ecr-assets
kaizencc May 3, 2023
5290ad3
update integ test
kaizencc May 4, 2023
0e25c13
more test updates
kaizencc May 4, 2023
53287e0
Merge branch 'main' into conroy/bootstrap
kaizencc May 5, 2023
21564fe
update sto ecr asets
kaizencc May 5, 2023
0cc17e5
Merge branch 'conroy/bootstrap' of https://github.com/aws/aws-cdk int…
kaizencc May 5, 2023
91389b0
grantread
kaizencc May 5, 2023
2d9719e
more unit tests
kaizencc May 8, 2023
475ebe9
unit test for gnostic stuff
kaizencc May 8, 2023
f0867bb
error when staging resource stack too large
kaizencc May 8, 2023
06e3183
Change the work graph to put individual assets into it and publish th…
rix0rrr May 9, 2023
e814bfd
Remove files that should be part of a different PR
rix0rrr May 11, 2023
3d9d0bb
More refactoring work
rix0rrr May 11, 2023
6bd21cf
Remove more files that should be in a different PR
rix0rrr May 11, 2023
0cd79b8
Fix tests
rix0rrr May 11, 2023
1e8e2c5
Merge remote-tracking branch 'origin/main' into huijbers/refactor-assets
rix0rrr May 11, 2023
743a679
Coverage a bit low
rix0rrr May 12, 2023
f91556b
Fix up some review comments
rix0rrr May 12, 2023
61297f8
Remove duplicate status event
rix0rrr May 12, 2023
762933c
Rename 'cloudformation-deployments' -> 'deployments', add priorities …
rix0rrr May 12, 2023
57886f6
Lower coverage
rix0rrr May 12, 2023
8971ad7
Made change in wrong file
rix0rrr May 12, 2023
c348f99
Fix improts & add dependency
rix0rrr May 12, 2023
0a49f81
Add a test for node removal
rix0rrr May 12, 2023
2285a97
3p licenses for some reason
rix0rrr May 12, 2023
46d5d80
Move property, otherwise we have a breaking API change
rix0rrr May 12, 2023
c128525
Review comments
rix0rrr May 16, 2023
5fc82da
Incorrect test translation
rix0rrr May 16, 2023
0fc6754
Merge branch 'main' into huijbers/refactor-assets
mergify[bot] May 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/@aws-cdk/cx-api/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
coverageThreshold: {
global: {
...baseConfig.coverageThreshold.global,
branches: 75,
branches: 70,
},
},
};
10 changes: 10 additions & 0 deletions packages/aws-cdk-lib/cloud-assembly-schema/lib/manifest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ export interface LoadManifestOptions {
* @default false
*/
readonly skipEnumCheck?: boolean;

/**
* Topologically sort all artifacts
*
* This parameter is only respected by the constructor of `CloudAssembly`. The
* property lives here for backwards compatibility reasons.
*
* @default true
*/
readonly topoSort?: boolean;
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,30 @@ import { CloudArtifact } from '../cloud-artifact';
import type { CloudAssembly } from '../cloud-assembly';
import { Environment, EnvironmentUtils } from '../environment';

const CLOUDFORMATION_STACK_ARTIFACT_SYM = Symbol.for('@aws-cdk/cx-api.CloudFormationStackArtifact');

export class CloudFormationStackArtifact extends CloudArtifact {
/**
* Checks if `art` is an instance of this class.
*
* Use this method instead of `instanceof` to properly detect `CloudFormationStackArtifact`
* instances, even when the construct library is symlinked.
*
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
* disk are seen as independent, completely different libraries. As a
* consequence, the class `CloudFormationStackArtifact` in each copy of the `cx-api` library
* is seen as a different class, and an instance of one class will not test as
* `instanceof` the other class. `npm install` will not create installations
* like this, but users may manually symlink construct libraries together or
* use a monorepo tool: in those cases, multiple copies of the `cx-api`
* library can be accidentally installed, and `instanceof` will behave
* unpredictably. It is safest to avoid using `instanceof`, and using
* this type-testing method instead.
*/
public static isCloudFormationStackArtifact(art: any): art is CloudFormationStackArtifact {
return art && typeof art === 'object' && art[CLOUDFORMATION_STACK_ARTIFACT_SYM];
}

/**
* The file name of the template.
*/
Expand Down Expand Up @@ -183,3 +206,15 @@ export class CloudFormationStackArtifact extends CloudArtifact {
return ret;
}
}

/**
* Mark all instances of 'CloudFormationStackArtifact'
*
* Why not put this in the constructor? Because this is a class property,
* not an instance property. It applies to all instances of the class.
*/
Object.defineProperty(CloudFormationStackArtifact.prototype, CLOUDFORMATION_STACK_ARTIFACT_SYM, {
value: true,
enumerable: false,
writable: false,
});
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,33 @@ import * as cxschema from '../../../cloud-assembly-schema';
import { CloudArtifact } from '../cloud-artifact';
import type { CloudAssembly } from '../cloud-assembly';

const NESTED_CLOUD_ASSEMBLY_SYM = Symbol.for('@aws-cdk/cx-api.NestedCloudAssemblyArtifact');

/**
* Asset manifest is a description of a set of assets which need to be built and published
*/
export class NestedCloudAssemblyArtifact extends CloudArtifact {
/**
* Checks if `art` is an instance of this class.
*
* Use this method instead of `instanceof` to properly detect `NestedCloudAssemblyArtifact`
* instances, even when the construct library is symlinked.
*
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
* disk are seen as independent, completely different libraries. As a
* consequence, the class `NestedCloudAssemblyArtifact` in each copy of the `cx-api` library
* is seen as a different class, and an instance of one class will not test as
* `instanceof` the other class. `npm install` will not create installations
* like this, but users may manually symlink construct libraries together or
* use a monorepo tool: in those cases, multiple copies of the `cx-api`
* library can be accidentally installed, and `instanceof` will behave
* unpredictably. It is safest to avoid using `instanceof`, and using
* this type-testing method instead.
*/
public static isNestedCloudAssemblyArtifact(art: any): art is NestedCloudAssemblyArtifact {
return art && typeof art === 'object' && art[NESTED_CLOUD_ASSEMBLY_SYM];
}

/**
* The relative directory name of the asset manifest
*/
Expand Down Expand Up @@ -40,4 +63,16 @@ export interface NestedCloudAssemblyArtifact {
readonly nestedAssembly: CloudAssembly;

// Declared in a different file
}
}

/**
* Mark all instances of 'NestedCloudAssemblyArtifact'
*
* Why not put this in the constructor? Because this is a class property,
* not an instance property. It applies to all instances of the class.
*/
Object.defineProperty(NestedCloudAssemblyArtifact.prototype, NESTED_CLOUD_ASSEMBLY_SYM, {
value: true,
enumerable: false,
writable: false,
});
37 changes: 36 additions & 1 deletion packages/aws-cdk-lib/cx-api/lib/artifacts/tree-cloud-artifact.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,30 @@ import * as cxschema from '../../../cloud-assembly-schema';
import { CloudArtifact } from '../cloud-artifact';
import { CloudAssembly } from '../cloud-assembly';

const TREE_CLOUD_ARTIFACT_SYM = Symbol.for('@aws-cdk/cx-api.TreeCloudArtifact');

export class TreeCloudArtifact extends CloudArtifact {
/**
* Checks if `art` is an instance of this class.
*
* Use this method instead of `instanceof` to properly detect `TreeCloudArtifact`
* instances, even when the construct library is symlinked.
*
* Explanation: in JavaScript, multiple copies of the `cx-api` library on
* disk are seen as independent, completely different libraries. As a
* consequence, the class `TreeCloudArtifact` in each copy of the `cx-api` library
* is seen as a different class, and an instance of one class will not test as
* `instanceof` the other class. `npm install` will not create installations
* like this, but users may manually symlink construct libraries together or
* use a monorepo tool: in those cases, multiple copies of the `cx-api`
* library can be accidentally installed, and `instanceof` will behave
* unpredictably. It is safest to avoid using `instanceof`, and using
* this type-testing method instead.
*/
public static isTreeCloudArtifact(art: any): art is TreeCloudArtifact {
return art && typeof art === 'object' && art[TREE_CLOUD_ARTIFACT_SYM];
}

public readonly file: string;

constructor(assembly: CloudAssembly, name: string, artifact: cxschema.ArtifactManifest) {
Expand All @@ -14,4 +37,16 @@ export class TreeCloudArtifact extends CloudArtifact {
}
this.file = properties.file;
}
}
}

/**
* Mark all instances of 'TreeCloudArtifact'
*
* Why not put this in the constructor? Because this is a class property,
* not an instance property. It applies to all instances of the class.
*/
Object.defineProperty(TreeCloudArtifact.prototype, TREE_CLOUD_ARTIFACT_SYM, {
value: true,
enumerable: false,
writable: false,
});
16 changes: 11 additions & 5 deletions packages/aws-cdk-lib/cx-api/lib/cloud-assembly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { NestedCloudAssemblyArtifact } from './artifacts/nested-cloud-assembly-a
import { TreeCloudArtifact } from './artifacts/tree-cloud-artifact';
import { CloudArtifact } from './cloud-artifact';
import { topologicalSort } from './toposort';
import { LoadManifestOptions } from '../../cloud-assembly-schema';
import * as cxschema from '../../cloud-assembly-schema';

/**
Expand Down Expand Up @@ -47,12 +46,12 @@ export class CloudAssembly {
* Reads a cloud assembly from the specified directory.
* @param directory The root directory of the assembly.
*/
constructor(directory: string, loadOptions?: LoadManifestOptions) {
constructor(directory: string, loadOptions?: cxschema.LoadManifestOptions) {
this.directory = directory;

this.manifest = cxschema.Manifest.loadAssemblyManifest(path.join(directory, MANIFEST_FILE), loadOptions);
this.version = this.manifest.version;
this.artifacts = this.renderArtifacts();
this.artifacts = this.renderArtifacts(loadOptions?.topoSort ?? true);
this.runtime = this.manifest.runtime || { libraries: { } };

// force validation of deps by accessing 'depends' on all artifacts
Expand Down Expand Up @@ -219,7 +218,7 @@ export class CloudAssembly {
}
}

private renderArtifacts() {
private renderArtifacts(topoSort: boolean) {
const result = new Array<CloudArtifact>();
for (const [name, artifact] of Object.entries(this.manifest.artifacts || { })) {
const cloudartifact = CloudArtifact.fromManifest(this, name, artifact);
Expand All @@ -228,7 +227,7 @@ export class CloudAssembly {
}
}

return topologicalSort(result, x => x.id, x => x._dependencyIDs);
return topoSort ? topologicalSort(result, x => x.id, x => x._dependencyIDs) : result;
}
}

Expand Down Expand Up @@ -357,6 +356,13 @@ export class CloudAssemblyBuilder {
parentBuilder: this,
});
}

/**
* Delete the cloud assembly directory
*/
public delete() {
fs.rmSync(this.outdir, { recursive: true, force: true });
}
}

/**
Expand Down
7 changes: 7 additions & 0 deletions packages/aws-cdk-lib/cx-api/test/cloud-assembly.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,13 @@ test('can read assembly with asset manifest', () => {
expect(assembly.artifacts).toHaveLength(2);
});

test('can toposort assembly with asset dependency', () => {
const assembly = new CloudAssembly(path.join(FIXTURES, 'asset-depends'));
expect(assembly.stacks).toHaveLength(2);
expect(assembly.artifacts).toHaveLength(3);
expect(assembly.artifacts[0].id).toEqual('StagingStack');
});

rix0rrr marked this conversation as resolved.
Show resolved Hide resolved
test('getStackArtifact retrieves a stack by artifact id from a nested assembly', () => {
const assembly = new CloudAssembly(path.join(FIXTURES, 'nested-assemblies'));

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"version": "0.0.0",
"artifacts": {
"MyStackName": {
"type": "aws:cloudformation:stack",
"environment": "aws://37736633/us-region-1",
"properties": {
"templateFile": "template.json"
},
"dependencies": ["AssetManifest"],
"metadata": {
}
},
"AssetManifest": {
"type": "cdk:asset-manifest",
"properties": {
"file": "asset.json"
},
"dependencies": ["StagingStack"]
},
"StagingStack": {
"type": "aws:cloudformation:stack",
"environment": "aws://1111/us-region-1",
"properties": {
"templateFile": "template.json"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"Resources": {
"MyBucket": {
"Type": "AWS::S3::Bucket"
}
}
}
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.


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

** eventemitter3@4.0.7 - 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.


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

** fast-deep-equal@3.1.3 - 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.


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

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

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.


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

** p-queue@6.6.2 - https://www.npmjs.com/package/p-queue/v/6.6.2 | MIT
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.


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

** p-timeout@3.2.0 - https://www.npmjs.com/package/p-timeout/v/3.2.0 | MIT
MIT License

Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (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.


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

** pac-proxy-agent@5.0.0 - https://www.npmjs.com/package/pac-proxy-agent/v/5.0.0 | MIT
Expand Down
1 change: 1 addition & 0 deletions packages/aws-cdk/lib/api/aws-auth/sdk-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ export class SdkProvider {
options?: CredentialsOptions,
): Promise<SdkForEnvironment> {
const env = await this.resolveEnvironment(environment);

const baseCreds = await this.obtainBaseCredentials(env.account, mode);

// At this point, we need at least SOME credentials
Expand Down
5 changes: 4 additions & 1 deletion packages/aws-cdk/lib/api/cxapp/exec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ export async function execProgram(aws: SdkProvider, config: Configuration): Prom
*/
export function createAssembly(appDir: string) {
try {
return new cxapi.CloudAssembly(appDir);
return new cxapi.CloudAssembly(appDir, {
// We sort as we deploy
topoSort: false,
});
} catch (error: any) {
if (error.message.includes(cxschema.VERSION_MISMATCH)) {
// this means the CLI version is too old.
Expand Down
Loading