potiuk opened a new pull request, #66247: URL: https://github.com/apache/airflow/pull/66247
## Summary The `test_fetch_and_run_job_possible_deadlock` regression test added in #66144 was passing under the PR build (Python 3.10) but fails on the scheduled Python 3.14 run — see https://github.com/apache/airflow/actions/runs/25230313598. Python 3.14 flipped the POSIX default `multiprocessing` start method from `fork` to `forkserver`. The test mocked `airflow.sdk.execution_time.supervisor.supervise` expecting the patch to be inherited by the worker subprocess; with `forkserver` the child is spawned from a fresh interpreter and the patch does not apply, so the real `supervise()` runs, makes API retries, and the test times out at 10 s instead of exercising the queue-deadlock path. Make the test independent of the start method by patching `EdgeWorker._launch_job` to return a (Process, Queue) pair built from an explicit `fork` context, with a tiny top-level target that pushes a >64 KB pickled exception onto the queue. That reproduces the actual production deadlock — `Queue` feeder thread blocked on the 64 KB OS pipe buffer while `Process.is_alive()` still reports True — without relying on test-side patches surviving the spawn. No production code change; only `providers/edge3/tests/unit/edge3/cli/test_worker.py`. ## Test plan - [x] Run `test_fetch_and_run_job_possible_deadlock` on Python 3.14 — passes. - [x] Run on Python 3.10 — passes. - [x] Confirm regression detection: temporarily revert the `worker.py` fix (`while job.is_running and results_queue.empty():` → `while job.is_running:`) and re-run; test fails with the expected DEADLOCK timeout. - [x] Run the full `providers/edge3/tests/unit/edge3/cli/test_worker.py` suite on Python 3.14 — 42 passed. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Code (Opus 4.7) Generated-by: Claude Code (Opus 4.7) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- 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]
