wpt icon indicating copy to clipboard operation
wpt copied to clipboard

Taskcluster frequently failing trying to fetch Firefox profile

Open gsnedders opened this issue 6 months ago • 4 comments

See the master branch https://github.com/web-platform-tests/wpt/runs/42387737071 or the tools/ integration tests https://github.com/web-platform-tests/wpt/pull/52455/checks?check_run_id=42357970828, both of which failed with:

Traceback (most recent call last):
  File "/home/test/web-platform-tests/./wpt", line 10, in <module>
    wpt.main()
  File "/home/test/web-platform-tests/tools/wpt/wpt.py", line 233, in main
    rv = script(*args, **kwargs)
  File "/home/test/web-platform-tests/tools/wpt/run.py", line 1007, in run
    setup_cls, wptrunner_kwargs = setup_wptrunner(venv, **kwargs)
  File "/home/test/web-platform-tests/tools/wpt/run.py", line 979, in setup_wptrunner
    setup_cls.setup(kwargs)
  File "/home/test/web-platform-tests/tools/wpt/run.py", line 246, in setup
    self.setup_kwargs(kwargs)
  File "/home/test/web-platform-tests/tools/wpt/run.py", line 318, in setup_kwargs
    prefs_root = self.browser.install_prefs(kwargs["binary"],
  File "/home/test/web-platform-tests/tools/wpt/browser.py", line 528, in install_prefs
    self.get_profile_github(version, channel, dest, rev)
  File "/home/test/web-platform-tests/tools/wpt/browser.py", line 484, in get_profile_github
    file_data[rel_path] = get_file_github("mozilla-firefox/firefox",
  File "/home/test/web-platform-tests/tools/wpt/browser.py", line 87, in get_file_github
    data: bytes = get(f"https://raw.githubusercontent.com/{repo}/{ref}/{path}").content  # type: ignore
  File "/home/test/web-platform-tests/tools/wpt/utils.py", line 109, in get
    resp.raise_for_status()
  File "/home/test/web-platform-tests/_venv3/lib/python3.10/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://raw.githubusercontent.com/mozilla-firefox/firefox/main/testing/profiles/base/user.js

gsnedders avatar May 16 '25 21:05 gsnedders

We don't seem to do any rate-limited when fetching files from GitHub, which is quite possibly the problem.

gsnedders avatar May 16 '25 21:05 gsnedders

This is causing wpt-firefox-nightly-* to fail regularly:

  • https://github.com/web-platform-tests/wpt/pull/52650/checks?check_run_id=42512158059
  • https://github.com/web-platform-tests/wpt/pull/52648/checks?check_run_id=42508394709
  • https://github.com/web-platform-tests/wpt/runs/42389395235

@jgraham Would it be possible to vendor copies of profiles.json and user.js for WPT CI? Just guessing from the contents, but it doesn't look like they will change very frequently.

jonathan-j-lee avatar May 20 '25 01:05 jonathan-j-lee

(Regression from https://github.com/web-platform-tests/wpt/commit/1af206eb5e753093f218749dc92e7c9d35473e2d / https://github.com/web-platform-tests/wpt/pull/52391.)

gsnedders avatar May 20 '25 18:05 gsnedders

https://github.com/web-platform-tests/wpt/pulls?q=is%3Apr++status%3Afailure+created%3A2025-05-13..2025-05-20 shows a lot of CI failures of the past week.

gsnedders avatar May 20 '25 18:05 gsnedders

Ping. Any update on this? It is showing up on https://ecosystem-infra-rotation.appspot.com/.

jrobbins avatar Jun 23 '25 20:06 jrobbins

Probably the easiest fix here is to provide a token when trying to do the fetch; the regression is a result of Gecko moving to GitHub (which doesn't support the workflow here as well as Mercurial did), and GitHub simultaneously clamping down on the unauthenticated rate limit.

jgraham avatar Jun 24 '25 09:06 jgraham

@jgraham said he couldn't get this working via git-clone without it taking far too long.

For me, at least, this works:

git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/mozilla-firefox/firefox
git -C firefox sparse-checkout set --cone testing/profiles
git -C firefox checkout

Gives:

gsnedders@gsnedders-margot tmp.ANYOFvrdI4 % time ./foo.sh 
+ git clone --no-checkout --depth=1 --filter=tree:0 https://github.com/mozilla-firefox/firefox
Cloning into 'firefox'...
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (1/1), done.
+ git -C firefox sparse-checkout set --cone testing/profiles
+ git -C firefox checkout
remote: Enumerating objects: 34878, done.
remote: Counting objects: 100% (34878/34878), done.
remote: Compressing objects: 100% (22450/22450), done.
remote: Total 34878 (delta 642), reused 27049 (delta 408), pack-reused 0 (from 0)
Receiving objects: 100% (34878/34878), 12.58 MiB | 4.84 MiB/s, done.
Resolving deltas: 100% (642/642), done.
remote: Enumerating objects: 97, done.
remote: Counting objects: 100% (97/97), done.
remote: Compressing objects: 100% (95/95), done.
remote: Total 97 (delta 7), reused 23 (delta 1), pack-reused 0 (from 0)
Receiving objects: 100% (97/97), 437.17 KiB | 3.67 MiB/s, done.
Resolving deltas: 100% (7/7), done.
Your branch is up to date with 'origin/main'.
./foo.sh  0.82s user 0.67s system 25% cpu 5.807 total

gsnedders avatar Jul 01 '25 15:07 gsnedders

Ping. Any additional update on this? It is showing up on https://ecosystem-infra-rotation.appspot.com/ again.

jrobbins avatar Jul 22 '25 21:07 jrobbins

Ping. This is showing up on https://ecosystem-infra-rotation.appspot.com/ as an urgent bug that is old.

jrobbins avatar Sep 18 '25 21:09 jrobbins

I haven't seen any blocked PRs recently, so I think it's safe to backlog this.

jonathan-j-lee avatar Sep 18 '25 22:09 jonathan-j-lee