Skip to content

Commit

Permalink
fix(integ-runner): update workflow error message is inaccurate (#27924)
Browse files Browse the repository at this point in the history
The previously printed command doesn't actual work.

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mrgrain committed Nov 10, 2023
1 parent 8100e34 commit 844cd6f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
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

0 comments on commit 844cd6f

Please sign in to comment.