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): always run NetworkUserAgent gatherer #14392

Merged
merged 3 commits into from
Sep 16, 2022

Conversation

adamraine
Copy link
Member

This was a base artifact in legacy mode but it's a normal artifact in FR.

It wasn't being run because no audits depend on it. This PR avoids the audit dependency filter for this artifact.

@adamraine adamraine requested a review from a team as a code owner September 15, 2022 23:40
@adamraine adamraine requested review from connorjclark and removed request for a team September 15, 2022 23:40
@@ -31,7 +31,13 @@ const filterResistantAuditIds = ['full-page-screenshot'];

// Some artifacts are used by the report for additional information.
// Always run these artifacts even if audits do not request them.
const filterResistantArtifactIds = ['HostUserAgent', 'HostFormFactor', 'Stacks', 'GatherContext'];
const filterResistantArtifactIds = [
Copy link
Member

Choose a reason for hiding this comment

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

Is this a result of the fact that BaseArtifacts and FRBaseArtifacts are different?

can we align this thing to the types to ensure there arent others slipping through the cracks?

Copy link
Member Author

Choose a reason for hiding this comment

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

Is this a result of the fact that BaseArtifacts and FRBaseArtifacts are different?

There is this:

/**
* The set of base artifacts that were replaced by standard gatherers in Fraggle Rock.
*/
interface LegacyBaseArtifacts {
/** The user agent string that Lighthouse used to load the page. Set to the empty string if unknown. */
NetworkUserAgent: string;
/** Information on detected tech stacks (e.g. JS libraries) used by the page. */
Stacks: Artifacts.DetectedStack[];
/** Parsed version of the page's Web App Manifest, or null if none found. This moved to a regular artifact in Fraggle Rock. */
WebAppManifest: Artifacts.Manifest | null;
/** Errors preventing page being installable as PWA. This moved to a regular artifact in Fraggle Rock. */
InstallabilityErrors: Artifacts.InstallabilityErrors;
/** A set of page-load traces, keyed by passName. */
traces: {[passName: string]: Trace};
/** A set of DevTools debugger protocol records, keyed by passName. */
devtoolsLogs: {[passName: string]: DevtoolsLog};
}

But that list includes artifacts that we don't want to be filter resistant (e.g. InstallabilityErrors)

I think this list should include artifacts that are not run in all 3 modes, but should always be run if they can. For example, NetworkUserAgent isn't available in snapshot mode.

Also, looks like HostUserAgent, HostFormFactor and GatherContext don't need to be filter resistant because they are base artifacts.

@adamraine adamraine merged commit 0ce84c0 into master Sep 16, 2022
@adamraine adamraine deleted the always-network-user-agent branch September 16, 2022 19:04
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