ephraimbuddy commented on a change in pull request #15336:
URL: https://github.com/apache/airflow/pull/15336#discussion_r612165116
##########
File path: tests/executors/test_kubernetes_executor.py
##########
@@ -507,3 +506,113 @@ def test_process_status_catchall(self):
self._run()
self.watcher.watcher_queue.put.assert_not_called()
+
+ def test_container_status_of_terminating_fails_pod(self):
+ self.pod.status.phase = "Pending"
+ self.pod.status.container_statuses = [
+ k8s.V1ContainerStatus(
+ container_id=None,
+ image="apache/airflow:2.0.1-python3.8",
+ image_id="",
+ name="base",
+ ready="false",
+ restart_count=0,
+ state=k8s.V1ContainerState(
+ terminated=k8s.V1ContainerStateTerminated(
+ reason="Terminating", exit_code=1
Review comment:
Hi Jed, I've changed the code to only fail pod when there's image pill
error as I was not able to reproduce terminating status when pod is pending.
To reproduce this change, just change the `worker_container_tag` value to
`201-python` so you can reproduce Image pull error and scheduler stuck in
queued forever.
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]