Skip to content

tests: xfail the GitHub tests on GitHub server errors - #601

Open
ap-- wants to merge 1 commit into
fsspec:mainfrom
ap--:tests-github-server-errors
Open

ap-- wants to merge 1 commit into
fsspec:mainfrom
ap--:tests-github-server-errors

Conversation

@ap--

@ap-- ap-- commented Nov 23, 2026

Copy link
Copy Markdown
Collaborator

The tests-minversion job on main failed (job), because raw.githubusercontent.com was overloaded:

FAILED upath/tests/implementations/test_github.py::TestUPathGitHubPath::test_copy_into__dir_to_str_tempdir[str]
  - requests.exceptions.HTTPError: 503 Server Error: Backend.max_conn reached for url: https://raw.githubusercontent.com/...

The GitHub tests are meant to xfail when GitHub isn't usable, but the wrapper only recognized rate limits and missing network access. Now it also xfails on 5xx responses from GitHub, from requests (503 Server Error: ..., older fsspec) and from aiohttp (503, message=..., newer fsspec reads raw files through the HTTP filesystem).

The rate limit check is now case-insensitive too: requests reports a 429 as 429 Client Error: Too Many Requests for url, which the lowercase "too many requests for url" never matched.

Checked the wrapper with real exception objects. A requests 503, an aiohttp 503 and a requests 429 from GitHub xfail. A GitHub 404, a 503 from another host, and a plain assertion error still fail. test_github.py passes against the live API.

raw.githubusercontent.com sometimes answers with '503 Server Error:
Backend.max_conn reached', which failed the tests-minversion job on
main. xfail on 5xx responses from GitHub, from requests and from
aiohttp. Also match the rate limit messages case-insensitively:
requests reports a 429 as 'Too Many Requests', which the lowercase
pattern never matched.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant