pytest-dev / pytest-dev/execnet
Improve handling of execnet.gateway_bootstrap.HostNotFound
Đang mở
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Python
- Star
- 102
- Fork
- 47
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
If a node is down the output is rather verbose:
gw0 Issh_exchange_identification: Connection closed by remote host
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "…/Vcs/execnet/execnet/gateway_bootstrap.py", line 45, in bootstrap_exec
INTERNALERROR> s = io.read(1)
INTERNALERROR> File "…/Vcs/execnet/execnet/gateway_base.py", line 389, in read
INTERNALERROR> "expected %d bytes, got %d" % (numbytes, len(buf)))
INTERNALERROR> EOFError: expected 1 bytes, got 0
INTERNALERROR>
INTERNALERROR> During handling of the above exception, another exception occurred:
INTERNALERROR>
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/_pytest/main.py", line 176, in wrap_session
INTERNALERROR> config.hook.pytest_sessionstart(session=session)
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/hooks.py", line 258, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/manager.py", line 67, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/manager.py", line 61, in <lambda>
INTERNALERROR> firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/xdist/dsession.py", line 81, in pytest_sessionstart
INTERNALERROR> nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/xdist/workermanage.py", line 67, in setup_nodes
INTERNALERROR> nodes.append(self.setup_node(spec, putevent))
INTERNALERROR> File "…/project/.venv/lib/python3.6/site-packages/xdist/workermanage.py", line 71, in setup_node
INTERNALERROR> gw = self.group.makegateway(spec)
INTERNALERROR> File "…/Vcs/execnet/execnet/multi.py", line 128, in makegateway
INTERNALERROR> gw = gateway_bootstrap.bootstrap(io, spec)
INTERNALERROR> File "…/Vcs/execnet/execnet/gateway_bootstrap.py", line 98, in bootstrap
INTERNALERROR> bootstrap_exec(io, spec)
INTERNALERROR> File "…/Vcs/execnet/execnet/gateway_bootstrap.py", line 50, in bootstrap_exec
INTERNALERROR> raise HostNotFound(io.remoteaddress)
INTERNALERROR> execnet.gateway_bootstrap.HostNotFound: xdistnode1
I think this should be caught and turned into a proper error message.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách đọc execnet/gateway_bootstrap.py, đặc biệt là bootstrap_exec và bootstrap, sử dụng đường dẫn HostNotFound được báo cáo làm điểm bắt đầu. Tái hiện lỗi với một node đang ngừng hoạt động và xác nhận rằng kết quả là một thông báo lỗi ngắn gọn, phù hợp thay vì traceback INTERNALERROR dài dòng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- distributed-systems
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100