You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(integ-runner): test update path when running tests (#19915)
This PR adds an "update path" workflow to the integration test
workflow. When a change is being made to an existing integration test we
want to be able to ensure that the change not only works for _new_
stacks, but also with _existing_ stacks. In order to accomplish this,
the runner will first deploy the existing snapshot (i.e. `cdk deploy
--app /path/to/snapshot`) and then perform a stack update by deploying
the integration test.
The update path can be disabled by passing the `--disable-update-path`
command line option.
This PR adds a couple of pieces of functionality in order to enable
testing the "update path".
1. The runner will attempt to checkout the snapshot from the origin
before running the test. This is to try and make sure that you are
actually testing an update of the existing snapshot and not an
intermediate snapshot (e.g. if you have been iterating locally).
2. When the runner performs the snapshot diff, it will check for any
destructive changes and return that information as a warning to the
user.
3. If any destructive changes are found, the runner will record that
information as trace metadata in the `manifest.json` file. This will
enable us to create automation that checks for this as part of the PR
workflow
Added logic to include the `allowDestroy` option in items 2 & 3 above.
If a resource type is included in the `allowDestroy` list, then
it will not be reported.
----
### All Submissions:
* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)
### Adding new Unconventional Dependencies:
* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)
### New Features
* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?
*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Copy file name to clipboardExpand all lines: packages/@aws-cdk/integ-runner/README.md
+33
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,8 @@ to be a self contained CDK app. The runner will execute the following for each f
60
60
If this is set to `true` then the list of tests provided will be excluded
61
61
-`--from-file`
62
62
Read the list of tests from this file
63
+
-`--disable-update-workflow` (default=`false`)
64
+
If this is set to `true` then the [update workflow](#update-workflow) will be disabled
63
65
64
66
Example:
65
67
@@ -150,6 +152,37 @@ Test Results:
150
152
Tests: 1 passed, 1 total
151
153
```
152
154
155
+
#### Update Workflow
156
+
157
+
By default, integration tests are run with the "update workflow" enabled. This can be disabled by using the `--disable-update-workflow` command line option.
158
+
159
+
If an existing snapshot is being updated, the integration test runner will first deploy the existing snapshot and then perform a stack update
160
+
with the new changes. This is to test for cases where an update would cause a breaking change only on a stack update.
161
+
162
+
The `integ-runner` will also attempt to warn you if you are making any destructive changes with a message like:
logger.warning('You are attempting to run %s tests in parallel, but only have %s workers. Not all of your profiles+regions will be utilized',argv.profiles*argv['parallel-regions'],argv['max-workers']);
0 commit comments