Repository navigation
Revert "Changes for macOS: Use bash to run tests and fix clickhouse-test shell compatibility" - #102184
Conversation
…est shell compatibility"
|
Workflow [PR], commit [6fd86e6] AI ReviewSummaryThis PR reverts Missing context
Findings❌ Blockers
💡 Nits
ClickHouse Rules
Performance & Safety
Final Verdict
|
| print( | ||
| '\n'.join(f"{p[0]} {p[3]}" for p in pgrep(ppid=pid)), | ||
| subprocess.check_output( | ||
| f"pgrep --parent {pid} -a", shell=True, stderr=subprocess.STDOUT |
There was a problem hiding this comment.
subprocess.check_output("pgrep --parent ...") raises CalledProcessError when there are no child processes (exit code 1). In that normal case, cleanup_child_processes now throws instead of returning an empty list, which can interrupt shutdown handling and leave stale processes around.
Can we switch this to subprocess.run(..., capture_output=True, text=True) and treat return codes 0/1 as non-exceptional, parsing output only on 0?
| print( | ||
| '\n'.join(f"{p[0]} {p[3]}" for p in pgrep(pgid=pgid)), | ||
| subprocess.check_output( | ||
| f"pgrep --pgroup {pgid} -a", shell=True, stderr=subprocess.STDOUT |
There was a problem hiding this comment.
Same issue here: pgrep exits with code 1 when the process group is already empty, and check_output turns that into an exception. That means kill_process_group can fail before cleanup logic runs.
Please handle pgrep via subprocess.run (or catch CalledProcessError specifically for return code 1) so an empty group is treated as expected state.
|
Should be reverted until I investigate the failure |
Reverts #99283
Version info
26.4.1.699