potiuk opened a new pull request #21182:
URL: https://github.com/apache/airflow/pull/21182
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
Note!!
For tests I am running it for now using "real" problematic case. I will
rebase it to main after I got it tested in CI
<!--
Thank you for contributing! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
In case of existing issue, reference it using one of the following:
closes: #ISSUE
related: #ISSUE
How to write a good git commit message:
http://chris.beams.io/posts/git-commit/
-->
---
**^ Add meaningful description above**
Read the **[Pull Request
Guidelines](https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst#pull-request-guidelines)**
for more information.
In case of fundamental code change, Airflow Improvement Proposal
([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvements+Proposals))
is needed.
In case of a new dependency, check compliance with the [ASF 3rd Party
License Policy](https://www.apache.org/legal/resolved.html#category-x).
In case of backwards incompatible changes please leave a note in
[UPDATING.md](https://github.com/apache/airflow/blob/main/UPDATING.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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]