The GitHub Actions job "Tests" on airflow.git has succeeded.
Run started by GitHub user ashb (triggered by ashb).

Head commit for run:
2ebc7fb3a2dfc75bf840c32714b121454ac8d2d9 / Ash Berlin-Taylor <[email protected]>
Fix flakey test in TaskSDK supervisor

Under "normal" operation the subprocess will not do anything (other than a few
imports) until it gets the StartupDetails message on stdin, but in our unit 
tests
when we replace the target function with a custom implementation it's possible
that the subprocess could exit (closing the stdin socket) before the parent
has written anything to it.

The fix is to make our test target follow the same behaviour of the real code
and read a line from stdin before doing anything else.

The error we say in tests was this:

```
 ________________ TestWatchedSubprocess.test_reading_from_pipes 
_________________
[gw2] linux -- Python 3.9.20 /usr/local/bin/python
task_sdk/tests/execution_time/test_supervisor.py:72: in test_reading_from_pipes
    proc = WatchedSubprocess.start(
task_sdk/src/airflow/sdk/execution_time/supervisor.py:354: in start
    feed_stdin.write(msg.model_dump_json().encode())
/usr/local/lib/python3.9/socket.py:734: in write
    return self._sock.send(b)
E   BrokenPipeError: [Errno 32] Broken pipe
```

Report URL: https://github.com/apache/airflow/actions/runs/11859056553

With regards,
GitHub Actions via GitBox


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to