GKEStartJobOperator (deferrable=True) does not show container logs on failure #65647
-
|
Question: What I’m seeing:
My questions:
Why this matters: If this is expected, is there a recommended workaround to fetch container logs in deferrable mode? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
From the current provider source, your observation looks like a real deferrable-path difference. In the non-deferrable path, In the deferrable path, the trigger waits for the job and returns an event with So I would not treat this as user error. The practical workarounds are to run this operator with |
Beta Was this translation helpful? Give feedback.
From the current provider source, your observation looks like a real deferrable-path difference.
In the non-deferrable path,
KubernetesJobOperatorwaits for the job, fetches requested container logs whenget_logsis enabled, and only then checksis_job_failed().In the deferrable path, the trigger waits for the job and returns an event with
status = "error"when the job failed. Thenexecute_complete()immediately raises on that error status before it reaches the laterif self.get_logs:block that would fetch pod logs.So I would not treat this as user error. The practical workarounds are to run this operator with
deferrable=Falsewhen failure logs are important, or fetch the pod logs sepa…