You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Python data channel masks saved reader exception with Channel closed prematurely #40774
In Beam 2.75.0 (Python 3.12.7), a data-plane read failure is saved in self._exception, but input_elements checks self._closed first. The final bundle traceback therefore shows Channel closed prematurely and queue.Empty without the saved cause.
Reproducer
Save as repro.py and run python repro.py with apache-beam==2.75.0:
This retains the original exception and suppresses the unrelated queue timeout when no cause was recorded. See #40775 for the fix and regression tests.
Hi, I'd like to work on this. In _GrpcDataChannel.input_elements the self._closed check runs before self._exception is looked at, so I'd raise the "Channel closed prematurely" error from the saved exception and add a regression test in data_plane_test.py.
2. .take-issue
Hi, I'd like to work on this. In _GrpcDataChannel.input_elements the self._closed check runs before self._exception is looked at, so I'd raise the "Channel closed prematurely" error from the saved exception and add a regression test in data_plane_test.py.
Hi @schizophrenicmaniac , thanks for the quick reply but sorry for the overlap. I had already prepared the fix before seeing your comment and have now opened PR #40775. I’d really appreciate your review and feedback. Thanks!
Activity
schizophrenicmaniac commentedon Oct 25, 2026
.take-issue
Hi, I'd like to work on this. In _GrpcDataChannel.input_elements the self._closed check runs before self._exception is looked at, so I'd raise the "Channel closed prematurely" error from the saved exception and add a regression test in data_plane_test.py.
bgeng777 commentedon Oct 25, 2026
Hi @schizophrenicmaniac , thanks for the quick reply but sorry for the overlap. I had already prepared the fix before seeing your comment and have now opened PR #40775. I’d really appreciate your review and feedback. Thanks!