jscheffl commented on code in PR #50192:
URL: https://github.com/apache/airflow/pull/50192#discussion_r2122010885
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/operators/pod.py:
##########
@@ -579,16 +580,24 @@ def get_or_create_pod(self, pod_request_obj: k8s.V1Pod,
context: Context) -> k8s
def await_pod_start(self, pod: k8s.V1Pod) -> None:
try:
- self.pod_manager.await_pod_start(
- pod=pod,
- schedule_timeout=self.schedule_timeout_seconds,
- startup_timeout=self.startup_timeout_seconds,
- check_interval=self.startup_check_interval_seconds,
+ loop = asyncio.get_event_loop()
+ events_task = asyncio.ensure_future(
+ self.pod_manager.watch_pod_events(pod,
self.startup_check_interval_seconds)
)
+ loop.run_until_complete(
+ self.pod_manager.await_pod_start(
+ pod=pod,
+ schedule_timeout=self.schedule_timeout_seconds,
+ startup_timeout=self.startup_timeout_seconds,
+ check_interval=self.startup_check_interval_seconds,
+ )
+ )
+ loop.run_until_complete(events_task)
+ loop.close()
except PodLaunchFailedException:
if self.log_events_on_failure:
self._read_pod_events(pod, reraise=False)
- raise
+ raise
Review Comment:
I assume you did not really want to un-indent? Because this makes all tests
fail.
```suggestion
raise
```
--
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]