Skip to content

Commit

Permalink
Add missing informative logs in KPO trigger until container has not f…
Browse files Browse the repository at this point in the history
…inished (apache#37546)

* Add informative logs in KPO trigger until container has not finished
  • Loading branch information
pankajkoti authored Apr 24, 2024
1 parent 3183ba8 commit 84f1ae2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions airflow/providers/cncf/kubernetes/triggers/pod.py
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ async def _wait_for_container_completion(self) -> TriggerEvent:
"last_log_time": self.last_log_time,
}
)
self.log.debug("Container is not completed and still working.")
if time_get_more_logs and datetime.datetime.now(tz=datetime.timezone.utc) > time_get_more_logs:
return TriggerEvent(
{
Expand All @@ -271,6 +272,7 @@ async def _wait_for_container_completion(self) -> TriggerEvent:
"name": self.pod_name,
}
)
self.log.debug("Sleeping for %s seconds.", self.poll_interval)
await asyncio.sleep(self.poll_interval)

def _get_async_hook(self) -> AsyncKubernetesHook:
Expand Down

0 comments on commit 84f1ae2

Please sign in to comment.