-
Notifications
You must be signed in to change notification settings - Fork 16.3k
[AIRFLOW-4117] Multi-staging Image - Travis CI tests [Step 3/3] #4938
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
Conversation
3da8bd9 to
0e9f1b7
Compare
|
Note removed. |
dd3f349 to
07cd943
Compare
|
@ashb -> thanks for the thorough review. I will apply all the comments shortly |
4b76f3b to
63b4a19
Compare
|
@Fokko @ashb -> I pushed the latest version with pretty much all comments applied (except setup.py). There is one change that might require longer discussion/argumentation. I had to change the ci image to use root rather than "airflow" user - so the Dockerfile is now configurable (main airflow image uses "airflow" user and "CI" image user root user. This was needed in order to replicate CI environment on Linux. I tested it now extensively on Linux and the main problem was that when you tried to map local source folder to the container, you could not easily map it as "airflow" user and the folders are not accesible to airflow user. This is a known Docker problem (there is an open issue for that moby/moby#2259 ). I looked at possible workaround, but it turns out, until this issue is solved, it's easiest if airflow is run as root (then everything is root-owned inside the container). This problem does not occur on Mac because on Mac local volumes are mounted to virtual machine using user-space synchronising filesystem via virtual machine (which makes it much slower on one hand, but it allows to carry the user mapping with the bind volume). But if someone develops on Linux that could be a huge blocker for convenient development environment. I hope this is something that you will be able to live with :) |
63b4a19 to
9a94899
Compare
9a94899 to
168c02f
Compare
9aca2c1 to
8833ad7
Compare
potiuk
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.
Please take a look and see if you have any further "big" comments to it
Further progress: This commit is quite close to have the tox-less Travis CI tests. I am very close to have all the tests pass:
-
mysql is working (it was a permission problem - I solved it in one of the previous commits where I am fixing now only group write permissions for Docker context)
-
There are only three tests + minikube that are currently failing (there are few fixes I had to do beacause of change to the root user for CI tests):
- tests.transplant_class..C.test_doctests
- tests.www.api.experimental.test_kerberos_endpoints.ApiKerberosTests.test_trigger_dag
- tests.test_models.DagTest.test_following_previous_schedule_daily_dag_CEST_to_CET
- minikube tests
-
I simplified docker-compose-backend settings (now only variables specific for backend are specified there - docker compose launches all backends now. This was necessary because some of the Mysql tests use running Postgres (Postgres Hoook etc.).
-
I have added a nice summary of only failed tests at the end of the test run - this way we can see the exact list of failed tests immediately rather than searching through entire log
You can see it here for example: https://api.travis-ci.org/v3/job/513873530/log.txt
I have one outstanding question about python setup.py test behaviour (separate comment thread).
|
Thanks @potiuk
|
I thought that we skipped the operators for foreign operators: airflow/tests/operators/test_operators.py Lines 56 to 58 in e72ff0a
Maybe we don't do that universally. |
|
@Fokko -> i understand being busy. I am quite busy myself now so I move it in a slower pace than I would like to (the remainig tests and kubernetes parts). Answering the mysql part -> we are only installing client libraries for mysql not the server ones. Our python mysql library(https://pypi.org/project/mysqlclient/) requires mysql-client and libmysqlclient-dev native libraries to be installed. Since we are using debian-stretch as a base (this is what official python images use as a base), default mysql libraries are actually mariadb ones not the "oracle mysql" ones. They are supposed to be compatible (mariadb is fork of mysql). I figured that Airflow's target is the original "MySQL" rather than "MariaDB" so I think using "official" libs from Oracle might be better choice for CI build - that's why we have separate step to install Oracle libs (following official instructions). It's a bit long because you need to install Oracle Keys and set-up repos, but it boils down to:
Note that Ubuntu has Oracle MySQL installed by default rather than MariaDB, so I guess most of airflow users will also have the MySQL client rather than MariaDB. |
|
WOW great job @potiuk ! |
|
Awesome! 🚀 |
|
281 and counting ... Not that I am saying anything ;) |
|
^ This one doesn't count 🙄😄 |
|
This is the first full-merged AIP. One click for a man, but a big step for Airflow :-D 🍩 🍮 🍦 🍨 🍧 🍰 🍪 🍫 🍬 🍭 |
(cherry picked from commit 2d086d7)
…apache#4938)" This reverts commit 2d086d7.
Make sure you have checked all steps below.
Jira
Description
This is 3rd stage of parent https://issues.apache.org/jira/browse/AIRFLOW-3718 task. It implements executing tests in CI environment.
Note that if you are reviewer, until the first part is merged, you should only take a look at the last commit rather than at all commits - currently there is no way to make a PR to a commit that is being reviewed yet.
Tests
Commits
Documentation
No documentation needed for that change. Design is documented in https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-10+Multi-layered+and+multi-stage+official+Airflow+image
Follow up documentation will be added in Simplified Development Workflow change: #4932
Code Quality
flake8