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

Remove duplicate copies of subdomains/hostnames #8614

Merged
merged 4 commits into from
Feb 9, 2018

Conversation

gsnedders
Copy link
Member

@gsnedders gsnedders commented Dec 7, 2017

Fixes #6556.


This change is Reviewable

@gsnedders gsnedders self-assigned this Dec 7, 2017
@gsnedders gsnedders requested a review from jgraham December 7, 2017 16:30
@wpt-pr-bot wpt-pr-bot requested a review from bobholt December 7, 2017 16:30
@@ -23,7 +23,6 @@
from ..executors.executormarionette import (MarionetteTestharnessExecutor,
MarionetteRefTestExecutor,
MarionetteWdspecExecutor)
from ..environment import hostnames
Copy link
Contributor

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?

Copy link
Member Author

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. :(

@ghost
Copy link

ghost commented Dec 7, 2017

Build PASSED

Started: 2017-12-07 16:31:46
Finished: 2017-12-07 16:43:04

View more information about this build on:

@foolip foolip removed the request for review from bobholt January 18, 2018 12:56
@ghost
Copy link

ghost commented Jan 23, 2018

Build PASSED

Started: 2018-02-09 14:39:04
Finished: 2018-02-09 14:53:30

View more information about this build on:

@@ -392,6 +392,11 @@ def config_replacement(match):
value = request.headers
elif field == "GET":
value = FirstWrapper(request.GET)
elif field == "domains":
Copy link
Member Author

Choose a reason for hiding this comment

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

I really don't like this, but I don't think we can reasonably merge domains and not_domains (given we need to know what's meant to resolve when setting up things like hosts files), and I think we want it like this to resolve #9232.

@jgraham @Ms2ger halp.

Copy link
Contributor

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

Copy link
Contributor

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.

Copy link
Contributor

@jgraham jgraham left a 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)
Copy link
Contributor

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.

Copy link
Member Author

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]},
Copy link
Contributor

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.

@wpt-pr-bot wpt-pr-bot added the dom label Feb 1, 2018
@wpt-pr-bot wpt-pr-bot requested review from ayg, jdm and zqzhang February 1, 2018 00:30
@gsnedders gsnedders force-pushed the subdomain-cleanup branch 2 times, most recently from e2667ac to eacfb21 Compare February 5, 2018 14:55
@gsnedders gsnedders closed this Feb 5, 2018
@gsnedders gsnedders reopened this Feb 5, 2018
@gsnedders gsnedders closed this Feb 5, 2018
@gsnedders gsnedders reopened this Feb 5, 2018
@gsnedders
Copy link
Member Author

Very oddly, this doesn't fail locally like it does on Travis. o_O

@gsnedders
Copy link
Member Author

Fixes #9232.

@gsnedders gsnedders merged commit 040654c into web-platform-tests:master Feb 9, 2018
@gsnedders gsnedders deleted the subdomain-cleanup branch February 9, 2018 15:01
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 12, 2018
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
@jugglinmike jugglinmike mentioned this pull request Feb 12, 2018
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 12, 2018
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
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 15, 2018
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
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 15, 2018
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
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 16, 2018
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
jugglinmike added a commit to bocoup/wpt that referenced this pull request Feb 16, 2018
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
gsnedders pushed a commit that referenced this pull request Feb 16, 2018
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
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Apr 1, 2018
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 2, 2019
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 2, 2019
…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
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