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): move HostUserAgent/FormFactor back to base artifacts #12969

Merged
merged 5 commits into from
Sep 8, 2021

Conversation

patrickhulce
Copy link
Collaborator

Summary
Moves HostUserAgent/HostFormFactor artifacts back to the base. These were originally converted to individual artifacts so it was seamless for other artifacts to depend on them explicitly. We want to collect this information even when the page fails to load though, so they semantically make more sense on the base.

This PR exposes base artifacts to other artifacts as a property on context (like they already are in legacy Lighthouse), and deletes the standalone artifacts for HostUserAgent/HostFormFactor.

Related Issues/PRs
ref #11313

@patrickhulce patrickhulce requested a review from a team as a code owner August 23, 2021 16:29
@patrickhulce patrickhulce requested review from connorjclark and removed request for a team August 23, 2021 16:29
@google-cla google-cla bot added the cla: yes label Aug 23, 2021
@@ -344,6 +344,7 @@ const status403 = {
// Note: most scores are null (audit error) because the page 403ed.
requestedUrl: BASE_URL + 'seo-failure-cases.html?status_code=403',
finalUrl: BASE_URL + 'seo-failure-cases.html?status_code=403',
userAgent: /Chrom(e|ium)/, // Ensure we still collect base artifacts when page fails to load.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

bring back the assertion that was previously implicit that userAgent could be collected on failed runs

@@ -38,7 +46,7 @@ function getAuditsBreakdown(lhr) {

const failedAudits = applicableAudits.filter(audit => audit.score !== null && audit.score < 1);

return {auditResults, erroredAudits, failedAudits, informativeAudits, notApplicableAudits};
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this wasn't used outside of this function and the new invariant means its count could be flaky, so avoiding accidental usage.

@patrickhulce patrickhulce merged commit 5cbad24 into master Sep 8, 2021
@patrickhulce patrickhulce deleted the fr_base_artifact_deps branch September 8, 2021 20:50
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.

3 participants