Repository navigation
Fix GKE operator imports with older Kubernetes providers - #74505
Merged
potiuk merged 3 commits intoOct 9, 2026
Merged
Conversation
Older Kubernetes provider versions lack the Pod exec operator. That optional feature must not prevent users from importing or creating existing GKE operators.
The compatibility placeholder cannot be used independently and therefore has no system example.
Keep the original ImportError as the cause of the missing-provider error, import AirflowOptionalProviderFeatureException at module top, and split the fallback test so each behaviour is asserted separately. Generated-by: Claude Opus 5
potiuk
approved these changes
Oct 9, 2026
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With
apache-airflow-providers-cncf-kubernetesolder than 10.22.0, importing the GKE operator module fails becauseKubernetesPodExecOperatoris unavailable. This also prevents users from using existing GKE operators.Mirror the fallback-class approach from #72542: keep the module importable and raise
AirflowOptionalProviderFeatureExceptionwith the required provider version only when constructingGKEPodExecOperator. The regression verifies that existing cluster and Pod operators can still be constructed when the optional import is unavailable. Exclude the compatibility placeholder from the standalone-operator example coverage check, as in EKS.Follow-up to #72577 and the provider RC testing feedback.
Validation:
GKEPodExecOperatorran. Cluster deletion succeeded and an independent cluster listing confirmed cleanup. This run is not reported as passing.Reproducible commands:
Was generative AI tooling used to co-author this PR?
Generated-by: Codex (GPT-6) following the guidelines