You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "moiseenkov (via GitHub)" <gi...@apache.org> on 2024/03/22 08:12:04 UTC
[PR] Refactor GKE hooks [airflow]
moiseenkov opened a new pull request, #38399:
URL: https://github.com/apache/airflow/pull/38399
In order to reduce code duplication and high complexity of the implementation, GKE hooks were refactored in this PR:
1. Existing `GKEHook` and `GKEAsyncHook` provide interface to GKE API remain unchanged.
2. The new `GKEKubernetesHook(GoogleBaseHook, KubernetesHook)` was introduced as a replacement for redundant hooks that used to contain duplicated methods that now are simply inherited from `GoogleBaseHook` and `KubernetesHook`:
- GKEDeploymentHook (deprecated)
- GKECustomResourceHook (deprecated)
- GKEPodHook (deprecated)
- GKEJobHook (deprecated)
3. By following the same pattern, the new `GKEKubernetesAsyncHook(GoogleBaseAsyncHook, AsyncKubernetesHook)` was introduced as a replacement for redundant hooks that used to contain duplicated methods that now are simply inherited from `GoogleBaseAsyncHook` and `AsyncKubernetesHook`:
- GKEPodAsyncHook (deprecated)
4. New hooks (GKEKubernetesHook, GKEKubernetesAsyncHook) provide access to the standard Kubernetes API with a GKE authentication.
5. Slightly adjusted system tests (they are all green now).

6. Except tiny changes, unit tests remain the same in order to prove stability of the code after refactoring. In the following PR we will disconnect GKE operators from the deprecated hooks, so it will be easy to remove them in the future.
--
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
Re: [PR] Refactor GKE hooks [airflow]
Posted by "moiseenkov (via GitHub)" <gi...@apache.org>.
moiseenkov closed pull request #38399: Refactor GKE hooks
URL: https://github.com/apache/airflow/pull/38399
--
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