dstandish commented on code in PR #25055:
URL: https://github.com/apache/airflow/pull/25055#discussion_r923580233
##########
airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -354,8 +354,19 @@ def read_pod(self, pod: V1Pod) -> V1Pod:
except BaseHTTPError as e:
raise AirflowException(f'There was an error reading the kubernetes
API: {e}')
+ def await_xcom_sidecar_container_start(self, pod: V1Pod) -> None:
+ while True:
+ self.log.info("Checking if xcom sidecar container is started.")
+ if self.container_is_running(pod,
PodDefaults.SIDECAR_CONTAINER_NAME):
+ self.log.warning("The xcom sidecar container is started.")
Review Comment:
```suggestion
```
i don't think we need to log anything here. if anything it should be info.
##########
airflow/providers/cncf/kubernetes/utils/pod_manager.py:
##########
@@ -354,8 +354,19 @@ def read_pod(self, pod: V1Pod) -> V1Pod:
except BaseHTTPError as e:
raise AirflowException(f'There was an error reading the kubernetes
API: {e}')
+ def await_xcom_sidecar_container_start(self, pod: V1Pod) -> None:
+ while True:
+ self.log.info("Checking if xcom sidecar container is started.")
+ if self.container_is_running(pod,
PodDefaults.SIDECAR_CONTAINER_NAME):
+ self.log.warning("The xcom sidecar container is started.")
+ break
+ self.log.warning("The xcom sidecar container is not yet started.")
Review Comment:
thinking maybe this we should only log _once_ -- the first time it has to
wait, and not every loop. wdyt?
--
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]