web-platform-tests / wpt

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

update-expectations using fallback #44862

Open gsnedders opened 6 months ago

gsnedders commented 6 months ago
local@locals-Virtual-Machine wpt % ls -lh metadata                                                                                    
total 8
-rw-r--r--  1 local  staff    38B Feb 29 08:29 update-properties.json
local@locals-Virtual-Machine wpt % ./wpt update-expectations --manifest MANIFEST.json --metadata metadata --product=safari report.json
/Users/local/wpt/_venv3/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 3.3.6'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
 0:00.14 WARNING Falling back to getting metadata update properties from wptrunner browser product file, this will be removed
Traceback (most recent call last):
  File "/Users/local/wpt/./wpt", line 10, in <module>
    wpt.main()
  File "/Users/local/wpt/tools/wpt/wpt.py", line 233, in main
    rv = script(*args, **kwargs)
  File "/Users/local/wpt/tools/wpt/update.py", line 44, in update_expectations
    update_properties = metadata.get_properties(properties_file=kwargs["properties_file"],
  File "/Users/local/wpt/tools/wptrunner/wptrunner/metadata.py", line 107, in get_properties
    properties, dependents = products.load_product_update(config, product)
  File "/Users/local/wpt/tools/wptrunner/wptrunner/products.py", line 54, in load_product_update
    module = product_module(config, product)
  File "/Users/local/wpt/tools/wptrunner/wptrunner/products.py", line 9, in product_module
    raise ValueError("Unknown product %s" % product)
ValueError: Unknown product <wptrunner.products.Product object at 0x103f57490>

Per the docs, https://web-platform-tests.org/tools/wptrunner/docs/expectation.html, we should be using metadata/update-properties.json as the metadata update properties?

gsnedders commented 6 months ago

Adding --properties-file metadata/update-properties.json made it work, so presumably it isn't using that path by default?

ADKaster commented 6 months ago

I made a patch for ladybird to fix this, as we don't have the metadata/update-properties.json file locked down yet. (or... even generated, or know how to generate it or ...)

https://github.com/SerenityOS/serenity/blob/3da6916383afc1c8a8b59dae38c4bc02680b50ba/Tests/LibWeb/WPT/0001-tools-Pass-product-name-to-update-metadata-fallback-.patch

Perhaps that should be added? or the fallback should be removed entirely.

gsnedders commented 6 months ago

@jgraham might have a stronger opinion here, but IMO we should fix what's broken. On the other hand, the fact that it has been broken for a while suggests that maybe we should just drop support.

I made a patch for ladybird to fix this, as we don't have the metadata/update-properties.json file locked down yet. (or... even generated, or know how to generate it or ...)

see https://web-platform-tests.org/tools/wptrunner/docs/expectation.html#property-configuration

gsnedders commented 6 months ago

The Python exception is actually a dupe of https://github.com/web-platform-tests/wpt/issues/42823, which @jgraham has a pending PR for (https://github.com/web-platform-tests/wpt/pull/42839).

Adding --properties-file metadata/update-properties.json made it work, so presumably it isn't using that path by default?

I suppose I should file a different bug for this.

jcscottiii commented 1 month ago

Is there any work remaining on this issue? Or should we close it?