File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
providers/cncf/kubernetes
src/airflow/providers/cncf/kubernetes/utils
tests/unit/cncf/kubernetes/utils Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change 19
19
from __future__ import annotations
20
20
21
21
import enum
22
- import itertools
23
22
import json
24
23
import math
25
24
import time
@@ -119,9 +118,12 @@ def get_xcom_sidecar_container_resources(self) -> str | None:
119
118
def get_container_status (pod : V1Pod , container_name : str ) -> V1ContainerStatus | None :
120
119
"""Retrieve container status."""
121
120
if pod and pod .status :
122
- container_statuses = itertools .chain (
123
- pod .status .container_statuses , pod .status .init_container_statuses
124
- )
121
+ container_statuses = []
122
+ if pod .status .container_statuses :
123
+ container_statuses .extend (pod .status .container_statuses )
124
+ if pod .status .init_container_statuses :
125
+ container_statuses .extend (pod .status .init_container_statuses )
126
+
125
127
else :
126
128
container_statuses = None
127
129
Original file line number Diff line number Diff line change 38
38
container_is_running ,
39
39
container_is_succeeded ,
40
40
container_is_terminated ,
41
- get_container_status ,
42
41
)
43
42
from airflow .utils .timezone import utc
44
43
You can’t perform that action at this time.
0 commit comments