sjyangkevin commented on code in PR #67449:
URL: https://github.com/apache/airflow/pull/67449#discussion_r3370041266
##########
providers/cncf/kubernetes/src/airflow/providers/cncf/kubernetes/executors/kubernetes_executor_utils.py:
##########
@@ -45,13 +46,18 @@
create_unique_id,
)
from airflow.providers.cncf.kubernetes.pod_generator import PodGenerator,
workload_to_command_args
+from airflow.providers.cncf.kubernetes.version_compat import AIRFLOW_V_3_3_PLUS
from airflow.providers.common.compat.sdk import AirflowException, Stats
from airflow.utils.log.logging_mixin import LoggingMixin
from airflow.utils.state import TaskInstanceState
if TYPE_CHECKING:
from kubernetes.client import Configuration, models as k8s
+ from airflow.executors.workloads import ExecuteCallback
+ from airflow.models.callback import CallbackKey
Review Comment:
The two imports here are under `TYPE_CHECKING` with is not guard by the
`AIRFLOW_V_3_3_PLUS`. These are used for type hint in the following funciton.
```python
def _run_next_callback(
self, key: CallbackKey, workload: ExecuteCallback, pod_template_file:
str | None
) -> None:
```
--
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]