-
Notifications
You must be signed in to change notification settings - Fork 654
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
Extend urlReplacementPatterns
to details items in diff UI
#154
Comments
Yeah this was intentional to avoid losing any information in the report itself, but we can consider applying it to the entire report too. The logic for the linking items in the table diff is more aggressive and different than the report URL itself. lighthouse-ci/packages/utils/src/audit-diff-finder.js Lines 323 to 336 in 67ed263
I think my preference might be to thread the |
urlReplacementPatterns
to details items in diff UI
OK after revisiting this later. I'm not 100% convinced threading through the build
Any preferences between these @gravi2? And in the meantime are there any patterns that |
Taking my example, I have different hostnames for each branches, so diffing the master with a branch commit highlights these duplicates and complicates diff reading: The first option looks more consistant with the actual behavior for me. We don't expect to keep a long history anyway. |
@patrickhulce We have the same problem. We are building with webpack and hashing the assets which are then compared in lighthouse ci. Therefore we have diffs in each build regarding all asset-urls. I would perfer the option |
Thanks @KnisterPeter !
I'm not sure how this would work. As things work right now, |
Oh, my bad. I thought it might be possible to configure the |
Hello, is there something happening regarding this issue? Our project is currently facing the exactly same problem |
@patrickhulce
In our builds (e.g PR builds or nightly builds), we have different build specific URLs for page resources ( e.g CSS, JS, Images, etc). And these changes from build to build, for the same page been loaded. For example:
In Build#1, top page (https://www.example.com/some/path) will load following resources:
https://cdn.example.com/build-1/app.css
https://cdn.example.com/build-1/app.js
In Build#2, top page (https://www.example.com/some/path) will load following resources:
https://cdn.example.com/build-2/app.css
https://cdn.example.com/build-2/app.js
As you can see the resource URLs differ only by the build- values.
When we run lhci against the top URL (https://www.example.com/some/path), the lhci dashboard shows 4 lines when comparing the performance of 2 builds. It will show something like following:
https://cdn.example.com/build-1/app.css Removed
https://cdn.example.com/build-1/app.js Removed
https://cdn.example.com/build-2/app.css Added
https://cdn.example.com/build-2/app.js Added
As you can see the files are the same but been served at different URLs for various cache busting reasons. It makes the reading of comparison report a bit difficult.
I was hoping to find support in LHCI (or lighthouse) that allows us to regex replace the resource URLs, so that we can canonicalize them BEFORE they are inserted into the LHCI server for analysis. I see that lhci upload supports
urlReplacementPatterns
but its seems like it only works on the top URL i.e the page been tested. It does not impact/change the resource URLs.Please let me know if there is a way to achieve the above. Or if it would be a good idea and within the scope of lighthouse-ci, for a PR.
Also wondering if others are facing similar issues when using bundlers like webpack which may have different bundle hashes between the builds.
The text was updated successfully, but these errors were encountered: