Ankitraj-builds opened a new pull request, #76328: URL: https://github.com/apache/airflow/pull/76328
closes: #76325 In deferrable mode, `KubernetesJobOperator.execute_complete` raised on `status == "error"` before the `get_logs` block, so the pod logs of a failed Job were never written. With `on_finish_action="delete_pod"` the pod is then deleted, so the cause of the failure was lost. This writes the pod logs first and raises afterwards. A failure while writing logs is logged as a warning, so it doesn't replace the Job's own error. Tests: - `test_execute_complete_fail_writes_logs`: logs are written for a failed Job, and the Job error is still raised. - `test_execute_complete_fail_log_error_keeps_job_error`: an error while writing logs doesn't hide the Job error. Both fail on main and pass with this change. All 95 tests in `test_job.py` pass. -- 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]
