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

wpt update-expectations shouldn't default to firefox (or any other product) #41184

Open
gsnedders opened this issue Jul 26, 2023 · 1 comment · May be fixed by #49839
Open

wpt update-expectations shouldn't default to firefox (or any other product) #41184

gsnedders opened this issue Jul 26, 2023 · 1 comment · May be fixed by #49839

Comments

@gsnedders
Copy link
Member

Me, a naïve user, trying to generate some expectations for a single browser:

% ./wpt update-expectations --metadata metadata --manifest MANIFEST.json wptreport.json 
/Volumes/gsnedders/projects/wpt/web-platform-tests/_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.01 WARNING Falling back to getting metadata update properties from wptrunner browser product file, this will be removed
Traceback (most recent call last):
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/./wpt", line 10, in <module>
    wpt.main()
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/wpt.py", line 233, in main
    rv = script(*args, **kwargs)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/update.py", line 44, in update_expectations
    update_properties = metadata.get_properties(properties_file=kwargs["properties_file"],
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wptrunner/wptrunner/metadata.py", line 107, in get_properties
    properties, dependents = products.load_product_update(config, product)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py", line 54, in load_product_update
    module = product_module(config, product)
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wptrunner/wptrunner/products.py", line 11, in product_module
    module = importlib.import_module("wptrunner.browsers." + product)
  File "/AppleInternal/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 850, in exec_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
  File "/Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/firefox.py", line 14, in <module>
    import mozleak
ModuleNotFoundError: No module named 'mozleak'

Even if we're falling back to metadata update properties, we shouldn't end up raising ModuleNotFoundError.

Seemingly we're ending up with firefox as the product from the CLI:

(Pdb) up
> /Volumes/gsnedders/projects/wpt/web-platform-tests/tools/wpt/update.py(44)update_expectations()
-> update_properties = metadata.get_properties(properties_file=kwargs["properties_file"],
(Pdb) list
 39  	    if not kwargs["manifest_path"]:
 40  	        kwargs["manifest_path"] = os.path.join(wpt_root, "MANIFEST.json")
 41  	
 42  	    kwargs = wptcommandline.check_args_metadata_update(kwargs)
 43  	
 44  ->	    update_properties = metadata.get_properties(properties_file=kwargs["properties_file"],
 45  	                                                extra_properties=kwargs["extra_property"],
 46  	                                                config=kwargs["config"],
 47  	                                                product=kwargs["product"])
 48  	
 49  	    manifest_update(kwargs["test_paths"])
(Pdb) pp kwargs['product']
'firefox'

Having a default product at all seems bad? If it's mandatory, then the command line argument should be required.

@thiagowfx
Copy link
Member

Possibly related: 64082e7

This is the commit that deprecated "product". cc @jgraham in case you have any idea how to fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants