-
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-6089] Reorder setup.py dependencies and add ci #6681
Conversation
3f2ea79
to
087f8c7
Compare
Codecov Report
@@ Coverage Diff @@
## master #6681 +/- ##
==========================================
- Coverage 83.84% 83.41% -0.43%
==========================================
Files 668 668
Lines 37547 37547
==========================================
- Hits 31481 31320 -161
- Misses 6066 6227 +161
Continue to review full report at Codecov.
|
I'm not sure if CI work , so I add a failed commit to test if static test work. |
Seem Travis-CI pre-test stage don't catch the error, but test stage catch https://travis-ci.org/apache/airflow/builds/617989011?utm_source=github_status&utm_medium=notification Have to more work on it |
scripts/ci/_utils.sh
Outdated
"--" "/opt/airflow/scripts/ci/in_container/run_check_licence.sh" \ | ||
"--" "/opt/airflow/scripts/ci/in_container/run_check_setup.sh" \ |
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.
Found out that wrong script name we call.
Now, Travis-CI failed as we except in https://travis-ci.org/apache/airflow/builds/618058541?utm_source=github_status&utm_medium=notification |
Hey @zhongjiajie -> It's super cool change. I have one suggestion though. Your test does not require full airflow set of dependencies to run - it's rather standalone, so you can run it as a "python" pre-commit check - similar to isort. Then you would not need all the scripts (they are only needed if you want to run stuff inside docker container). something like that could work:
It will automatically create a separate virtualenv for this check and run the test in this virtualenv. |
60ffc68
to
7056c3b
Compare
@potiuk Thanks for your advices, actually I try to understand how Airflow Breeze work during those days. |
pre-commit configure work with - id: setup-order
name: Checks for an order of dependencies in setup.py
language: system
files: ^setup.py$
pass_filenames: false
require_serial: true
entry: "python ./tests/test_order_setup.py" Will create a new commit tomorrow |
You can also run chmod +x ./tests/test_order_setup.py and add shebang "#!/usr/bin/env python" at the beginning of the file to make it executable and get it back to 'entry: tests/test_order_setup.py' @zhongjiajie -> good that you want to learn how breeze works :). BTW. make sure to take a look at the latest updates to the docs done with Technical Writer Elena: https://github.com/PolideaInternal/airflow/blob/more-gsod-improvements/CONTRIBUTING.rst |
7056c3b
to
7d104a5
Compare
@potiuk This PR is ready for review, PTAL |
@@ -458,6 +458,8 @@ image built locally): | |||
----------------------------------- ---------------------------------------------------------------- ------------ | |||
``rst-backticks`` Checks if RST files use double backticks for code. | |||
----------------------------------- ---------------------------------------------------------------- ------------ | |||
``setup-order`` Checks for an order of dependencies in setup.py | |||
----------------------------------- ---------------------------------------------------------------- ------------ |
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.
Not sure what Breeze field mean and not add * finally
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.
It's explained above (and we have a change in progress that it gets explained better). It's exactly the difference whether it uses Docker Breeze image underneath or not. Your test initially used it (with the scripts etc.) but then now with "python" it does not use those images. So it's ok as it is.
[ all all-but-pylint check-hooks-apply check-merge-conflict check-executables-have-shebangs check-xml debug-statements detect-private-key doctoc end-of-file-fixer flake8 forbid-tabs insert-license check-apache-license lint-dockerfile mixed-line-ending mypy pylint shellcheck]. | ||
[ all all-but-pylint check-apache-license check-executables-have-shebangs check-hooks-apply check-merge-conflict check-xml debug-statements doctoc detect-private-key end-of-file-fixer flake8 forbid-tabs insert-license lint-dockerfile mixed-line-ending mypy pylint setup-order shellcheck]. |
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 make this in alphabetical, same as others hint
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.
Cool!
* Reorder dependencies in setup.py * Add static check in Airflow Breeze ci
7d104a5
to
6b4561e
Compare
[ all all-but-pylint check-hooks-apply check-merge-conflict check-executables-have-shebangs check-xml debug-statements detect-private-key doctoc end-of-file-fixer flake8 forbid-tabs insert-license check-apache-license lint-dockerfile mixed-line-ending mypy pylint shellcheck]. | ||
[ all all-but-pylint check-apache-license check-executables-have-shebangs check-hooks-apply check-merge-conflict check-xml debug-statements doctoc detect-private-key end-of-file-fixer flake8 forbid-tabs insert-license lint-dockerfile mixed-line-ending mypy pylint setup-order shellcheck]. |
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.
Cool!
@@ -458,6 +458,8 @@ image built locally): | |||
----------------------------------- ---------------------------------------------------------------- ------------ | |||
``rst-backticks`` Checks if RST files use double backticks for code. | |||
----------------------------------- ---------------------------------------------------------------- ------------ | |||
``setup-order`` Checks for an order of dependencies in setup.py | |||
----------------------------------- ---------------------------------------------------------------- ------------ |
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.
It's explained above (and we have a change in progress that it gets explained better). It's exactly the difference whether it uses Docker Breeze image underneath or not. Your test initially used it (with the scripts etc.) but then now with "python" it does not use those images. So it's ok as it is.
Cool! very nice. Thanks @zhongjiajie ! |
I also cherry-picked it to v1-10-test :) |
* Reorder dependencies in setup.py (cherry picked from commit fc2098f)
* Reorder dependencies in setup.py (cherry picked from commit fc2098f)
Thanks Jarek's review and merge |
* Reorder dependencies in setup.py (cherry picked from commit fc2098f)
* Reorder dependencies in setup.py (cherry picked from commit fc2098f)
* Reorder dependencies in setup.py
Make sure you have checked all steps below.
Jira
Description
reorder setup package in alphabetical and add unittest to ci
Tests
Add test
Commits
Documentation