uranusjr commented on code in PR #65958:
URL: https://github.com/apache/airflow/pull/65958#discussion_r3309479370
##########
task-sdk/src/airflow/sdk/execution_time/supervisor.py:
##########
@@ -2370,27 +2425,26 @@ def supervise_task(
reset_secrets_masker()
try:
- process = ActivitySubprocess.start(
- dag_rel_path=dag_rel_path,
+ coordinator = get_coordinator_manager().for_queue(ti.queue)
+ result = coordinator.execute_task(
what=ti,
+ dag_rel_path=dag_rel_path,
+ bundle_info=bundle_info,
client=client,
logger=logger,
- bundle_info=bundle_info,
- subprocess_logs_to_stdout=subprocess_logs_to_stdout,
sentry_integration=sentry_integration,
+ subprocess_logs_to_stdout=subprocess_logs_to_stdout,
)
-
- exit_code = process.wait()
end = time.monotonic()
log.info(
"Workload finished",
workload_type="ExecuteTask",
workload_id=str(ti.id),
- exit_code=exit_code,
+ exit_code=result.exit_code,
duration=end - start,
- final_state=process.final_state,
+ final_state=result.final_state,
)
- return exit_code
+ return result.exit_code
Review Comment:
Added a log message. I think I’m going to keep the exception; it should not
be common, and the exception is already handled in all executor implementations.
--
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]