-
Notifications
You must be signed in to change notification settings - Fork 16.4k
Speed up verification and instalation of providers in CI #30839
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
Speed up verification and instalation of providers in CI #30839
Conversation
|
Yet another improvement of CI speed - this time with testing provider packages. For Provider-only changes, a lot of contributors should be able to save a lot of build time for just building and installing the affected provider packages, rather than all of them |
fd1e3df to
8874193
Compare
|
I also found one case where core-changes did not trigger docs build for Providers, which should not be the case, when we change core files, potentilly all providers are affected (for tests, docs building and package preparation). |
de933a2 to
8e9fcb3
Compare
8e9fcb3 to
cf077a8
Compare
hussein-awala
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.
I think we should test all the providers when we change something in airflow/models like the base sensor or operator. I don't see a test for that. WDYT?
It's covered by the test below. This is actually the issue I mentioned with:
We already had this as a case where we decide that we should run all provider tests where "essential" airflow core chnages. This means if there is a change that is "airflow" sources but:
We decide to:
Yeah, likely we could still refactor it (I think it would have been better to distinguish the values of those two for case where we skip them alltogether but for now it is what it is - for now guarded by the test cases). |
After the comment -yeah I think I might want to refactor that one .. I also see how convoluted it got and I have some idea how to make it "cleaner" a bit. |
cf077a8 to
7a77ecf
Compare
|
All right. I think this should be much better now:
|
7a77ecf to
fdc2b5b
Compare
9d1fa63 to
a29bfe1
Compare
For PRs that are just changing selected providers, there is no need to install and verify all providers, just those affected should be installed (and full verification should only be done when all providers are being built - so generally speaking, when Core PRs are run or when canary builds are run. This PR distinguishes those two cases: * installing and verification when all providers are selected * installing only affected providers when only subset of them are affected Also a bug was found where core file changes did not trigger provider docs build during implementation. This has been fixed
a29bfe1 to
8f468d7
Compare
|
Running last tests, and I think in the current version of selective checks and the tests show the intentions much better and the code is cleaner (extracted the important bits): |
|
cc: @hussein-awala -> I added the "models" specifically in tests - but it's basically the same as "any other" file in airflow (other than www/cli/api which we know are not involved with providers). I did not want to specifically limit models only because there are a number of files providers might depend on (exceptions, decorators, hooks, listeners, you name it) . Once we clarify the "actual" API that Providers can use, we could potentially enumerate those, but for now I assume that "any" change in those packages except API/CLI/WWW might impact providers directly. It's now explicitly stated in the tests. |
hussein-awala
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.
looks good, LGTM
For PRs that are just changing selected providers, there is no need to install and verify all providers, just those affected should be installed (and full verification should only be done when all providers are being built - so generally speaking, when Core PRs are run or when canary builds are run. This PR distinguishes those two cases: * installing and verification when all providers are selected * installing only affected providers when only subset of them are affected Also a bug was found where core file changes did not trigger provider docs build during implementation. This has been fixed (cherry picked from commit 3af22f5)
For PRs that are just changing selected providers, there is no need to install and verify all providers, just those affected should be installed (and full verification should only be done when all providers are being built - so generally speaking, when Core PRs are run or when canary builds are run.
This PR distinguishes those two cases:
Also a bug was found where core file changes did not trigger provider docs build during implementation. This has been fixed
^ 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.rstor{issue_number}.significant.rst, in newsfragments.