You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong dependecy version of requests for Databricks provider #23917
There was added import statement from the requests library to airflow/providers/databricks/hooks/databricks_base.py by this MR.
But minimal version of requests wasn't bumped up to >=2.27.0, as we can see it's still >=2.26.0, but that JSONDecodeError class added to requests library starting from 2.27.0 (see release notes).
It brings inconsistency between libraries and leads to following error:
File "/usr/local/lib/python3.7/site-packages/airflow/providers/databricks/hooks/databricks.py", line 33, in <module>
from airflow.providers.databricks.hooks.databricks_base import BaseDatabricksHook
File "/usr/local/lib/python3.7/site-packages/airflow/providers/databricks/hooks/databricks_base.py", line 34, in <module>
from requests.exceptions import JSONDecodeError
ImportError: cannot import name 'JSONDecodeError' from 'requests.exceptions'
What you think should happen instead
it breaks DAGs
How to reproduce
Use any Databricks operator with requests==2.26.0, which is defined is minimal compatible version
Activity
boring-cyborg commentedon May 25, 2022
Thanks for opening your first issue here! Be sure to follow the issue template!
collinmcnulty commentedon May 25, 2022
I have also reproduced this error and confirmed that adding
requests>=2.27,<3fixes the problem.vincentkoc commentedon May 26, 2022
Started a PR for this based on the comment/test from @collinmcnulty as #23927
Update dep for databricks #23917 (#23927)
Update dep for databricks #23917 (#23927)
potiuk commentedon May 31, 2022
Closed by #23927 (@koconder please let us know if some more change is needed).
pull master (#25)