You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "hyler (via GitHub)" <gi...@apache.org> on 2023/06/21 18:57:09 UTC
[GitHub] [airflow] hyler opened a new issue, #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
hyler opened a new issue, #32056:
URL: https://github.com/apache/airflow/issues/32056
### Apache Airflow version
Other Airflow 2 version (please specify below)
### What happened
We installed 2.4.0 like this:
```
apache-airflow[crypto,postgres,docker,cncf.kubernetes,kubernetes,sqlite,statsd]==2.4.0
```
Our previous Docker image, built sometime in January, worked fine. Building it today results in broken Airflow, with this in the UI:

This is the text:
```
Broken DAG: [/usr/local/airflow/dags/dag_generator.py] Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/operators/pod.py", line 51, in <module>
from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook
File "/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/hooks/kubernetes.py", line 35, in <module>
from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol
ImportError: cannot import name 'PodOperatorHookProtocol' from 'airflow.providers.cncf.kubernetes.utils.pod_manager' (/usr/local/lib/python3.8/site-packages/airflow/providers/cncf/kubernetes/utils/pod_manager.py)
```
If I enter the container and dig around site-packages/airflow/, I can indeed verify that `PodOperatorHookProtocol` is **not** in the pod_manager.py file.
I found a discussion here about this change, with some questions raised about the potential implications of the work (https://github.com/apache/airflow/pull/31298). Is this related?
### What you think should happen instead
_No response_
### How to reproduce
Install Airflow 2.4.0 and visit the URL. Error appears on main page.
### Operating System
Debian GNU/Linux 12 (bookworm)
### Versions of Apache Airflow Providers
apache-airflow-providers-cncf-kubernetes==7.0.0
apache-airflow-providers-common-sql==1.5.1
apache-airflow-providers-docker==3.7.0
apache-airflow-providers-ftp==3.4.1
apache-airflow-providers-http==4.4.1
apache-airflow-providers-imap==3.2.1
apache-airflow-providers-postgres==5.5.0
apache-airflow-providers-sqlite==3.4.1
### Deployment
Other Docker-based deployment
### Deployment details
_No response_
### Anything else
_No response_
### Are you willing to submit PR?
- [ ] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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: commits-unsubscribe@airflow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] hussein-awala commented on issue #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #32056:
URL: https://github.com/apache/airflow/issues/32056#issuecomment-1601589063
I just tested with the official docker image `apache/airflow:2.4.0` and still can't reproduce the issue:
```
airflow@5c746906a310:/opt/airflow$ pip freeze | grep apache-airflow
apache-airflow==2.4.0
apache-airflow-providers-amazon==5.1.0
apache-airflow-providers-celery==3.0.0
apache-airflow-providers-cncf-kubernetes==7.0.0
apache-airflow-providers-common-sql==1.5.1
apache-airflow-providers-docker==3.7.0
apache-airflow-providers-elasticsearch==4.2.0
apache-airflow-providers-ftp==3.4.1
apache-airflow-providers-google==8.3.0
apache-airflow-providers-grpc==3.0.0
apache-airflow-providers-hashicorp==3.1.0
apache-airflow-providers-http==4.4.1
apache-airflow-providers-imap==3.2.1
apache-airflow-providers-microsoft-azure==4.2.0
apache-airflow-providers-mysql==3.2.0
apache-airflow-providers-odbc==3.1.1
apache-airflow-providers-postgres==5.5.0
apache-airflow-providers-redis==3.0.0
apache-airflow-providers-sendgrid==3.0.0
apache-airflow-providers-sftp==4.0.0
apache-airflow-providers-slack==5.1.0
apache-airflow-providers-sqlite==3.4.1
apache-airflow-providers-ssh==3.1.0
airflow@5c746906a310:/opt/airflow$ python
Python 3.7.14 (default, Sep 13 2022, 02:30:55)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from airflow.providers.cncf.kubernetes.utils.pod_manager import PodOperatorHookProtocol
>>>
```
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] hyler closed issue #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
Posted by "hyler (via GitHub)" <gi...@apache.org>.
hyler closed issue #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
URL: https://github.com/apache/airflow/issues/32056
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] boring-cyborg[bot] commented on issue #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
Posted by "boring-cyborg[bot] (via GitHub)" <gi...@apache.org>.
boring-cyborg[bot] commented on issue #32056:
URL: https://github.com/apache/airflow/issues/32056#issuecomment-1601414269
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [airflow] hussein-awala commented on issue #32056: Installing 2.4.0 results in import error for PodOperatorHookProtocol
Posted by "hussein-awala (via GitHub)" <gi...@apache.org>.
hussein-awala commented on issue #32056:
URL: https://github.com/apache/airflow/issues/32056#issuecomment-1601565395
I can't reproduce the problem with the same versions of the providers:

--
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: commits-unsubscribe@airflow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org