-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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(gather-runner): convert PAGE_HUNG to non-fatal runtimeError #9121
Conversation
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.
seems like a good take on things. Good luck with devtools-bot :)
@@ -552,6 +552,9 @@ class GatherRunner { | |||
const passResults = await GatherRunner.runPass(passContext); | |||
Object.assign(artifacts, passResults.artifacts); | |||
|
|||
// If we encountered a pageLoadError, don't try to keep loading the page in future passes. | |||
if (passResults.pageLoadError) break; |
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 gets a bit weird because we don't populate but still return them. All the other artifacts are either undefined, an Error, or the artifact, but we haven't until now done half-finished artifacts.
Seems ok for now, though
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.
LGTM
Summary
This should be last step in making all our page-load focused runtimeErrors non-fatal and exiting with an error code. This PR also cleans up some loose ends from #8865 where INSECURE_DOCUMENT_REQUEST was lying around.
Notable Changes
pageLoadError
and is no longer fatal.{runtimeError: {code: '...'}}
pageLoadError
, the rest of the passes are skipped and the rest of baseArtifacts are not populated. Necessary for recovery from PAGE_HUNG and just made sense, see core(driver): security errors are no longer a fatal or pageload error #8865 (comment) step 3.clearDataForOrigin
will not throw PROTOCOL_TIMEOUT if it can't complete, it will just warn and move on. This is necessary for trying to recover from PAGE_HUNG in a non-fatal way, and it was one of the flagged non-responsive methods in our PROTOCOL_TIMEOUT umbrella anyhow.Related Issues/PRs
followup according to #8865 (comment) (step 2 of the process)