Commit 3ef1921
feat!: use toolkit-lib for diff (#125)
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 #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 #44
Fixes #62
---------
Signed-off-by: github-actions <github-actions@github.com>
Co-authored-by: github-actions <github-actions@github.com>1 parent 2f4259c commit 3ef1921
File tree
35 files changed
+405458
-68949
lines changed- .github/workflows
- .projen
- dist
- bin
- src
- test
35 files changed
+405458
-68949
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
51 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
52 | 53 | | |
53 | 54 | | |
54 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
55 | 69 | | |
56 | | - | |
| 70 | + | |
57 | 71 | | |
58 | | - | |
| 72 | + | |
59 | 73 | | |
60 | 74 | | |
61 | 75 | | |
62 | 76 | | |
63 | 77 | | |
64 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
65 | 92 | | |
66 | 93 | | |
67 | 94 | | |
68 | 95 | | |
69 | 96 | | |
70 | 97 | | |
71 | 98 | | |
72 | | - | |
73 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
74 | 103 | | |
75 | 104 | | |
76 | 105 | | |
77 | 106 | | |
78 | 107 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | 108 | | |
83 | | - | |
84 | 109 | | |
85 | 110 | | |
86 | | - | |
87 | 111 | | |
88 | | - | |
89 | 112 | | |
90 | 113 | | |
91 | 114 | | |
92 | 115 | | |
93 | 116 | | |
94 | 117 | | |
95 | 118 | | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
96 | 133 | | |
97 | 134 | | |
98 | 135 | | |
| |||
215 | 252 | | |
216 | 253 | | |
217 | 254 | | |
218 | | - | |
| 255 | + | |
219 | 256 | | |
220 | 257 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
88 | 90 | | |
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
101 | | - | |
| 107 | + | |
102 | 108 | | |
103 | | - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
104 | 112 | | |
105 | 113 | | |
106 | 114 | | |
| |||
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
117 | | - | |
| 125 | + | |
118 | 126 | | |
119 | | - | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
130 | 140 | | |
131 | 141 | | |
132 | 142 | | |
133 | | - | |
| 143 | + | |
134 | 144 | | |
135 | 145 | | |
136 | 146 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments