-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Add pre-commits preventing accidental API changes in common.sql #27962
Conversation
0bbe3f5
to
7ad141d
Compare
80ae4a9
to
b6e7a33
Compare
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.
Just a minor comment, other than that, LGTM :)
cfcc168
to
3f03d22
Compare
Fixed and also updated the description a little for the future work. |
3f03d22
to
36fa4f9
Compare
All looks good :) |
🙏 |
4f7fc72
to
8dad054
Compare
8dad054
to
c8002a4
Compare
OK. No |
0d31796
to
2da265b
Compare
We had recently some mishaps when it comes to changes to the common.sql provider that accidentally changed API of the common.sql providers and they passed both tests and reviews. Common.sql is pretty special provider because it used by other providers and we have to make sure the API it epxoses is backwards compatible, otherwise upgrading common.sql provider might break those providers. This had already happened: * The apache#26761 refactored common.sql provided and removed some methods that were actually used by Google Provider * This caused a problem described in apache#27838 and forced us ot yank common.sql 1.3.0 and release 1.3.1 with the methods added back in apache#27843 This change introduces tools and process to flag common.sql API changes that are likely backwards compatible. They will require a deliberate action from the contributor who introduces a breaking API to common.sql, it will also help to flag to reviewer when such a change is made. The idea is based on how Android OS handles flagging API changes for their public APIs paired with the tooling that MyPy provides with generating stubs and verifying usage of packages in the stubs.
2da265b
to
e0b8dcc
Compare
We had recently some mishaps when it comes to changes to the common.sql provider that accidentally changed API of the common.sql providers and they passed both tests and reviews.
Common.sql is pretty special provider because it used by other providers and we have to make sure the API it epxoses is backwards compatible, otherwise upgrading common.sql provider might break those providers.
This had already happened:
The Common sql bugfixes and improvements #26761 refactored common.sql provided and removed some methods that were actually used by Google Provider
This caused a problem described in apache-airflow-providers-common-sql==1.3.0 breaks BigQuery operators #27838 and forced us ot yank common.sql 1.3.0 and release 1.3.1 with the methods added back in Restore removed (but used) methods in common.sql #27843
This change introduces tools and process to flag common.sql API changes that are likely backwards compatible.
They will require a deliberate action from the contributor who introduces a breaking API to common.sql, it will also help to flag to reviewer when such a change is made.
The idea is based on how Android OS handles flagging API changes for their public APIs paired with the tooling that MyPy provides with generating stubs and verifying usage of packages in the stubs.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.