lighthouse icon indicating copy to clipboard operation
lighthouse copied to clipboard

core(full-page-screenshot): make lhId less dependant on chrome internals

Open connorjclark opened this issue 3 years ago • 0 comments

The specific id for the execution context varies as Chrome internals does different work before we even begin Lighthouse gathering, and has already changed twice recently. Instead of using the exact id value, instead log the context ids we've used and use the indexOf from that array as the new execution-context specific position of the lhId.

These values should now only depend on the order in which we run our code (or whatever variance exists on the page that changes what elements our code inspects).

connorjclark avatar Aug 09 '22 22:08 connorjclark

Do you want to revert back to the old smoke expectations to see how robust it is?

did you end up trying this?

brendankenny avatar Aug 16 '22 19:08 brendankenny

I did not because the new expectations seem better to me. No need to care about differences b/wn FR and legacy runners.

connorjclark avatar Aug 16 '22 19:08 connorjclark

Wasn't the point of this change that there shouldn't be any differences now?

brendankenny avatar Aug 16 '22 19:08 brendankenny

No-FR is gonna run gatherers in different order, right? Then the ids will be different.

point was to just prevent the dependence on chrome doing...whatever it was doing that resulted in multiple execution ids being created before LH starts.

connorjclark avatar Aug 16 '22 19:08 connorjclark

point was to just prevent the dependence on chrome doing...whatever it was doing that resulted in multiple execution ids being created before LH starts.

Which would have been tested by reverting. /[0-9]-[0-9]+-IMG/ passes with or without this PR.

brendankenny avatar Aug 16 '22 19:08 brendankenny