Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -967,6 +967,10 @@ def trigger_reentry(self, context: Context, event: dict[str, Any]) -> Any:
def _clean(self, event: dict[str, Any], result: dict | None, context: Context) -> None:
if event["status"] == "running":
return

if self.pod is None:
return

istio_enabled = self.is_istio_enabled(self.pod)
# Skip await_pod_completion when the event is 'timeout' due to the pod can hang
# on the ErrImagePull or ContainerCreating step and it will never complete
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def serialize(self) -> tuple[str, dict[str, Any]]:

async def run(self) -> AsyncIterator[TriggerEvent]:
"""Get current pod status and yield a TriggerEvent."""
self.log.info("Checking pod %r in namespace %r.", self.pod_name, self.pod_namespace)
self.log.info(
"Checking pod %r in namespace %r with poll interval %r.",
self.pod_name,
self.pod_namespace,
self.poll_interval,
)
try:
state = await self._wait_for_pod_start()
if state == ContainerState.TERMINATED:
Expand Down Expand Up @@ -183,6 +188,11 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
)
return
except Exception as e:
self.log.exception(
"Unexpected error while waiting for pod %s in namespace %s",
self.pod_name,
self.pod_namespace,
)
yield TriggerEvent(
{
"name": self.pod_name,
Expand Down