-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
core(trace-processor): ignore navigationStart
with falsy document url
#13848
Conversation
I bisected the issue, not sure why the range is so big:
For some reason I can't get the per-revision bisect to work, so if someone wants to take a stab be my guest (to repro, just |
i tried and got a slightly smaller range. (16 compared to your 66) my commands python bisect_builds.py --verbose -a mac -g 981365 -b 981430 --verify-range --use-local-cache -c "%p --user-data-dir=/tmp/sdfl3k1 --no-first-run --remote-debugging-port=9222"
# along with making port=0 to port=9222 in smokehouse/…/cli.js
# and then of course `yarn smoke redirects-client-paint-server` (i tried with looking at it, i very much suspect it's Reland "Enable same-site bfcache by default" (I3002d4a7) · Gerrit Code Review https://chromium-review.googlesource.com/c/chromium/src/+/3439311 |
(!event.args.data || !event.args.data.documentLoaderURL || | ||
ACCEPTABLE_NAVIGATION_URL_REGEX.test(event.args.data.documentLoaderURL)); | ||
if (event.name !== 'navigationStart') return false; | ||
if (!event.args.data?.documentLoaderURL) return false; |
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.
maybe some variation on
if (!event.args.data?.documentLoaderURL) return false; | |
// COMPAT: support pre-m67 test traces before `args.data` added to all navStart events. | |
// TODO: remove next line when old test traces (progressive-app-m60.json) are updated. | |
if (!event.args.data) return true; | |
if (!event.args.data?.documentLoaderURL) return false; |
?
I'm 100% good with updating well past m60 for a test trace, but we could fix the test failure to unblock CI and then update the tests? Maybe it would be a trivial update, but we'd want to make sure it exercises the same execution paths, and it's currently used in at least 227 tests, probably more that just aren't currently failing with NO_NAVSTART
.
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.
for future reference, CL from @deepanjanroy that added args.data
to all navStart events: https://chromium-review.googlesource.com/975986
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.
Ope I just thought that the unit failures were all #13846. Didn't think to check.
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.
There were some test traces with event.args.data
but no documentLoaderURL
. I updated this to check if documentLoaderURL
is specifically undefined
.
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.
haha, ok then, so when we need to update the trace tests just removing that one line will be where to start
Nice work! Change seems plausible. I couldn't resist but update @adamraine's https://crbug.com/1308805#c1 to maybe find out more :) |
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.
Will land after #13844
@adamraine possible to land first? Would feel better landing with green smoke tests.
Change seems good to me. Looking at the trace event generation:
dict.Add("documentLoaderURL", document_loader_ ? document_loader_->Url().GetString() : "");
we should have always been handling the empty string case, and if it doesn't have a document_loader
, it seems like we're never going to want to treat it as a navStart of interest.
00b5521
to
b2e2f1d
Compare
Ya |
is it worth touching this bit? lighthouse/lighthouse-core/lib/tracehouse/trace-processor.js Lines 469 to 470 in d71a587
feels a little odd this is so similar but different. |
Seems pretty simple to bring in |
totally yes. but the impls are different. and i havent been looking at this recently enough to know that they should or should not be different. so was hoping you'd know. :) |
I think the only concern is if the regex is too strict for just determining the main frame. Unless we are concerned about trace processor working for non http/https/chrome pages, I think it's fine to reuse |
thanks yeah. when i wrote my last reply I didn't see that you already made the change. anyway.. my bad. your reasoning for reuse feels good, so i'm happy we got to DRY it up a tad. |
Based on the description for #5917, it seems like we should be ignoring nav starts with falsy document url but the condition doesn't do that.
This fixed the third item in #13847 for me locally.
Will land after #13844