[AIRFLOW-3885] Improve Travis CI cycle time#4703
Conversation
7cc6f40 to
f2aa084
Compare
|
In my experience stopping a CI on first error leads to people fixing a single test and resubmitting, in the end resulting in more CI runs. I fully agree the CI time is beyond anything normal, but not sure this is the way to go. |
f2aa084 to
977af3d
Compare
Codecov Report
@@ Coverage Diff @@
## master #4703 +/- ##
==========================================
- Coverage 79.12% 79.12% -0.01%
==========================================
Files 489 489
Lines 30688 30688
==========================================
- Hits 24282 24281 -1
- Misses 6406 6407 +1
Continue to review full report at Codecov.
|
|
@BasPH I would guess the amount of time taken to run the entire test suite, fail, run subsequent tests, and return fail information back to the developer would still be shorter in aggregate, even if each test run only failed on the first test case. I'm not disagreeing with your suggestion, but I'm not seeing another way out at the moment. That said... py27 won't be supported at the end of the year, so maybe time to stop thinking about supporting it, and then we can remove those py27 test runs ^_^. |
|
+1 for Python3 only, although some Airflow users still run on Python2.7 so unfortunately I'm pretty certain it has to last until end of life... Some other suggestions (all take quite some work):
I hope some day there's time for all this 😛 |
|
@BasPH as you say, each will take a long time. And the long cycle will make them longer as well. It’s a chicken and egg problem. :-) I struggle with getting work done on airflow due to the difficulty in setting up a dev environment. I still only half have a docker env like the one in the test env’s, so I end up relying on the test cases running in travis. Furthermore reading the logs to find which tests failed takes a non trivial amount of time, and then trying to figure out what more elements of the env setup I need to run a particular test take more time. The main drive of the work that I’m doing is towards your first suggestion. I’m working on the plugin architecture to split the airflow code into modular sections to let us split it out. In the meantime, it would be nice not to have to wait 2 hours if my tests passed. :-) Sent with GitHawk |
|
I'll raise/amend my AIP-3: Dropping support for Python2 to be "Drop official support for Python2 in Airflow 2.0". 2.0 seems like a nice time to do this. |
|
@ashb Is airflow 2.0 slate before end of the year? |
|
There is currently no planned/talked about release date for 2.0. It's possible/likely to be before end of year |
@BasPH It's a brillant idea. Most operators, hooks, etc do not require a database. All operators for GCP also count in this. We can divide the tests into two categories: core and external integration (Not to be confused with integration tests). Dividing will be easy because we look at the structure of directories. Some operators that can not do without a database will be markers as core tests, but it will be information that they are written incorrectly. In the future, we will be able to improve them.. I propose from the creation of the AIrflowTestCase/CoreAirflowTestCase class. CoreAIrflowTestCase will run external integration tests only when the AIRFLOW_TEST_SUBSET environment variable equals to "core". Another idea is to use the decorator, but I think that such a class would be needed anyway. Another idea is to use a decorator, but I think that such a class would be useful anyway. I do not like the idea that every test would have to have a decorator, or run too many times. The idea that all tests have a parent in common sounds logical to me. |
|
Not about this PR, but generally. |
|
@mik-laj Did you happen to keep a list of those tests? |
|
@drewsonne Travis has this list. |
ef164cd to
856b48f
Compare
|
I would like to release Airflow 2.0 this year. And I agree with Bas that stopping the CI after the first failed tests is a bit wasteful. Since the environment is already built and up and running, lets run the full test suite. |
856b48f to
e9ae7b9
Compare
f7f94d4 to
005f1ca
Compare
005f1ca to
55aef3b
Compare
55aef3b to
d575d60
Compare
|
|
||
| acquire_rat_jar () { | ||
| declare -r TMP_DIR=/tmp | ||
| declare -r rat_jar="${TMP_DIR}"/lib/apache-rat-${RAT_VERSION}.jar |
There was a problem hiding this comment.
I believe double quote after TMP_DIR var should be at the end of the line.
There was a problem hiding this comment.
It's perhaps more conventional there but this works fine
$ echo "$HOME"
/Users/ash
$ echo "$HOME"def
/Users/ashdef
There was a problem hiding this comment.
Yes, I'm aware it works, but looking at the fact that there is furhter on ${RAT_VERSION} I would rather expect the whole declare -r rat_jar= to be double quoted.
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Make sure you have checked all steps below.
Jira
Description
Here are some details about my PR, including screenshots of any UI changes:
Remove the "install" action on the "pre-test" stage to avoid performing lengthy Docker pulls to perform pre-checks
Set nosetests to return on any test failuresGiven the lengthy runtime of the airflow CI test suites, if any tests fail, we should fail immediately and return the failed test locally. Users can run the tests locally to get full lists of failed tests.Tests
This change pre-test changes
Commits
Documentation
No changes to documented code
Code Quality
flake8