bgeng777 opened a new pull request, #40775:
URL: https://github.com/apache/beam/pull/40775

   Fixes #40774.
   
   When the data-plane reader fails, it records the exception and marks the 
channel
   closed. The consumer checks the closed flag first and raises a generic
   "Channel closed prematurely." error, leaving the recorded reader failure out 
of
   the bundle error traceback.
   
   Chain the premature-close error from the recorded exception. This retains the
   existing error type, message and abort ordering. If no exception was 
recorded,
   the explicit `None` cause suppresses the unrelated queue timeout context.
   
   Add regression coverage for the saved failure, premature EOF without a saved
   failure, completed input followed by EOF, and input cancellation.
   
   Validation:
   - `python -m unittest -v apache_beam.runners.worker.data_plane_test`: all 9 
tests pass on the current master checkout; the two new diagnostic regressions 
fail before the fix.
   - The standalone reproducer from #40774 passes after the fix.
   - Ruff and YAPF checks pass using the versions declared by the Python SDK.
   
   AI assistance: OpenAI Codex assisted with the implementation and tests.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to