Skip to content
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(fr): convert base artifacts to gatherer artifacts #12129

Merged
merged 5 commits into from
Feb 25, 2021

Conversation

patrickhulce
Copy link
Collaborator

Summary
Converts most of the base artifacts so that they're runnable in fraggle rock as regular gatherers, but preserves the current base behavior in the legacy path as well.

  • Converts base artifacts to regular gatherers.
    • Stacks
    • NetworkUserAgent
    • WebAppManifest
    • InstallabilityErrors
  • Extracts benchmark and browser version collection into an environment.js off of driver.
  • Adds url as a shared property of the FRTransitionalContext
  • Adds a few tests for the undertested areas that moved.

Related Issues/PRs
ref #11313

@patrickhulce patrickhulce requested a review from a team as a code owner February 23, 2021 22:52
@patrickhulce patrickhulce requested review from connorjclark and removed request for a team February 23, 2021 22:52
@google-cla google-cla bot added the cla: yes label Feb 23, 2021
Copy link
Collaborator

@connorjclark connorjclark left a comment

Choose a reason for hiding this comment

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

LGTM, just a couple comments. but since this is so big I think a second person should review too.

types/gatherer.d.ts Outdated Show resolved Hide resolved
lighthouse-core/gather/gather-runner.js Show resolved Hide resolved
Co-authored-by: Connor Clark <cjamcl@google.com>
@patrickhulce
Copy link
Collaborator Author

@adamraine you interested in giving this a second look? :)

Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -93,7 +95,7 @@ describe('Fraggle Rock API', () => {

const {auditResults, erroredAudits, failedAudits} = getAuditsBreakdown(lhr);
// TODO(FR-COMPAT): This assertion can be removed when full compatibility is reached.
expect(auditResults.length).toMatchInlineSnapshot(`65`);
expect(auditResults.length).toMatchInlineSnapshot(`67`);
Copy link
Member

Choose a reason for hiding this comment

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

Weren't there 3 gatherers added that can do snapshot mode? InstallabilityErrors, Stacks, and WebAppManifest?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes great catch! turns out quite a few of the artifact ids were misspelled. we have 7 more artifacts now 🎉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added typechecking to the new default-config that will ensure all artifact IDs used in strings are typechecked against our usages

@@ -95,7 +95,7 @@ describe('Fraggle Rock API', () => {

const {auditResults, erroredAudits, failedAudits} = getAuditsBreakdown(lhr);
// TODO(FR-COMPAT): This assertion can be removed when full compatibility is reached.
expect(auditResults.length).toMatchInlineSnapshot(`67`);
expect(auditResults.length).toMatchInlineSnapshot(`72`);
Copy link
Member

Choose a reason for hiding this comment

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

There were 4 misspellings but this jumped from 67 to 72. Is that because more than 1 audit use the same artifact?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yep!

Copy link
Member

@adamraine adamraine left a comment

Choose a reason for hiding this comment

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

LGTM2

@patrickhulce patrickhulce merged commit a753350 into master Feb 25, 2021
@patrickhulce patrickhulce deleted the fr_base_artifacts branch February 25, 2021 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants