lighthouse-ci
lighthouse-ci copied to clipboard
Creating 2 reports against the same base URL with a query parameter only shows the 1 check in GitHub
Describe the bug
When I run a Lighthouse CI Collect against two url's such as the example below
-
http://localhost:3000/foo
-
http://localhost:3000/foo?example=bar
The two Lighthouse reports are generated successfully and stored in storage.googleapis.com
.
In GitHub, when the action has finished and I have a token setup to add in the outcome of both of these reports - I only see the report generated for http://localhost:3000/foo?example=bar
in the checks list.
To Reproduce Steps to reproduce the behavior:
Using the configuration below, run lhci autorun
against 2 URL's with the same base URL.
One of them should provide a query string.
module.exports = {
ci: {
collect: {
url: [
'http://localhost:3000/foo',
'http://localhost:3000/foo?example=bar'
],
startServerCommand: 'yarn start',
numberOfRuns: 3
},
upload: {
target: 'temporary-public-storage'
}
}
};
Expected behavior
Two reports should show in GitHub checks when using a token to report the checks.
Logs/Screenshots
When running ``lhci autorun`, 2 Lighthouse reports have been generated.
When viewing in GitHub, only one of these reports shows.
Environment (please complete the following information):
- OS: Github Actions
- Browser:
- Version:
We have also been seeing this behaviour. I believe the query params are being stripped when generating the label for github: https://github.com/GoogleChrome/lighthouse-ci/blob/main/packages/cli/src/upload/upload.js#L190
We can customise the upload prefix, but that's about it. I wonder if we want an option to preserve query params in the label, but open to other ideas!
A toggle to preserve the query params without stripping them would be great!
Very basic approach which needs testing: https://github.com/GoogleChrome/lighthouse-ci/compare/main...GeorgeA93:main
any update on this?
Can I follow up on this as well? Thank you!