Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKEPodHook needs to have all methods KPO calls #31266

Merged
merged 2 commits into from
May 15, 2023

Conversation

dstandish
Copy link
Contributor

From time to time methods are added to KubernetesHook for use with KPO and we neglect to add them to GKEPodHook, thus breaking GKEStartPodOperator. Here I add missing methods and a test to ensure that the two classes stay consistent in the ways necessary.

It might be nice to make a common interface such as KubernetesPodOperatorHookInterface which would define the necessary methods, but that is deferred for another day. For now we simply update GKEPodHook and at an easy test to verify consistency.

From time to time methods are added to KubernetesHook for use with KPO and we neglect to add them to GKEPodHook, thus breaking GKEStartPodOperator.  Here I add missing methods and a test to ensure that the two classes stay consistent in the ways necessary.

It might be nice to make a common interface such as KubernetesPodOperatorHookInterface which would define the necessary methods, but that is deferred for another day.  For now we simply update GKEPodHook and at an easy test to verify consistency.
@boring-cyborg boring-cyborg bot added provider:cncf-kubernetes Kubernetes provider related issues area:providers provider:google Google (including GCP) related issues labels May 12, 2023
@dstandish
Copy link
Contributor Author

@shahar1 you might be interested

@staticmethod
def get_xcom_sidecar_container_image():
"""Returns the xcom sidecar image that defined in the connection"""
return PodDefaults.SIDECAR_CONTAINER.image
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we don't need this because returning None gets you to the same place. (and we shouldn't be using pod_generator_deprecated anyway)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:providers provider:cncf-kubernetes Kubernetes provider related issues provider:google Google (including GCP) related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants