Skip to content

Commit bef9679

Browse files
authored
feat!: use toolkit-lib for diff (corymhall#125) (corymhall#142)
This PR refactors the diff and assembly processing to use the new `@aws-cdk/toolkit-lib` library. This allows us to greatly simplify the logic that we have to maintain and offload more work to the core library. For example, this allows us to use the default CDK authentication instead of trying to replicate it ourselves (see corymhall#62). Couple of other changes that I've included in this PR since v2 allows me a chance to make breaking changes. BREAKING CHANGE: several breaking changes with details below There are several breaking changes in this release. 1. Replace `noDiffForStages` with `stackSelectionStrategy` & `stackSelectorPatterns` This uses the native selection stack filtering capability of `toolkit-lib` and should be a more robust option for users to filter stacks. `stackSelectorPatterns` also uses a multi-line input instead of a comma delimited string input. To migrate from `noDiffForStages` to `stackSelectorPatterns` you can do this: ```yaml # from this - name: Diff uses: corymhall/cdk-diff-action@v1 with: noDiffForStages: "Stage1,Stage2" githubToken: ${{ secrets.GITHUB_TOKEN }} # to this - name: Diff uses: corymhall/cdk-diff-action@v2-beta with: stackSelectorPatterns: | !Stage1/* !Stage2/* githubToken: ${{ secrets.GITHUB_TOKEN }} ``` 2. The default `diffMethod` is changed to `change-set` to match the cdk default behavior. This also changes the IAM Role used for diff from the `lookup-role` to the `deploy-role`. To keep the old behavior you can specify `diffMethod: template-only` 3. `allowDestroyTypes` and `noFailOnDestructiveChanges` input types were changed from a comma delimited string to a multi-line string. ```yaml # from this - name: Diff uses: corymhall/cdk-diff-action@v1 with: noFailOnDestructiveChanges: "Stage1,Stage2" githubToken: ${{ secrets.GITHUB_TOKEN }} # to this - name: Diff uses: corymhall/cdk-diff-action@v2-beta with: noFailOnDestructiveChanges: | Stage1 Stage2 githubToken: ${{ secrets.GITHUB_TOKEN }} ``` Closes corymhall#44 Fixes corymhall#62 --------- Signed-off-by: github-actions <github-actions@github.com> Co-authored-by: github-actions <github-actions@github.com>Fixes #
2 parents bef4921 + 1dc1569 commit bef9679

48 files changed

Lines changed: 380481 additions & 81405 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintrc.json

Lines changed: 3 additions & 100 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitattributes

Lines changed: 4 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/upgrade-main.yml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gitignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.npmignore

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.prettierignore

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.prettierrc.json

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.projen/deps.json

Lines changed: 14 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)