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

fix: warn about redirected urls #1605

Closed
wants to merge 1 commit into from
Closed

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Feb 2, 2017

fixes #715

How it looks.
image

I stuck it after everything since putting at the top likely means no one will know.

@@ -281,6 +281,14 @@ function runLighthouse(url: string,
return results;
})
.then((results: Results) => {
if (url !== results.url) {
Copy link
Member

Choose a reason for hiding this comment

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

should we move this patch to runner.js so our other distributions get the log as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

How are logs surfaced there? I really think it's unlikely to have any impact unless it's prominent. Come to think of it, thoughts on injecting the warning into the report itself?

Copy link
Member

Choose a reason for hiding this comment

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

Come to think of it, thoughts on injecting the warning into the report itself?

#1512 kind of captures the need for this. For stuff that's logged anyway, one easy fix is to capture any warning or error log messages and somehow display them in the report.

Copy link
Member

Choose a reason for hiding this comment

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

after #1677 I now realize you should do the comparison with URL.equalWithExcludedFragments so it doesn't warn on dropped fragments

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

good call

Copy link
Member

Choose a reason for hiding this comment

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

actually, now I wonder if that's right :) Excluding the fragment makes sense for comparing against network records, but for sites doing some state based stuff with the fragment maybe we should warn that you ended up in a different state than you intended (at least according to the URL)

wdyt?

@patrickhulce
Copy link
Collaborator Author

Just bumping this, @brendankenny do you think we should hold off until we fully resolve #1512?

@@ -281,6 +281,14 @@ function runLighthouse(url: string,
return results;
})
.then((results: Results) => {
if (url !== results.url) {
Copy link
Member

Choose a reason for hiding this comment

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

after #1677 I now realize you should do the comparison with URL.equalWithExcludedFragments so it doesn't warn on dropped fragments

@brendankenny
Copy link
Member

Just bumping this, @brendankenny do you think we should hold off until we fully resolve #1512?

I feel like this is less effective while we figure out #1512 but still helpful, but agree with @paulirish that this makes a lot more sense inside lighthouse instead of in the CLI.

@patrickhulce
Copy link
Collaborator Author

I'm going to close this in favor of starting work towards consistent error/warning reporting and surfacing.

@patrickhulce patrickhulce deleted the warn_diff_urls branch February 10, 2017 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"URL responds with a 200 when offline": initial URL or final URL?
3 participants