-
Notifications
You must be signed in to change notification settings - Fork 27
feat: refactor execution #516
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
Draft
otaviomacedo
wants to merge
17
commits into
main
Choose a base branch
from
otaviom/execute-refactoring
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conflicts: # packages/@aws-cdk/toolkit-lib/lib/actions/refactor/index.ts # packages/@aws-cdk/toolkit-lib/lib/api/refactoring/index.ts # packages/@aws-cdk/toolkit-lib/lib/toolkit/toolkit.ts # packages/@aws-cdk/toolkit-lib/test/actions/refactor.test.ts # packages/aws-cdk/lib/cli/cdk-toolkit.ts # packages/aws-cdk/lib/cli/cli-config.ts # packages/aws-cdk/lib/cli/cli.ts # packages/aws-cdk/lib/cli/convert-to-user-input.ts # packages/aws-cdk/lib/cli/parse-command-line-arguments.ts # packages/aws-cdk/lib/cli/user-input.ts
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #516 +/- ##
==========================================
- Coverage 78.98% 78.97% -0.01%
==========================================
Files 46 46
Lines 6994 6986 -8
Branches 775 776 +1
==========================================
- Hits 5524 5517 -7
+ Misses 1452 1450 -2
- Partials 18 19 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: github-actions <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This change introduces the creation and execution of stack refactors. It builds on previous work that put all the pieces in place (mapping computation, mapping file reading, exclude lists, dry-run etc). The following flowcharts summarize the behavior in interactive and non-interactive modes:
Non-interactive case
Interactive case
There is one use case that is explicitly not supported: when a resource is being referenced by an output. This is because cross-stack references cannot be directly refactored using the CloudFormation API, and there is some work to do on the CDK side.
Implementation notes
The most important pieces to review are:
StackContainer
class, that controls the execution flow for each environment.executeRefactor
function, that interacts with the CFN API to make the refactor happen.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license