potiuk commented on a change in pull request #12384:
URL: https://github.com/apache/airflow/pull/12384#discussion_r525303909



##########
File path: dev/provider_packages/refactor_provider_packages.py
##########
@@ -146,6 +146,13 @@ def rename_deprecated_modules(self) -> None:
         for new, old in changes:
             self.qry.select_module(new).rename(old)
 
+        def is_not_k8spodop(node: LN, capture: Capture, filename: Filename) -> 
bool:
+            return not filename.endswith("/kubernetes_pod.py")
+
+        
self.qry.select_module("airflow.providers.cncf.kubernetes.backcompat").filter(
+            callback=is_not_k8spodop
+        ).rename("airflow.kubernetes")
+

Review comment:
       @dimberman: Not broken, but can be improved :) 
   
   This commit: 
https://github.com/apache/airflow/commit/8d0be15ae4e4c1cd51d61ccd71fe0a8bef7f0ffe
 removes the backcompat/pod.py and other files from backports as they are not 
needed there. Except that 
   
   `from airflow.kubernetes.pod_runtime_info_env import PodRuntimeInfoEnv` in 
`kubernetes_pod.py` still points to backcompat because this file is excluded 
from the rename above.
   
   The "perfect" fix is to:
   1) Also replace the import in `./kubernetes_pod.py`. Can be likely done with 
this without affecting the other imports in ./kubernetes.pod:
   
   ```
           
self.qry.select_package("airflow.providers.cncf.kubernetes.backcompat.pod_runtime_info")\
                 .rename("airflow.kubernetes.pod_runtime_info")
   ```
   
   2) remove the backcompat files as in 
https://github.com/apache/airflow/commit/8d0be15ae4e4c1cd51d61ccd71fe0a8bef7f0ffe
   
   
   




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to