astronomer / dag-factory

Dynamically generate Apache Airflow DAGs from YAML configuration files
Apache License 2.0
1.21k stars 180 forks source link

This module is deprecated. Please use `kubernetes.client.models.V1Volume` #94

Open bbgw opened 3 years ago

bbgw commented 3 years ago

Symptom

~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py:26 DeprecationWa
rning: This module is deprecated. Please use `kubernetes.client.models.V1Volume`.                                                                            
~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/airflow/providers/cncf/kubernetes/backcompat/backwards_compat_converters.py:27 DeprecationWa
rning: This module is deprecated. Please use `kubernetes.client.models.V1VolumeMount`.    

Traceback

  File "~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/dagfactory/__init__.py", line 2, in <module>
    from .dagfactory import DagFactory                                                                                                                         
  File "~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/dagfactory/dagfactory.py", line 8, in <module>
    from dagfactory.dagbuilder import DagBuilder                                                                                                               
  File "~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/dagfactory/dagbuilder.py", line 10, in <module>
    from airflow.contrib.operators.kubernetes_pod_operator import KubernetesPodOperator             
  File "~/.pyenv/versions/3.9.6/lib/python3.9/site-packages/airflow/contrib/operators/kubernetes_pod_operator.py", line 25, in <module>
    from airflow.providers.cncf.kubernetes.operators.kubernetes_pod import KubernetesPodOperator  # noqa
jpmaglutac commented 2 years ago

We are also running into this issue and were forced to use the older airflow.contrib.operators.kubernetes_pod_operator.KubernetesPodOperator operator