potiuk commented on a change in pull request #12384:
URL: https://github.com/apache/airflow/pull/12384#discussion_r525017935
##########
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:
From this respect good @ashb ! the backport provider package only
contains airflow.providers files. We do not add airflow/kubernetes.
Just double-checked and installed both airflow 1.10.12 and backport
cncf,kubernetes from pcakges and seem to be all ok.
This is what you get in 'backwards_compat_converters.py in the backport
package:
```
from typing import List
from kubernetes.client import models as k8s
from airflow.exceptions import AirflowException
from airflow.kubernetes.pod import Port, Resources
from airflow.kubernetes.pod_runtime_info_env import PodRuntimeInfoEnv
from airflow.kubernetes.volume import Volume
from airflow.kubernetes.volume_mount import VolumeMount
def _convert_kube_model_object(obj, old_class, new_class):
convert_op = getattr(obj, "to_k8s_client_obj", None)
if callable(convert_op):
return obj.to_k8s_client_obj()
```
----------------------------------------------------------------
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]