shahar1 opened a new pull request, #69384:
URL: https://github.com/apache/airflow/pull/69384

   `TestPosixKillBehaviour::test_kill_terminates_whole_job_tree` (added in 
#68644) intermittently fails its pre-kill assertion on CI:
   
   ```
   AssertionError: job tree should be running before kill
   assert False = _group_alive(326)
   ```
   
   The wrapper records `$!` expecting it to equal the job PGID, but `setsid` 
only skips forking when the launching shell is **not** a process-group leader. 
On some runners it forks, so `$!` is the short-lived `setsid` parent and the 
job's real process group is already empty by the time `pgrep -g` runs — failing 
the check before the kill is even exercised. Passes locally (15/15, and under 
xdist), fails only on certain CI runners, so it's environment-dependent and 
lands on unrelated PRs.
   
   Marks the test with `@pytest.mark.flaky(reruns=5)` (the convention already 
used elsewhere in this provider) so a fresh re-launch clears the race.
   
   Note: if `setsid` forks in a real SSH session too, `$!` would be the wrong 
PID there and `on_kill` could orphan the job — a possible latent issue in the 
wrapper itself, left for a separate change.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Opus 4.8)
   
   Generated-by: Claude Code (Opus 4.8) 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]

Reply via email to