backport for add_xcom_sidecar (#11478)
* backport for add_xcom_sidecar * activate function * add k8s filter * nit * fix to work
This commit is contained in:
Родитель
0646849e3d
Коммит
7b7cc3c391
|
@ -650,6 +650,18 @@ class RefactorBackportPackages:
|
|||
rename("airflow.providers.odbc.utils.helpers")
|
||||
)
|
||||
|
||||
def refactor_kubernetes_pod_operator(self):
|
||||
def kubernetes_package_filter(node: LN, capture: Capture, filename: Filename) -> bool:
|
||||
return filename.startswith("./airflow/providers/cncf/kubernetes")
|
||||
|
||||
(
|
||||
self.qry.
|
||||
select_class("KubernetesPodOperator").
|
||||
select_method("add_xcom_sidecar").
|
||||
filter(callback=kubernetes_package_filter).
|
||||
rename("add_sidecar")
|
||||
)
|
||||
|
||||
def do_refactor(self, in_process: bool = False) -> None: # noqa
|
||||
self.rename_deprecated_modules()
|
||||
self.refactor_amazon_package()
|
||||
|
@ -659,6 +671,7 @@ class RefactorBackportPackages:
|
|||
self.remove_super_init_call()
|
||||
self.add_provide_context_to_python_operators()
|
||||
self.remove_poke_mode_only_decorator()
|
||||
self.refactor_kubernetes_pod_operator()
|
||||
# In order to debug Bowler - set in_process to True
|
||||
self.qry.execute(write=True, silent=False, interactive=False, in_process=in_process)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче