-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Remove duplicate copies of subdomains/hostnames #8614
Remove duplicate copies of subdomains/hostnames #8614
Conversation
@@ -23,7 +23,6 @@ | |||
from ..executors.executormarionette import (MarionetteTestharnessExecutor, | |||
MarionetteRefTestExecutor, | |||
MarionetteWdspecExecutor) | |||
from ..environment import hostnames |
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.
This is also used later in the file, right?
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.
Apparently so. But it passed CI despite that because we disable the unused variable pyflake still. :(
Build PASSEDStarted: 2017-12-07 16:31:46 View more information about this build on: |
291af65
to
80480fa
Compare
80480fa
to
a23f7e5
Compare
Build PASSEDStarted: 2018-02-09 14:39:04 View more information about this build on: |
cf9663e
to
816e9f3
Compare
@@ -392,6 +392,11 @@ def config_replacement(match): | |||
value = request.headers | |||
elif field == "GET": | |||
value = FirstWrapper(request.GET) | |||
elif field == "domains": |
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.
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.
I think this is probably fine. Maybe write as:
request.server.config.get('not_domains', request.server.config['domains'])
(if that's a real dict
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.
This seems fine to me too.
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.
Could you test this by pushing some representative test changes to this branch and ensuring that you still get meaningful results?
@@ -173,6 +192,8 @@ def __init__(self, logger, binary, prefs_root, test_type, extra_prefs=None, debu | |||
self.stylo_threads = stylo_threads | |||
self.chaos_mode_flags = chaos_mode_flags | |||
|
|||
self.server_locations = write_server_locations_file(self.config) |
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.
It doesn't look like you clean up this file during teardown. Using NamedTemporaryFile
to create it would perhaps solve that for you.
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.
I was just copying what we did with Servo for the hosts file, FWIW.
tempfile.NamedTemporaryFile
doesn't work because there's no guarantee whether you can reopen the file a second time. Per the docs:
Whether the name can be used to open the file a second time, while the named temporary file is still open, varies across platforms (it can be so used on Unix; it cannot on Windows NT or later).
I'd somehow missed the cleanup
function before, bleh.
"foo/prefs", | ||
"testharness.js", | ||
config={ | ||
"ports": {"http": [1234]}, |
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.
This test doesn't seem that useful. It ensures that you write something to some file, but it doesn't really check that the contents are right. It seems more useful to set things up so you can check you get the exact content you expect compared against the file you removed. Obviously this would then have to be changed when new servers are added or removed, but it would have the advantage of actually checking that something functional is produced.
e2667ac
to
eacfb21
Compare
Very oddly, this doesn't fail locally like it does on Travis. o_O |
Fixes #9232. |
f279369
to
e2351c0
Compare
Due to recent changes in the internals of the WPT CLI [1], it is no longer necessary to parameterize the `host` value. Remove the property from all browser configuration objects, and remove its reference from the templated JSON file. [1] web-platform-tests#8614
A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests#8614
Due to recent changes in the internals of the WPT CLI [1], it is no longer necessary to parameterize the `host` value. Remove the property from all browser configuration objects, and remove its reference from the templated JSON file. [1] web-platform-tests#8614
A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Require all "environment extra" classes to implement the Python callable protocol, and update the `SauceConnect` and `FontInstaller` class accordingly. [1] web-platform-tests#8614
A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests#8614
A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests#8614
A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] #8614
…ce, a=testonly Automatic update from web-platform-testsCorrect integration with Sauce Labs service (#9484) A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests/wpt#8614 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484
…ce, a=testonly Automatic update from web-platform-testsCorrect integration with Sauce Labs service (#9484) A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests/wpt#8614 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 UltraBlame original commit: b05b78e57595a3f62f44169b76961fd54f7355f8
…ce, a=testonly Automatic update from web-platform-testsCorrect integration with Sauce Labs service (#9484) A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests/wpt#8614 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 UltraBlame original commit: b05b78e57595a3f62f44169b76961fd54f7355f8
…ce, a=testonly Automatic update from web-platform-testsCorrect integration with Sauce Labs service (#9484) A recently merged patch centralized configuration values which defined the domain names available during test execution [1]. That patch was based on a mistaken assumption regarding the location of that value and the stage of the test execution at which it would be available. (Specifically: the value is not present in the environment configuration object when the "environment extras" are initialized.) This interfered with the initialization of the "environment" for the Sauce Labs service, making it impossible to run the tests there. Defer the retrieval of the environment configuration object to the time that object's context manager is activated. Update the call sites to provide the environment configuration at this moment. Also update the signature of the context manager for the `FontInstaller` "environment extra" to accept this second parameter. [1] web-platform-tests/wpt#8614 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 wpt-commits: e56563d2b1e8bd225bf4c8b4682cbd12beeae1a7 wpt-pr: 9484 UltraBlame original commit: b05b78e57595a3f62f44169b76961fd54f7355f8
Fixes #6556.
This change is