-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Display better error message when importing providers has errors #21182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display better error message when importing providers has errors #21182
Conversation
fe3751c to
82aac91
Compare
902e6d0 to
eb3054f
Compare
eb3054f to
cb54e76
Compare
ed59b16 to
c30dd2a
Compare
When there are import errors in providers we printed errors in a folded group which lead to poor discovery of those errors. Also with recent changes to Airflow main for upcoming 2.3 version some errors might become more common when developing providers. Specifically the way how to import Context in order to satisfy MyPy and keep Airflow 2.1 compatibility is not obvious. This change introduces helpful guideline to users adding new providers: * moving errors outside of the folded group with imports * adding comment explaining what the errors are about * adding message about backwards compatibility in case errors happen during 2.1.0 backwards-compatibility check * adding explanation and suggest a fix in the common Context impport error
c30dd2a to
797794c
Compare
|
This one will be nice for users who struggle with Airflow 2.1 compatibility for providers :). |
|
cc: @pateash WDYT ? |
pateash
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM :)
This looks great. Cheers. |
|
Anyone please :) . This will be a life-saver for those who will be adding features for providers. @turbaszek I think you even requested it once and I thought it was fixed - but this one should be way better (see #13924) |
|
Hello :) :) :) |




When there are import errors in providers we printed errors
in a folded group which lead to poor discovery of those errors.
Also with recent changes to Airflow main for upcoming 2.3 version
some errors might become more common when developing providers.
Specifically the way how to import Context in order to satisfy
MyPy and keep Airflow 2.1 compatibility is not obvious.
This change introduces helpful guideline to users adding new
providers:
errors happen during 2.1.0 backwards-compatibility check
impport error
Just last commit matters!
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.