Skip to content

Commit

Permalink
add condition for await_container_completion to fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hussein-awala committed Aug 4, 2023
1 parent ca12377 commit 4311205
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion airflow/providers/cncf/kubernetes/operators/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,12 @@ def execute_sync(self, context: Context):
container_logs=self.container_logs,
follow_logs=True,
)
self.pod_manager.await_container_completion(pod=self.pod, container_name=self.base_container_name)
if not self.get_logs or (
self.container_logs is not True and self.base_container_name not in self.container_logs
):
self.pod_manager.await_container_completion(
pod=self.pod, container_name=self.base_container_name
)

if self.do_xcom_push:
self.pod_manager.await_xcom_sidecar_container_start(pod=self.pod)
Expand Down

0 comments on commit 4311205

Please sign in to comment.