potiuk commented on code in PR #72577:
URL: https://github.com/apache/airflow/pull/72577#discussion_r3999087470


##########
providers/google/pyproject.toml:
##########
@@ -160,7 +160,7 @@ dependencies = [
 # Any change in the dependencies is preserved when the file is regenerated
 [project.optional-dependencies]
 "cncf.kubernetes" = [
-    "apache-airflow-providers-cncf-kubernetes>=10.1.0",
+    "apache-airflow-providers-cncf-kubernetes>=10.1.0",  # use next version

Review Comment:
   The bound needs to actually move here, not just pick up a comment — 
`>=10.22.0`:
   
   ```toml
   "apache-airflow-providers-cncf-kubernetes>=10.22.0",
   ```
   
   `KubernetesPodExecOperator` landed in cncf-kubernetes 10.22.0 (#71244), but 
the import at `kubernetes_engine.py:39` is unconditional and at module scope. 
With the bound left at `>=10.1.0`, any resolver-permitted version in 
10.1.0–10.21.1 makes the *whole* module unimportable — `GKEStartPodOperator`, 
`GKEStartJobOperator`, `GKECreateClusterOperator` and the rest, not just the 
new operator.
   
   Confirmed by blocking only that submodule via a `sys.meta_path` finder:
   
   ```
   this branch:  ImportError: No module named 
'airflow.providers.cncf.kubernetes.operators.pod_exec'
   main:         imports fine
   ```
   
   Worth doing alongside the bump: guard the import with 
`AirflowOptionalProviderFeatureException`, the way this module already does for 
`KubernetesDeleteJobOperator` a few lines below. That keeps a 
separately-installed, mismatched cncf-kubernetes from taking down every GKE 
operator rather than just the new one.
   
   Process note: 10.22.0 is tagged as `10.22.0rc1` but not yet on PyPI, so 
let's hold the merge until the release lands.
   
   ---
   Drafted-by: Claude Opus 5; reviewed by @potiuk before posting
   



-- 
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]

Reply via email to