You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "kaxil (via GitHub)" <gi...@apache.org> on 2023/02/01 11:53:53 UTC
[GitHub] [airflow] kaxil commented on a diff in pull request #29266: Add deferrable mode to GKEStartPodOperator
kaxil commented on code in PR #29266:
URL: https://github.com/apache/airflow/pull/29266#discussion_r1093120537
##########
airflow/providers/google/cloud/hooks/kubernetes_engine.py:
##########
@@ -25,29 +25,44 @@
"""
from __future__ import annotations
+import contextlib
import json
import time
import warnings
from typing import Sequence
+import google.auth.credentials
+from gcloud.aio.auth import Token
from google.api_core.exceptions import AlreadyExists, NotFound
from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault
from google.api_core.retry import Retry
+from google.auth.transport import requests as google_requests
# not sure why but mypy complains on missing `container_v1` but it is clearly there and is importable
from google.cloud import container_v1, exceptions # type: ignore[attr-defined]
from google.cloud.container_v1 import ClusterManagerClient
from google.cloud.container_v1.types import Cluster, Operation
+from kubernetes import client
+from kubernetes_asyncio import client as async_client
+from kubernetes_asyncio.client.models import V1Pod
+from kubernetes_asyncio.config.kube_config import FileOrData
+from urllib3.exceptions import HTTPError
from airflow import version
+from airflow.compat.functools import cached_property
from airflow.exceptions import AirflowException
+from airflow.kubernetes.pod_generator_deprecated import PodDefaults
from airflow.providers.google.common.consts import CLIENT_INFO
-from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook
+from airflow.providers.google.common.hooks.base_google import (
+ PROVIDE_PROJECT_ID,
+ GoogleBaseAsyncHook,
+ GoogleBaseHook,
+)
OPERATIONAL_POLL_INTERVAL = 15
-class GKEHook(GoogleBaseHook):
+class GKEClusterHook(GoogleBaseHook):
Review Comment:
Can you add backwards-compat if possible please? Users might be using this `Hook`
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org