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

Issue running tests_http in a ipv6 host #927

Closed
eamanu opened this issue Mar 23, 2022 · 4 comments · Fixed by #1088
Closed

Issue running tests_http in a ipv6 host #927

eamanu opened this issue Mar 23, 2022 · 4 comments · Fixed by #1088

Comments

@eamanu
Copy link
Contributor

eamanu commented Mar 23, 2022

Hi,

During the build of fsspec package for Debian, some tests (http) fail in a host without
routable v4:

server = 'http://localhost:9898'

    def test_list(server):
        h = fsspec.filesystem("http")
        out = h.glob(server + "/index/*")
>       assert out == [server + "/index/realfile"]
E       AssertionError: assert [] == ['http://loca...dex/realfile']
E         Right contains one more item: 'http://localhost:9898/index/realfile'
E         Use -v to get the full diff

fsspec/implementations/tests/test_http.py:164: AssertionError
----------------------------- Captured stderr call -----------------------------
2022-03-12 13:16:10,147 - fsspec.http - DEBUG - _ls_real -- http://localhost:9898/index/
2022-03-12 13:16:10,151 - fsspec.http - DEBUG - _exists -- http://localhost:9898/index/
------------------------------ Captured log call -------------------------------
DEBUG    fsspec.http:http.py:147 http://localhost:9898/index/
DEBUG    fsspec.http:http.py:301 http://localhost:9898/index/

More detail in [0].

[0] https://buildd.debian.org/status/fetch.php?pkg=fsspec&arch=all&ver=2022.02.0-1&stamp=1647091024&raw=0

@martindurant
Copy link
Member

Thanks for posting. Is there any way to run an HTTP server in such a situation? Is there a way to detect that this is the case and skip the tests?

@eamanu
Copy link
Contributor Author

eamanu commented Apr 11, 2022

HI @martindurant, sorry for the delay. I can try to patch the tests to detect ipv6 config, and then try to run the test server with that configuration. That's you mean?

@eamanu
Copy link
Contributor Author

eamanu commented Sep 6, 2022

@martindurant
Copy link
Member

Would you like to put that patch into a PR here? I'd be happy to accept it. I wonder (slightly) if there might be any cases where that address doesn't work.

eamanu added a commit to eamanu/filesystem_spec that referenced this issue Oct 28, 2022
This patch remove the use of localhost in the test server to avoid
issues with host configured only with ipv6.

Fix: fsspec#927
martindurant pushed a commit that referenced this issue Oct 28, 2022
This patch remove the use of localhost in the test server to avoid
issues with host configured only with ipv6.

Fix: #927
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 a pull request may close this issue.

2 participants