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 hostnames #9480
Fix hostnames #9480
Conversation
Build PASSEDStarted: 2018-02-16 00:27:10 View more information about this build on: |
It appears that gh-8614 introduced an additional regression for the Sauce Labs integration. I'm investigating that now. In the mean time, the passing TravisCI build for Chrome demonstrates that this patch has the desired effect. |
Okay, I think I've got that bug licked. I've submitted a patch at gh-9484. It depends on this patch. |
@@ -117,8 +117,7 @@ def env_extras(**kwargs): | |||
|
|||
|
|||
def env_options(): | |||
return {"host": "127.0.0.1", | |||
"external_host": "web-platform.test", | |||
return {"external_host": "web-platform.test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The host is deliberately not the default on Firefox, because Firefox is set to always resolve the specified domains to localhost through its network.dns.localDomains
pref.
@@ -1,4 +1,4 @@ | |||
{"host": "%(host)s", | |||
{"host": "web-platform.test", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the goal was to avoid hardcoding the domain everywhere; pretty sure the right fix for this is to make sure we always have an appropriate host provided when we evaluate it (or just drop it if we don't).
I hope I didn't give the impression that I wasn't paying attention. I
I'm not sure what you mean here. Are you suggesting:
Or:
Or maybe something else? |
I'm not sure which I'm suggesting either. :) I think I had omitting it from the JSON and add it in the Python code in mind? Honestly I'm not sure what benefit the JSON file brings versus just doing it all in the Python code. |
b47c410
to
aa44f39
Compare
@jugglinmike we (as in one of us!) should check why https://github.com/w3c/web-platform-tests/blob/master/tools/wpt/tests/test_wpt.py#L94 didn't catch this BTW (I presume, as I was talking to @jgraham about recently, the fact that the exit code is almost always zero, regardless of whether we've had a critical error or not). |
# > set to always resolve the specified domains to localhost through its | ||
# > `network.dns.localDomains` pref. | ||
# | ||
# https://github.com/w3c/web-platform-tests/pull/9480 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's shorten this comment:
The server host is set to 127.0.0.1 as Firefox is configured (through the network.dns.localDomains preference set below) to resolve the test domains to localhost without relying on the network stack.
Or something like that. I'm not entirely sure how to word this?
I'll take a closer look tomorrow, but:
|
Sure. There's a new "fixup!" commit with those deletions.
I've attempted to do so, but I ran up against a confusing error almost immediately (attempting to run using the command
I appreciate your interest in improving test coverage for the WPT CLI. I'd like to help out, but as you mentioned (and as my confusion above demonstrates), that will take some time. As we approach a week since the regression was introduced (and as we receive issue reports like gh-9520), I am feeling increased urgency about restoring the original functionality. I submitted this patch as a way to restore functionality while honoring the refactoring, but maybe that is the wrong tack for this situation. If you would like to see this fix landed with tests, can we begin by reverting the regression in |
@jugglinmike I'd been hoping it wouldn't be too hard to write tests and that we'd get it landed today. The ImportError is odd… |
@jugglinmike I guess my suggestion is you clean up the history of this branch, get rid of the demo test file, and we land it after it runs through Travis? |
4f0a6b3
to
bc82c5e
Compare
You got it. I almost forgot to update the in-line comment as you requested. The new text is now available on this branch. The original branch is available at https://github.com/bocoup/web-platform-tests/tree/fix-hostnames-prebase for posterity. |
@jugglinmike the first two commits are just a commit and a revert, no? so they can be dropped too. |
Prior to the application of this patch, the configuration property named `host` was required to expand the templated JSON file maintained within the WPT CLI. By removing the property from some browser definitions without updating that template, commit 1b4f253 introduced failures when using the `run` sub-command with the effected browsers. Refactor the logic for generating the configuration to use an in-memory representation (instead of a file-based template) and conditionally extend this object with the `host` option for browsers which specify it. Document the rationale for the browser which requires this functionality.
bc82c5e
to
c6d99f0
Compare
That's right. I've removed them and squashed the remaining commits with a new message so this changeset has the proper context in the git history. |
@gsnedders The TravisCI build passed. Could you please merge this patch on my behalf? |
db55c16 fixed this for Servo; "true"/"false" worked when it was interpolated as JSON, but that is no longer the case since cb2d75f (web-platform-tests#9480).
db55c16 fixed this for Servo; "true"/"false" worked when it was interpolated as JSON, but that is no longer the case since cb2d75f (web-platform-tests#9480).
db55c16 fixed this for Servo; "true"/"false" worked when it was interpolated as JSON, but that is no longer the case since cb2d75f (web-platform-tests#9480).
I believe there was an error in gh-8614. Since it removed the
hosts
property, the templatedconfig.json
file which referenced that property can no longer be expanded. Here's an example of the error I encountered when running./wpt run chrome
locally:This hasn't interrupted things on CI because the Firefox configuration object still includes the
hosts
property, and the builds for the effected browsers are configured as "allowed failures". Those builds have recently been failing for this same reason.
The value in the Firefox configuration (
127.0.0.1
) differs from the value shared by all other browsers (web-platform.test
). gh-8614 is fairly clear in its goal to reduce variability, so I'm assuming this disparity is not necessary/desirable. Since I can't think of any reason why the host should be different for Firefox, I've authored the patch to normalize onweb-platform.test
). If I'm wrong about that, then we can omit the second commit on this branch and apply only the first commit (which reverts theoriginal change).
This change is