web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
4.94k stars 3.08k forks source link

Simplifying wptserver configuration #17942

Open jugglinmike opened 5 years ago

jugglinmike commented 5 years ago

Currently, to configure an alternate host for the WPT server, you specify the alternate_host property with an object value which contains an alt property whose value is the desired host. For instance:

{
  "browser_host": "web-platform-tests.live",
  "alternate_host": {
    "alt": "not-web-platform-tests.live"
  }
}

I've only ever seen the alt property referenced, so I'm wondering if the containing object is maybe a vestige of some removed feature and if it can be simplified to a string value:

{
  "browser_host": "web-platform-tests.live",
  "alternate_host": "not-web-platform-tests.live"
}

This extra bit of configuration doesn't matter much, and since there's no non-trivial cost to refactoring, I would normally leave it alone. However, it looks like there's some tension between the name of the property and its use in the tests (and in the specifications). So an additional alteration would be to change the property value:

{
  "browser_host": "web-platform-tests.live",
  "notsamesite_host": "not-web-platform-tests.live"
}

A change that simplified the configuration and made the infrastructure more cohesive might justify the cost of refactoring. Provided of course, it wouldn't break anything.

@jgraham Do you know why alternate_host is currently specified as an object?

gsnedders commented 5 years ago

There was some intention to add further hosts (e.g., for cookies) under yet more eTLDs, though I think in the end it wasn't clear if they were immediately needed.

Keeping it as an object allows for extensibility if/when we do add further hosts, though, which does seem a likely outcome.