-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
ci: save perf trace to S3 on failure #2051
Conversation
.travis.yml
Outdated
- npm run lint | ||
- npm run unit | ||
- npm run closure | ||
- npm run smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this formatting was all done by travis on travis encrypt --add
I can remove if we care
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for reverting where it's unchanged. We just used git blame
on .travis.yml
in filing #2048 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah ++ on not adjusting whitespace in this PR.
(the last commit didn't revert it fwiw)
edit: all good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(the last commit didn't revert it fwiw)
yeah the noisiness referred to not uploading traces that failed unrelated to screenshots failures not the travis noise fix until the next PR :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice 👍
@@ -244,7 +254,8 @@ const cli = yargs | |||
.help('help') | |||
.describe({ | |||
'config-path': 'The path to the config JSON file', | |||
'expectations-path': 'The path to the expected audit results file' | |||
'expectations-path': 'The path to the expected audit results file', | |||
'save-assets-to': 'The path to save the assets to', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'save-assets-path'
? description could be "Saves run assets to this path" or something to be clear that it's not saved usually
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -89,6 +95,10 @@ function runLighthouse(url, configPath) { | |||
process.exit(runResults.status); | |||
} | |||
|
|||
if (saveAssetsPath) { | |||
return require(resolveLocalOrCwd(saveAssetsPath)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is confusing because of the output-path magic. Add a comment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
.travis.yml
Outdated
- npm run lint | ||
- npm run unit | ||
- npm run closure | ||
- npm run smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote for reverting where it's unchanged. We just used git blame
on .travis.yml
in filing #2048 :)
- node_modules | ||
- chrome-linux | ||
- lighthouse-extension/node_modules | ||
- lighthouse-viewer/node_modules |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brendankenny this I'm keeping because it's actually misaligned :P
e6036a0
to
e59288b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add us to the bucket? :)
.travis.yml
Outdated
- npm run lint | ||
- npm run unit | ||
- npm run closure | ||
- npm run smoke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yah ++ on not adjusting whitespace in this PR.
(the last commit didn't revert it fwiw)
edit: all good!
@@ -259,7 +270,7 @@ let passingCount = 0; | |||
let failingCount = 0; | |||
expectations.forEach(expected => { | |||
console.log(`Checking '${expected.initialUrl}'...`); | |||
const results = runLighthouse(expected.initialUrl, configPath); | |||
const results = runLighthouse(expected.initialUrl, configPath, cli['save-assets-to']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cli.saveAssetsTo
isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be both now that the bug is fixed but we were using the kebab case versions above
.travis.yml
Outdated
- npm run coveralls | ||
- npm run coveralls | ||
after_failure: | ||
- grep 'No screenshots' perf.json && travis-artifacts upload --path perf-0.trace.json |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- smokehouse runs a bunch of sites, thus making a number of traces, right? why does it look like we're only uploading a single json file?
- i presume this isn't actually overwriting the one file in the bucket with this name? what does it look like in the bucket?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paulirish perf smokehouse run is the only one that actually exercises an audit that needs screenshots, travis-artifacts
creates a directory for every job and sticks it in there
fo sho, send me your AWS emails or user IDs |
PTAL :) |
@brendankenny any more objections? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
last suggestion and LGTM 👍
|
||
npm run -s smokehouse -- --config-path=$config --expectations-path=$expectations | ||
if [[ "$CI" = true ]]; then | ||
save_assets="--save-assets-path=perf.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here and in .travis.yml
why this is being done. e.g. "Save assets so that traces of test failures can be examined" or something
* test: save perf trace to S3 on failure * test: fix tests and reduce noisiness * feedback * add comment
saves perf trace to an S3 bucket (GCS isn't supported by
travis-artifacts
)