Repository navigation
fix: open the page check's page where startup recovery won't reload it - #6187
Merged
Merged
Conversation
#6154 made a page whose module failed to load reload itself once from the same server, marked `_leaf-recovered`. `page check` and `page check --render` read the first document after it refused, waiting for its reports to be acknowledged, and the reload destroyed that document under them: plain `page check` reported a browser error in place of a clean reading, and the render check's page-code reading came back empty, so `page check --render` passed a page that could not start. Both now open the page at the marked address (`render_checks.asked_again`, moved from the test harness), where a page that cannot start waits for a new server rather than reloading, so they read one document. `wait_until_ready`'s `fixed_server` contract says its callers open the page there. Behavior changes the tests now pin: - A request finding's `frame` names the address the frame shows after the bootstrap rewrites it (`Page.navigatedWithinDocument`), without its marks or host key, rather than the address the check asked for. - A document the server itself refuses is reported at the marked address the check requested, since no bootstrap ran to rewrite it. Closes #6180
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #6154, a page whose module fails to load reloads itself once from the same server at an address marked
_leaf-recovered.page checkandpage check --renderkept reading the first document after it refused (waiting for its reports to be acknowledged), so the reload destroyed it under them. Plainpage checkreturned abrowser-error("Execution context was destroyed") in place of its reading, and the render check's page-code reading came back empty, sopage check --renderpassed a page that could not start. Both now open the page at the marked address, where a page that cannot start waits for a new server instead of reloading, so each reads exactly one document — the same address #6154 gave the startup tests (asked_again, now moved fromtests/render_harness.pyintoleaf.render_checksso the check and the tests share it).wait_until_ready'sfixed_serverdocstring now says its callers open the page there.tests/journeys/test_render_commands.py::test_plain_check_reports_page_request_failures_but_ignores_optional_assetsfails on main (assert [] == [page-report, not-ready, browser-error, …]) and passes on this branch. Itsbrowser-errorfinding is gone, since the plain check no longer races the reload.Two findings now show a different address:
frameis the address the frame shows once the bootstrap has removed its marks and the host key (Page.navigatedWithinDocument). Before, it was the address the check asked for. The journey test now expects the address without?t=….test_a_refused_document_reports_its_status_with_the_gate_failurenow expectsasked_again(refused).A check no longer gets #6154's single retry after a transient module failure. That matches how the check behaved before #6154, and its reading stays deterministic.
Verification
Passing locally: the reproduced journey test above, the other plain/render check journeys in the same file (
test_plain_check_runs_the_code_a_page_authored,…_reads_media,test_a_widget_that_fails_in_a_message_…,test_a_passing_render_check_…,test_render_reads_widget_chrome_where_it_stands), everyasked_againcaller intests/browser/(startup keys/readiness, initial delivery, render pages),test_render_gate.py's unanswered-resource, refused-document and far-sample gate tests, and the smoke test's shipped-page gate.test_check_render_refuses_what_only_a_browser_can_seefails here withassert None == 'Chrome'both on this branch and on main without it, because this runner has no browser named Chrome.Closes #6180 — automated triage