-
Notifications
You must be signed in to change notification settings - Fork 14.5k
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
Convert selective checks to Breeze Python #24610
Conversation
ba98814
to
d361703
Compare
cc: @edithturn @Bowrna : -800 lines of bash less and much easier "logic" to grasp for selective checks implementation |
I wouldn't have thought of all those changes, really impressive @potiuk. |
Just Python is way easier to write things better :) |
4aa85b2
to
5407a01
Compare
BTW. By converting the checks to Python I also found that current selectiuve checks were not "selective enough" as I missed the cases where "Helm" tests are run unnecessarily in quite a number of cases (For example they we run when only providers were modified - this should speed up PRs from contributors who only modified one or more providers and did not touch the core). |
7ef286d
to
f2215d3
Compare
04ca504
to
f123eb9
Compare
Instead of bash-based, complex logic script to perform PR selective checks we now integrated the whole logic into Breeze Python code. It is now much simplified, when it comes to algorithm. We've implemented simple rule-based decision tree. The rules describing the decision tree are now are now much easier to reason about and they correspond one-to-one with the rules that are implemented in the code in rather straightforward way. The code is much simpler and diagnostics of the selective checks has also been vastly improved: * The rule engine displays status of applying each rule and explains (with yellow warning message what decision was made and why. Informative messages are printed showing the resulting output * List of files impacting the decision are also displayed * The names of "ci file group" and "test type" were aligned * Unit tests covering wide range of cases are added. Each test describes what is the case they demonstrate * `breeze selective-checks` command that is used in CI can also be used locally by just providing commit-ish reference of the commit to check. This way you can very easily debug problems and fix them Fixes: apache#19971
f123eb9
to
00748eb
Compare
All Green! |
The PR most likely needs to run full matrix of tests because it modifies parts of the core of Airflow. However, committers might decide to merge it quickly and take the risk. If they don't merge it quickly - please rebase it to the latest main at your convenience, or amend the last commit of the PR, and push it with --force-with-lease. |
When apache#24610 was implemented I missed the label-when-reviewed workflow
When #24610 was implemented I missed the label-when-reviewed workflow
Selective checks docs have been moved to breeze as part of #24610 but some of the references were still left. This PR cleans it up.
Instead of bash-based, complex logic script to perform PR selective checks we now integrated the whole logic into Breeze Python code. It is now much simplified, when it comes to algorithm. We've implemented simple rule-based decision tree. The rules describing the decision tree are now are now much easier to reason about and they correspond one-to-one with the rules that are implemented in the code in rather straightforward way. The code is much simpler and diagnostics of the selective checks has also been vastly improved: * The rule engine displays status of applying each rule and explains (with yellow warning message what decision was made and why. Informative messages are printed showing the resulting output * List of files impacting the decision are also displayed * The names of "ci file group" and "test type" were aligned * Unit tests covering wide range of cases are added. Each test describes what is the case they demonstrate * `breeze selective-checks` command that is used in CI can also be used locally by just providing commit-ish reference of the commit to check. This way you can very easily debug problems and fix them Fixes: apache#19971 (cherry picked from commit d7bd72f)
…e#24651) When apache#24610 was implemented I missed the label-when-reviewed workflow (cherry picked from commit 2703874)
Selective checks docs have been moved to breeze as part of apache#24610 but some of the references were still left. This PR cleans it up. (cherry picked from commit aa8cd30)
It was merged, well done @potiuk Jarek 🥳 |
After implementing apache#24610 and few follow-up fixes, it is now easy to add more optimizations to our unit test execution in CI (and to give this capability back to our contributors). This PR adds capability of running tests for selected set of providers - not for the whole "Providers" group. You can specify `--test-type "Providers[airbyte,http]" to only run tests for the two selected providers. This is the step towards separating providers to separate repositories, but it also allows to optimize the experience of the contributors developing only single provider changes (which is vast majority of contributions). This also allows to optimize build and elapsed time needd to run tests for those PRs that only affects selected providers (again - vast majority of PRs). The CI selection of which provider tests is done now in Selective Checkcs - they are a bit smarter in just selecting the providers that has been changed, they also check if there are any other providers that depend on it (we keep automatically updated by pre-commit dependencies.json file and this file determines which files should be run.
After implementing #24610 and few follow-up fixes, it is now easy to add more optimizations to our unit test execution in CI (and to give this capability back to our contributors). This PR adds capability of running tests for selected set of providers - not for the whole "Providers" group. You can specify `--test-type "Providers[airbyte,http]" to only run tests for the two selected providers. This is the step towards separating providers to separate repositories, but it also allows to optimize the experience of the contributors developing only single provider changes (which is vast majority of contributions). This also allows to optimize build and elapsed time needd to run tests for those PRs that only affects selected providers (again - vast majority of PRs). The CI selection of which provider tests is done now in Selective Checkcs - they are a bit smarter in just selecting the providers that has been changed, they also check if there are any other providers that depend on it (we keep automatically updated by pre-commit dependencies.json file and this file determines which files should be run.
After implementing #24610 and few follow-up fixes, it is now easy to add more optimizations to our unit test execution in CI (and to give this capability back to our contributors). This PR adds capability of running tests for selected set of providers - not for the whole "Providers" group. You can specify `--test-type "Providers[airbyte,http]" to only run tests for the two selected providers. This is the step towards separating providers to separate repositories, but it also allows to optimize the experience of the contributors developing only single provider changes (which is vast majority of contributions). This also allows to optimize build and elapsed time needd to run tests for those PRs that only affects selected providers (again - vast majority of PRs). The CI selection of which provider tests is done now in Selective Checkcs - they are a bit smarter in just selecting the providers that has been changed, they also check if there are any other providers that depend on it (we keep automatically updated by pre-commit dependencies.json file and this file determines which files should be run. (cherry picked from commit 3dedbd3)
Instead of bash-based, complex logic script to perform PR selective
checks we now integrated the whole logic into Breeze Python code.
It is now much simplified, when it comes to algorithm. We've
implemented simple rule-based decision tree. The rules describing
the decision tree are now are now much easier
to reason about and they correspond one-to-one with the rules
that are implemented in the code in rather straightforward way.
The code is much simpler and diagnostics of the selective checks
has also been vastly improved:
The rule engine displays status of applying each rule and
explains (with yellow warning message what decision was made
and why. Informative messages are printed showing the resulting
output
List of files impacting the decision are also displayed
The names of "ci file group" and "test type" were aligned
Unit tests covering wide range of cases are added. Each test
describes what is the case they demonstrate
breeze selective-checks
command that is used in CI can alsobe used locally by just providing commit-ish reference of the
commit to check. This way you can very easily debug problems and
fix them
Fixes: #19971
^ 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 a newsfragement file, named
{pr_number}.significant.rst
, in newsfragments.