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

Test neuro-cli/tests/e2e/test_e2e_images.py::test_docker_helper always failed #2759

Open
serhiy-storchaka opened this issue Jun 29, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@serhiy-storchaka
Copy link
Contributor

It is skipped on Windows and always failed on Ubuntu due to timeout.

For example (https://github.com/neuro-inc/neuro-cli/runs/7107326614?check_suite_focus=true#step:7:412):

______________________________________________________________________ test_docker_helper ______________________________________________________________________
[gw1] linux -- Python 3.10.5 /opt/hostedtoolcache/Python/3.10.5/x64/bin/python
helper = <tests.e2e.conftest.Helper object at 0x7f385c7b12d0>
image = 'e2e-cli-5b271118-6c0b-4b93-9804-22d7dc7d574c-date202206290736-date:c2a05704-a730-49f2-a772-e4ca08450395', tag = 'c2a05704-a730-49f2-a772-e4ca08450395'
nmrc_path = PosixPath('/tmp/pytest-of-runner/pytest-0/popen-gw1/config0/conftest.nmrc')
monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f385c85cc40>
@pytest.mark.e2e
deftest_docker_helper(
        helper: Helper, image: str, tag: str, nmrc_path: Path, monkeypatch: Any
    ) -> None:
        monkeypatch.setenv(CONFIG_ENV_NAME, str(nmrc_path or DEFAULT_CONFIG_PATH))
        helper.run_cli(["config", "docker"])
        registry = helper.registry_url.host
        username = helper.username
        full_tag = f"{registry}/{username}/{image}"
        tag_cmd = f"docker tag {image}{full_tag}"
        result = subprocess.run(tag_cmd, capture_output=True, shell=True)
assert (
not result.returncode
        ), f"Command {tag_cmd} failed: {result.stdout!r}{result.stderr!r}"
        push_cmd = f"docker push {full_tag}"
        result = subprocess.run(push_cmd, capture_output=True, shell=True)
assert (
not result.returncode
        ), f"Command {push_cmd} failed: {result.stdout!r}{result.stderr!r}"
# Run image and check output
        image_url = f"image://{helper.cluster_name}/{username}/{image}"
        job_id = helper.run_job_and_wait_state(
            image_url, "", wait_state=JobStatus.SUCCEEDED, stop_state=JobStatus.FAILED
        )
>       helper.check_job_output(job_id, re.escape(tag))
neuro-cli/tests/e2e/test_e2e_images.py:272: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
neuro-cli/tests/e2e/conftest.py:106: in wrapper
return asyncio.run(_run_async(coro, *args, **kwargs))
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/asyncio/runners.py:44: in run
return loop.run_until_complete(main)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/asyncio/base_events.py:646: in run_until_complete
return future.result()
neuro-cli/tests/e2e/conftest.py:96: in _run_async
returnawait coro(*args, **kwargs)
neuro-sdk/src/neuro_sdk/_jobs.py:548: in monitor
asyncwithself._core.ws_connect(
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/contextlib.py:199: in __aenter__
returnawait anext(self.gen)
neuro-sdk/src/neuro_sdk/_core.py:197: in ws_connect
asyncwithself._session.ws_connect(
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aiohttp/client.py:1138: in __aenter__
self._resp = awaitself._coro
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aiohttp/client.py:776: in _ws_connect
    resp = awaitself.request(
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aiohttp/client.py:559: in _request
await resp.start(conn)
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aiohttp/client_reqrep.py:898: in start
    message, payload = await protocol.read()  # type: ignore[union-attr]
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = <aiohttp.client_proto.ResponseHandler object at 0x7f385c941ae0>
asyncdefread(self) -> _T:
ifnotself._buffer andnotself._eof:
assertnotself._waiter
self._waiter = self._loop.create_future()
try:
>               awaitself._waiter
E               aiohttp.client_exceptions.ServerTimeoutError: Timeout on reading data from socket
/opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/aiohttp/streams.py:616: ServerTimeoutError
---------------------------------------------------------------------- Captured log call -----------------------------------------------------------------------
INFO     tests.e2e.conftest:conftest.py:462 Run 'neuro config docker'
@serhiy-storchaka serhiy-storchaka added the bug Something isn't working label Jun 29, 2022
@serhiy-storchaka serhiy-storchaka changed the title Test neuro-cli\tests\e2e\test_e2e_images.py::test_docker_helper always failed Test neuro-cli/tests/e2e/test_e2e_images.py::test_docker_helper always failed Jul 5, 2022
@serhiy-storchaka serhiy-storchaka self-assigned this Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant