br413 commented on PR #70161: URL: https://github.com/apache/airflow/pull/70161#issuecomment-5043140300
Thanks for the review, @eladkal — fair question. The first version removed \os.fork()\ by calling lifecycle handlers inline, which dropped the process isolation the fork path provided. I've updated the approach to match what we already do for DAG-run listeners and manual state-change emissions: 1. **Metadata extraction stays in the parent process** (where ORM / task objects are available). 2. **Adapter emission runs via \submit_callable\ → \ProcessPoolExecutor\ with \orkserver\ context**, using a new picklable module-level \_emit_task_instance_event()\ (same pattern as \_emit_manual_state_change_event\ / \_run_adapter_method\). This removes the Python 3.12 \DeprecationWarning\ without running OL transport code synchronously in the multi-threaded worker/scheduler process. Rebased onto latest \main\ and pushed. Happy to address any further feedback. -- 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]
