Skip to content

feat: refactor execution #674

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

Conversation

otaviomacedo
Copy link
Contributor

@otaviomacedo otaviomacedo commented Jul 1, 2025

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

Closes #140.


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 July 1, 2025 10:42
@github-actions github-actions bot added the p2 label Jul 1, 2025
Base automatically changed from otaviom/forbid-modifications to main July 10, 2025 15:19
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.

1 participant