Skip to content

Conversation

@rix0rrr
Copy link
Contributor

@rix0rrr rix0rrr commented Apr 3, 2025

toolkit.destroy() now returns information about the stacks it deployed.

Closes aws/aws-cdk#33190


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

rix0rrr and others added 3 commits April 3, 2025 15:50
`toolkit.deploy()` now returns information about the stacks it deployed.
Signed-off-by: github-actions <[email protected]>
`toolkit.deploy()` now returns information about the stacks it deployed.
@rix0rrr rix0rrr requested a review from a team April 3, 2025 14:46
@aws-cdk-automation aws-cdk-automation requested a review from a team April 3, 2025 14:46
@github-actions github-actions bot added the p2 label Apr 3, 2025
@rix0rrr rix0rrr added the pr/exempt-integ-test Skips the integ test steps if set. label Apr 4, 2025
`toolkit.destroy()` now returns information about the stacks it deployed.
@rix0rrr rix0rrr force-pushed the huijbers/destroy-return branch from 74303d3 to d7a7cb6 Compare April 4, 2025 11:48
Signed-off-by: github-actions <[email protected]>
Base automatically changed from huijbers/deploy-return to main April 4, 2025 12:02
@rix0rrr rix0rrr enabled auto-merge April 4, 2025 13:04
@codecov-commenter
Copy link

codecov-commenter commented Apr 4, 2025

Codecov Report

Attention: Patch coverage is 98.13665% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.61%. Comparing base (d21e66e) to head (8428cff).

Files with missing lines Patch % Lines
...ckages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts 92.85% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #318      +/-   ##
==========================================
+ Coverage   85.49%   85.61%   +0.11%     
==========================================
  Files         219      219              
  Lines       24103    24250     +147     
  Branches     2585     2585              
==========================================
+ Hits        20607    20761     +154     
+ Misses       3445     3437       -8     
- Partials       51       52       +1     
Flag Coverage Δ
suite.unit 85.61% <98.13%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rix0rrr rix0rrr force-pushed the huijbers/destroy-return branch from 71eb7ff to e54e964 Compare April 4, 2025 13:21
Signed-off-by: github-actions <[email protected]>
`toolkit.rollback()` now returns information about the stacks it rolled
back.

Includes some refactoring that deduplicates return information between
deploy/destroy and rollback.

Closes aws/aws-cdk#33188

---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache-2.0 license

---------

Signed-off-by: github-actions <[email protected]>
Co-authored-by: github-actions <[email protected]>
iankhou
iankhou previously requested changes Apr 6, 2025
Comment on lines 40 to 85
export interface DeployedStack extends PhysicalStack {
/**
* Hierarchical identifier
*
* This uniquely identifies the stack inside the CDK app.
*
* In practice this will be the stack's construct path, but unfortunately the
* Cloud Assembly contract doesn't require or guarantee that.
*/
readonly hierarchicalId: string;

/**
* The outputs of the deployed CloudFormation stack
*/
readonly outputs: { [key: string]: string };
}

/**
* An environment, which is an (account, region) pair
*/
export interface Environment {
/**
* The account number
*/
readonly account: string;

/**
* The region number
*/
readonly region: string;
}

/**
* Result interface for toolkit.deploy operation
*/
export interface DeployResult {
/**
* List of stacks deployed by this operation
*/
readonly stacks: DeployedStack[];
}

/**
* Information about a deployed stack
*/
export interface DeployedStack extends PhysicalStack {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some stuff got repeated here, maybe because of an automerge issue?

@rix0rrr rix0rrr requested a review from iankhou April 7, 2025 12:33
@rix0rrr rix0rrr dismissed iankhou’s stale review April 7, 2025 12:33

Changes addressed

@rix0rrr rix0rrr added this pull request to the merge queue Apr 7, 2025
Merged via the queue into main with commit 2c7999c Apr 7, 2025
11 checks passed
@rix0rrr rix0rrr deleted the huijbers/destroy-return branch April 7, 2025 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

p2 pr/exempt-integ-test Skips the integ test steps if set.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Toolkit Action: Typed return for destroy

4 participants