Skip to content
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

fix(integ-runner): update workflow error message is inaccurate #27924

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions packages/@aws-cdk/integ-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

<!--END STABILITY BANNER-->


## Overview

This tool has been created to be used initially by this repo (aws/aws-cdk). Long term the goal is
Expand All @@ -38,12 +37,15 @@ integ-runner [ARGS] [TEST...]
This will look for all files that match the naming convention of `/integ.*.js$/`. Each of these files will be expected
to be a self contained CDK app. The runner will execute the following for each file (app):

1. Check if a snapshot file exists (i.e. `/*.snapshot$/`)
2. If the snapshot does not exist
2a. Synth the integ app which will produce the `integ.json` file
1. Check if snapshot files exist (i.e. `*.snapshot/**`)
2. If the snapshot does not exist\
a) Synth the integ app which will produce the `integ.json` file
3. Read the `integ.json` file which contains instructions on what the runner should do.
4. Execute instructions

All snapshot files (i.e. `*.snapshot/**`) must be checked-in to version control.
If not, changes cannot be compared across systems.

### Options

- `--update-on-failed` (default=`false`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,9 @@ export class IntegTestRunner extends IntegRunner {
});
} catch (e) {
logger.warning('%s\n%s',
`Could not checkout snapshot directory ${this.snapshotDir} using these commands: `,
`git merge-base HEAD ${baseBranch} && git checkout {merge-base} -- ${relativeSnapshotDir}`,
`Could not checkout snapshot directory '${this.snapshotDir}'. Please verify the following command completes correctly:`,
`git checkout $(git merge-base HEAD ${baseBranch}) -- ${relativeSnapshotDir}`,
'',
);
logger.warning('error: %s', e);
}
Expand Down
Loading