Skip to content

feat: refactor execution #573

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
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

otaviomacedo
Copy link
Contributor

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, for each environment in the application:

Non-interactive case

flowchart LR
    mapping{Refactor file present?}
    empty{Empty mapping?}
    dryrun{--dry-run?}
    compute[Compute mapping]
    use[Use mapping]
    print[Print mapping]
    mapping ---|No| compute
    mapping ---|Yes| use
    compute --- empty
    use --- empty
    empty ---|Yes| Exit
    empty ---|No| print
    print --- dryrun
    dryrun ---|Yes| Exit
    dryrun ---|No| Refactor
    Refactor --- Exit
Loading

Interactive case

flowchart LR
    mapping{Refactor file present?}
    empty{Empty mapping?}
    dryrun{--dry-run?}
    force{--force?}
    compute[Compute mapping]
    use[Use mapping]
    print[Print mapping]
    ask[Ask user]
    mapping ---|No| compute
    mapping ---|Yes| use
    compute --- empty
    use --- empty
    empty ---|Yes| Exit
    empty ---|No| print
    print --- dryrun
    dryrun ---|Yes| Exit
    dryrun ---|No| force
    force ---|Yes| Refactor
    force ---|No| ask
    ask ---|Yes| Refactor
    ask ---|No| Exit
    Refactor --- Exit
Loading

Note: this is blocked until #555 is merged.


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

@aws-cdk-automation aws-cdk-automation requested a review from a team June 4, 2025 12:35
@github-actions github-actions bot added the p2 label Jun 4, 2025
Signed-off-by: github-actions <[email protected]>
@otaviomacedo otaviomacedo changed the title feat: reefactor execution feat: refactor execution Jun 4, 2025
@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 71.42857% with 2 lines in your changes missing coverage. Please review.

Project coverage is 79.04%. Comparing base (554d2c9) to head (857b36c).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/aws-cdk/lib/cli/cdk-toolkit.ts 83.33% 1 Missing ⚠️
packages/aws-cdk/lib/cli/cli.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #573      +/-   ##
==========================================
+ Coverage   79.00%   79.04%   +0.03%     
==========================================
  Files          47       47              
  Lines        7083     7086       +3     
  Branches      791      791              
==========================================
+ Hits         5596     5601       +5     
+ Misses       1468     1466       -2     
  Partials       19       19              
Flag Coverage Δ
suite.unit 79.04% <71.42%> (+0.03%) ⬆️

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants