-
Notifications
You must be signed in to change notification settings - Fork 14.2k
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
[AIRFLOW-5285] Pylint pre-commit filters out pylint_todo files #5884
[AIRFLOW-5285] Pylint pre-commit filters out pylint_todo files #5884
Conversation
CC : @nuclearpinguin |
@nuclearpinguin @mik-laj - I'd love if you test in on Mac running for --all-files and for a small change. I enabled parallel execution for the tests and previously when I tested it on Mac I had a feeling it is very slow but likely this was because of image rebuilding in parallel. Now we have a single test at the beginning which rebuilds the images once if needed (and REBUILD=true used) and all the other checks should run fast with already rebuilt image. |
Sure I will test it ✅ |
Also I tried another variant (fixup) - where travis still runs pylint separately. I think this will be best for now as running all tests on Travis took 16 minutes https://travis-ci.org/apache/airflow/jobs/575437986 (we have two CPU machines there only and with limited memory). By having parallel pre-commit on a fast 8CPU machine this will go down to 3-4 minutes, but for now splitting the pylint jobs separately might be much better (but still we run it all via pre-commit). https://travis-ci.org/apache/airflow/builds/575447025 |
Just to give a heads-up - seems that it works fine -> it takes < 5 minutes on my Mac to run 'pre-commit run --all-files' :) |
Trying more sensible split trying to optimize image builds and Travis. |
3ba364b
to
26307d8
Compare
Running Small change in code and docs took Change in operator, hook and tests took |
Out of interest how long does it take if you delete the |
@ashb cira |
Then for the Travis build we also save time on downloading the image. In the latest version we only pull/build checklicence image for checklicence step, and only pull/build slim-ci image for the rest. That also saves a bit of time. Locally when you run the pre-commit both images will normally be already built so we only save time for running the test. It's highly optimised in this version. |
Anything else needed to merge this one ? |
(cherry picked from commit d24db82)
(cherry picked from commit d24db82)
…e#5884) * [AIRFLOW-5285] Pylint pre-commit filters out pylint_todo files
We have now all pylint checks incorporated into pre-commit hooks including filtering out the files from todo list. Also all checks are now moved to a single job in Travis, utilising multiple processors so it should be even faster and less overhead to run all the tests.
Make sure you have checked all steps below.
Jira
Description
Tests
Commits
Documentation
Code Quality
flake8