dstandish commented on code in PR #41868:
URL: https://github.com/apache/airflow/pull/41868#discussion_r1742799613


##########
airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -787,9 +774,27 @@ def trigger_reentry(self, context: Context, event: 
dict[str, Any]) -> Any:
                     if pod_log_status.running:
                         self.log.info("Container still running; deferring 
again.")
                         self.invoke_defer_method(pod_log_status.last_log_time)
+                    else:
+                        event = event.copy()

Review Comment:
   e.g. something like 
   ```
   succeeded = False
   if event == running blah:
       ... other logic
       if pod_log_status.running:
           self.log.info("Container still running; deferring again.")
           self.invoke_defer_method(pod_log_status.last_log_time)
       else:
           pod = self.read_pod(...)
           succeeded = container_is_succeeded(...)  # <-- bam now you know to 
do failure logic even though event is success
   
   ```



-- 
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]

Reply via email to