Skip to content

core(fr): align navigation failure behavior#12862

Merged
patrickhulce merged 5 commits into
masterfrom
fr_smoke_nav_failures
Aug 18, 2021
Merged

core(fr): align navigation failure behavior#12862
patrickhulce merged 5 commits into
masterfrom
fr_smoke_nav_failures

Conversation

@patrickhulce

Copy link
Copy Markdown
Collaborator

Summary
Brings fraggle rock navigation behavior up to parity with legacy navigation behavior when it comes to page load failures. Previously we were throwing out warnings and failing to set the finalUrl. Enables the seo-status-403 smoke test as a regression test.

Related Issues/PRs
ref #12861 #11313

@patrickhulce patrickhulce requested a review from a team as a code owner August 5, 2021 01:25
@patrickhulce patrickhulce requested review from connorjclark and removed request for a team August 5, 2021 01:25
@google-cla google-cla Bot added the cla: yes label Aug 5, 2021
if (!userAgentMatch) throw new Error('Could not get chrome version.');
const actualChromeVersion = Number(userAgentMatch[1]);
/**
* Lazily compute the Chrome version because some reports are explicitly asserting error conditions.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doesn't this mean that the LHR type is wrong for lhr.environment.hostUserAgent? Right now it's required even for a 403 page

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the type is right, it's just unknown so the match fails.

The fix there is coming, but didn't want to mingle the two concerns in one PR and still wanted smokes to capture this fix since the 403 doesn't assert the chrome version anyway :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, fair. I guess ideally the comment will be obsolete soon, though.

Maybe we should add an assertion on the environment/chrome version in one of these smoke tests (maybe in errors-* somewhere)? My hesitation is that we're losing a bit of test coverage here because doing that regex should be fine and it's apparently the only thing catching the difference between '' and a UA string, but it's a very good point that an explicit assertion is way better than a buried, implicit assertion that produces an inscrutable stack trace :)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

an explicit assertion is way better than a buried, implicit assertion that produces an inscrutable stack trace :)

Yup, 100%. I've got a proposal for how to tackle this category of base artifact issue in FR where we'll add the explicit assertion back shortly 👍

@patrickhulce

Copy link
Copy Markdown
Collaborator Author

friendly ping @connorjclark

Comment thread .github/workflows/smoke.yml Outdated
- run: sudo apt-get install xvfb
- name: yarn smoke --fraggle-rock
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock -j=1 --retries=2 a11y lantern seo-passing seo-failing seo-status csp metrics
run: xvfb-run --auto-servernum yarn smoke --debug --fraggle-rock -j=1 --retries=2 --invert-match pwa offline oopif

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we're there, but we'll see :)

@patrickhulce patrickhulce merged commit 18e9f7d into master Aug 18, 2021
@patrickhulce patrickhulce deleted the fr_smoke_nav_failures branch August 18, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants