Граф коммитов

470 Коммитов

Автор SHA1 Сообщение Дата
Kaxil Naik 09c895ee72
[AIRFLOW-6436] Cleanup for Airflow configs doc generator code (#7036) 2020-01-04 16:18:19 +00:00
Kaxil Naik 18e8cea4e7
[AIRFLOW-6428] Fix import path for airflow.utils.dates.days_ago in Example DAGs (#7007) 2020-01-03 13:42:04 +00:00
Tomek Urbaszek 151934cd83 [AIRFLOW-6373] Make airflow/utils pylint compatible (#6929)
This PR removes airflow/utils/* files from pylint todo list
and implements required changes.
2020-01-02 13:36:06 +01:00
Tomek Urbaszek 34292a5eeb [AIRFLOW-6383] Add no trailing-whitespace pre-commit hook (#6941) 2019-12-28 19:34:35 +01:00
Tomek 6fffa5b0d7 [AIRFLOW-6343] Make tests/* pylint compatible (#6899) 2019-12-26 21:30:43 +01:00
Tomek 0d052dc470 [AIRFLOW-6337] Make tests/operators pylint compatible (#6894) 2019-12-25 14:30:41 +01:00
Tomek d5fa17f7b9 [AIRFLOW-6340] Make tests/contrib pylint compatible (#6896) 2019-12-25 11:22:30 +01:00
Tomek 66604142bc [AIRFLOW-6341] Make tests/models pylint compatible (#6897) 2019-12-25 11:09:59 +01:00
Tomek c1ecad8f69 [AIRFLOW-6339] Make tests/hooks pylint compatible (#6895) 2019-12-25 11:08:10 +01:00
Tomek 7cfa7b0dfa [AIRFLOW-6338] Make tests/sensors pylint compatible (#6893) 2019-12-25 11:07:07 +01:00
Tomek 9f38a8b245 [AIRFLOW-6336] Make tests/utils pylint compatible (#6892) 2019-12-25 11:05:59 +01:00
Jiajie Zhong 65ef8f3f81 [AIRFLOW-6313] Unify example or doc dag owner (#6864)
We already change Airflow DAG default owner to 'airflow'
in https://github.com/apache/airflow/pull/4151 but some
of our example DAGs and docs are still using
owner = 'Airflow', This patch to unify them
2019-12-20 14:09:59 +01:00
Ash Berlin-Taylor 2a157e32d0 [AIRFLOW-6272] Switch from npm to yarnpkg for managing front-end dependencies (#6844)
It is:

- quicker to install
- easier to get repeatable results
- Takes up less space (130MB/15k files vs 190MB/23k files)
- nicer to user (has better help)
2019-12-19 22:21:41 +01:00
Tomek 0fdde863eb [AIRFLOW-6130] Make Cassandra to GCS operator pylint compatible (#6692)
* [AIRFLOW-6130] Make Cassandra to GCS operator pylint compatible
2019-12-18 15:19:31 +01:00
Darren Weber 7502cad284 [AIRFLOW-6206] Move and rename AWS batch operator [AIP-21] (#6764)
- conform to AIP-21
  - see https://issues.apache.org/jira/browse/AIRFLOW-4733
  - see https://cwiki.apache.org/confluence/display/AIRFLOW/AIP-21%3A+Changes+in+import+paths
  - use airflow.providers.amazon.aws.operators.batch.AwsBatchOperator
  - deprecate airflow.contrib.operators.awsbatch_operator.AWSBatchOperator

- fix pylint for airflow/providers/amazon/aws/operators/batch.py
2019-12-17 16:15:47 +00:00
Rich Dean 4a21b62161 [AIRFLOW-5959][AIP-21] Move contrib/*/jira to providers (#6661) 2019-12-13 14:47:56 +01:00
Kamil Breguła 53aa9753c1 [AIRFLOW-6209] Drop gcp_service_account_keys option (#6768)
* [AIRFLOW-6209] Drop gcp_service_account_keys option

* fixup! [AIRFLOW-6209] Drop gcp_service_account_keys option
2019-12-10 14:05:37 -08:00
Jarek Potiuk 239d51ed31
[AIRFLOW-6216] Allow pytests to be run without "tests" (#6770)
With this change you should be able to simply run `pytest` to run all the tests in the main airflow directory.

This consist of two changes:

* moving pytest.ini to the main airflow directory
* skipping collecting kubernetes tests when ENV != kubernetes
2019-12-10 14:49:00 +01:00
TobKed 69629a5a94 [AIRFLOW-5807] Move SFTP from contrib to providers. (#6464)
* [AIRFLOW-5807] Move SFTP from contrib to core
2019-12-09 17:42:19 +01:00
Jarek Potiuk 25e9047a4a
[AIRFLOW-6193] Do not use asserts in Airflow main code (#6749)
* [AIRFLOW-6193] Do not use asserts in Airflow main code
2019-12-09 15:57:42 +01:00
Tomek d0879257d0 [AIRFLOW-6191] Adjust pytest verbosity in CI and local environment (#6746) 2019-12-09 12:32:31 +01:00
Tomek e61025e1ac [AIRFLOW-6058] Running tests with pytest (#6472)
This commit runs Airflow's test suite using pytest.
2019-12-05 10:40:28 +01:00
Jarek Potiuk a36cfe049a
[AIRFLOW-6004] Untangle Executors class to avoid cyclic imports (#6596)
There are cyclic imports detected seemingly randomly by pylint checks when some
    of the PRs are run in CI

    It was not deterministic because pylint usually uses as many processors as
    many are available and it splits the list of .py files between the separate
    pylint processors - depending on how the split is done, pylint check might
    or might not detect it. The cycle is always detected when all files are used.

    In order to make it more deterministic, all pylint and mypy errors were resolved
    in all executors package and in dag_processor.

    At the same time plugins_manager had also been moved out of the executors
    and all of the operators/hooks/sensors/macros because it was also causing
    cyclic dependencies and it's far easier to untangle those dependencies
    in executor when we move the intialisation of all plugins to plugins_manager.

    Additionally require_serial is set in pre-commit configuration to
    make sure cycle detection is deterministic.
2019-12-03 16:02:20 +01:00
Jarek Potiuk 91eb87112b
[AIRFLOW-6142] Fix different local/Travis pylint results (#6705)
* [AIRFLOW-6142] Fix different local/Travis pylint results

Sometimes Pylint on Travis CI gives still different results than the one run
locally. This was happening because we were using the
AIRFLOW_MOUNT_SOURCE_DIR_FOR_STATIC_CHECKS="true" for static checks. This is
needed for checklicence check only - just to make sure that all source files
(including scripts etc.) are mounted to the container.

However this makes it slightly different when it comes to pylint checks. We
would like to have it exactly identical when run locally and in CI so in case
of static checks we should rather use
AIRFLOW_MOUNT_HOST_VOLUMES_FOR_STATIC_CHECKS="true" for all checks but the
Checklicence one - same as used locally.

This way running:

pre-commit run pylint --all-files

Should always give the same results locally and in Travis.

* Update scripts/ci/_utils.sh

Co-Authored-By: Felix Uellendall <feluelle@users.noreply.github.com>
2019-12-02 19:37:23 +01:00
Tomek e036827c65 [AIRFLOW-6133] Make Hive transfer operators pylint compatible (#6695)
* [AIRFLOW-6133] Make Hive transfer operators pylint compatible
2019-12-01 21:39:47 +01:00
Tomek f88f06c862 [AIRFLOW-6131] Make Cassandra hooks/sensors pylint compatible (#6693)
* [AIRFLOW-6131] Make Cassandra hooks/sensors pylint compatible
2019-11-30 16:58:04 +01:00
Rich Dean f987646d7d [AIRFLOW-5950] AIP-21 Change import paths for "apache/cassandra" modules (#6609) 2019-11-22 09:38:52 +01:00
Rich Dean fab957e763 [AIRFLOW-6022] Move FS defn into awk BEGIN (#6619) 2019-11-21 07:40:43 +01:00
Rich Dean 504cfbac1a [AIRFLOW-5783] AIP-21 Move aws redshift into providers structure (#6539) 2019-11-18 09:16:36 +01:00
bolkedebruin 6a853db37b [AIRFLOW-6002] Drop support for python 3.5 (#6595) 2019-11-18 00:05:13 +01:00
david cf38ddc057 [AIRFLOW-5873] KubernetesPodOperator fixes and test (#6524)
- `security_context` was missing from docs of `KubernetesPodOperator`
- `KubernetesPodOperator` kwarg `in_cluster` erroneously defaults to
False in comparison to `default_args.py`, also default `do_xcom_push`
 was overwritten to False in contradiction to `BaseOperator`
- `KubernetesPodOperator` kwarg `resources` is erroneously passed to
 `base_operator`, instead should only go to `PodGenerator`. The two
 have different syntax. (both on `master` and `v1-10-test` branches)
- `kubernetes/pod.py`: classes do not have `__slots__`
 so they would accept arbitrary values in `setattr`
- Reduce amount of times the pod object is copied before execution
2019-11-12 22:05:27 +01:00
Jarek Potiuk 75a43ccd0c
[AIRFLOW-5887] User is removed from CI images (#6540)
The AIRFLOW_USER is not needed any more in CI images. It will be needed in Prod
images but it will be implemented differently there.
2019-11-12 21:47:20 +01:00
Jarek Potiuk f2473b320f
[AIRFLOW-5885] List of tests is generated dynamically after you enter Breeze (#6536)
The list of tests for autocomplete is now generated automatically when you enter Breeze.

It will take some 40 seconds or so to generate the list and until it's done there are
no autocompletions but they appear right after the list is ready.
2019-11-12 16:20:07 +01:00
Cyril Shcherbin 3d76fb4bf2 [AIRFLOW-5782] Migrate AWS Lambda to /providers/amazon/aws [AIP-21] (#6518)
* [AIRFLOW-5782] Migrate AWS Lambda to /providers/aws [AIP-21]
2019-11-09 16:03:41 +01:00
Jarek Potiuk 1b3af10246 Revert "[AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing (#6496)"
This reverts commit 8e789a33a3.
2019-11-07 13:36:05 +01:00
Jarek Potiuk 8e789a33a3
[AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing (#6496)
* [AIRFLOW-5704] Improve Kind Kubernetes scripts for local testing

* Fixed problem that Kubernetes tests were testing latest master
  rather than what came from the local sources.
* Moved Kubernetes scripts to 'in_container' dir where they belong now
* Kubernetes tests are now better suited for running locally
* Kubernetes cluster is not deleted until environment is stopped
* Kubernetes image is built outside of the container and passed as .tar
* Kubectl version name is corrected in the Dockerfile
* Kubernetes Version can be used to select Kubernetes versio
* Running kubernetes scripts is now easy in Breeze
* Instructions on how to run Kubernetes tests are updated
* Better flags in Breeze are used to run Kubernetes environment/tests
* The old "bare" environment is replaced by --no-deps switch
2019-11-06 17:25:11 +01:00
Jarek Potiuk d4ff529743
[AIRFLOW-5829] Get rid of the checklicence image (#6495)
This change is a further step of simplifying the set of scripts
used by CI. The separate checklicence image was implemented as an
optimisation of the licence check time. The image to download was
small and could be downloaded slightly faster in CI. However that
made all the management script more complex and lead to having
separate jobs for check licence and static checks. That lead to
actually longer time of Travis jobs - because new machine had to
be spun-off for checklicence check only.

With this change, the CI image is the only one left and it is slightly
bigger (with RAT tool added) but the same image is used for all the
tests - unit tests, static checks and checklicence checks.

This also makes it easier to manage the images and decreases update
overhead on the developers using Breeze.
2019-11-06 10:31:20 +01:00
Felix Uellendall 5d3a5db051 [AIRFLOW-5683] Add propagate_skipped_state to SubDagOperator (#6352)
- fix pylint issues
- refactor subdag_operator
2019-11-05 22:12:38 -08:00
Jarek Potiuk b4c7538b86
[AIRFLOW-5830] Get rid of slim image (#6494)
The slim image gave only very small gain on executing the tests in CI. The
image was significantly smaller, but then for local development and testing
you needed both full CI and SLIM-CI image.

This made the scripts and docker image needlessly complex - especially
in the wake of coming Production image it turned to be premature
optimisation really. While it sped-up (slightly - by 10-20 seconds) some
static check jobs in Travis, it increased time needed by developers
to have a working environment and to keep it updated every time it was
needed (by minutes)

Also having two separately managed images made it rather complex to join
some of the Travis CI jobs (there is a follow-up change with getting rid
of Checklicence image).

With this change both static checks and tests are executed using single
image. That also opens doors for further simplification of the scripts
and easier implementation of production image.
2019-11-05 22:30:00 +01:00
Tomek 0b42d9ddee [AIRFLOW-5852] Make tests.www pylint compatible (#6504) 2019-11-05 19:52:03 +01:00
Tomek eeec376b57 [AIRFLOW-5838] Make all __init__ pylint compatible (#6503) 2019-11-05 11:39:23 +01:00
Jarek Potiuk d2595de91d
[AIRFLOW-5826] Added auto-generation of breeze output in BREEZE.rst (#6490)
This is needed to keep breeze --help in sync with the documentation.

It makes it easier for the follow-up changes needed for production
image to keep the docs in sync with the code.
2019-11-04 10:37:31 +01:00
Ishan Rastogi 71cbe7e9bd [AIRFLOW-5787] Moving AWS SQS to /providers/aws (#6474) 2019-10-31 09:48:16 +01:00
Bas Harenslak 59b6d8bf10 [AIRFLOW-5773] Migrate AWS Athena components to /providers/aws [AIP-21] (#6446) 2019-10-28 20:20:34 +00:00
Kamil Breguła 4440d5e56d [AIRFLOW-5764][depends on #6434] Avoid loading corrupted DAGs in a breeze environment (#6436) 2019-10-26 22:54:00 +02:00
Jarek Potiuk 7e440dab11 [AIRFLOW-5754] Improved RAT checking (#6429)
All files are mounted in CI now and checked using the RAT tool.
As opposed to only the runtime-needed files. This is enabled for CI
build only as mounting all local files to Docker (especially on Mac)
has big performance penalty when running the checks (slow osxfs
volume and thousands of small node_modules files generated make the
check runs for a number of minutes). The RAT checks will by default
use the selective volumes but on CI they will mount the whole
source directory.

Also latest version of RAT tool is used now and the output - list
of checked files - is additionally printed as output of the RAT
check so that we are sure the files we expect to be there, are
actually verified.
2019-10-25 09:34:39 +01:00
Jarek Potiuk 10c3f7f0ed
[AIRFLOW-5649] Skips tests when relevant .py files are not changed (#6321) 2019-10-18 10:49:58 +02:00
Gerardo Curiel e62056b225 [AIRFLOW-5223] Use kind for Kubernetes in CI (#5837)
This PR reimplements Kubernetes integration testing using kind,
a tool for running local Kubernetes clusters using Docker container
"nodes". The "nodes" are deployed to a separate docker daemon
(dind) started through docker-compose.
2019-10-15 12:56:09 +02:00
arkadiuszbach 8cbfd93059 [AIRFLOW-4661] Make airflow/config_templates Pylint compatible (#6300) 2019-10-14 11:16:37 +02:00
Felix Uellendall 3ed7b32775 [AIRFLOW-3783] Speed up Redshift to S3 UNload with HEADERs (#6309)
replace the default unload_option 'PARALLEL OFF' by 'HEADER' as Redshift handles
header with parallel mode now

Co-authored-by: Shreya Chakraborty <shrechak@users.noreply.github.com>
2019-10-14 10:00:44 +01:00
Jarek Potiuk 10d39eff25
[AIRFLOW-XXXX] Google Season of Docs updates to CONTRIBUTING doc (#6283)
Co-authored-by: Elena Fedotova <lavel@mail.ru>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kaxil Naik <kaxilnaik@gmail.com>
Co-Authored-By: Ash Berlin-Taylor <ash_github@firemirror.com>
2019-10-13 22:20:31 +02:00
arkadiuszbach 00ef8cb928 [AIRFLOW-4660] Make airflow/bin Pylint compatible (#6294) 2019-10-09 15:23:12 +02:00
Jarek Potiuk bf4cea0b2f [AIRFLOW-5585] Remove docker context from build 2019-10-04 18:13:06 +02:00
Kevin Yang d719e1fd67 [AIRFLOW-5362] Reorder imports (#5944) 2019-10-02 16:30:03 +01:00
Quentin Lemaire d70c5fd417 [AIRFLOW-5408] Fix env variable name in Kubernetes template 2019-09-30 17:05:35 +02:00
Marek Šuppa 781d001863 [AIRFLOW-5280] conn: Remove aws_default's default region name (#5879)
The `aws_default` by default specifies the `region_name` to be
`us-east-1` in its `extra` field. This causes trouble when the desired
AWS account uses a different region as this default value has priority
over the $AWS_REGION and $AWS_DEFAULT_REGION environment variables,
gets passed directly to `botocore` and does not seem to be documented.

This commit removes the default region name from the `aws_default`'s
extra field. This means that it will have to be set manually, which
would follow the "explicit is better than implicit" philosophy.
2019-09-30 09:52:09 +01:00
Jarek Potiuk 30c442c9b8 [AIRFLOW-5537] Yamllint is not needed as dependency on host
It used to be needed for pre-commits but is not needed any more
as it is automatically installed as dependency in the virtualenv
created by pre-commit
2019-09-22 19:47:44 +01:00
Jarek Potiuk f63e4e37d0 [AIRFLOW-5536] Better handling of temporary output files 2019-09-22 19:47:44 +01:00
Jarek Potiuk 511615c884 [AIRFLOW-5535] Fix name of VERBOSE parameter 2019-09-22 19:47:44 +01:00
Jarek Potiuk 1815ef32d8 [AIRFLOW-5533] Fixed failing CRON build
This change optimises further image building and removes unnecessary
verbosity in building the images for CI builds.

After this change is merged, only the necessary images are built for
each type of check:
* Tests -> only CI
* Static checks (with/without pylint) -> Only CI_SLIM
* Docs -> only CI_SLIM
* Licence checks -> Only CHECKLICENCE

Previously the right images only were built in ci_before_install.sh
but then in case of static checks, the pre-commit build image step
also rebuilt CHECKLICENCE and CI images - which was not necessary
and very long in case of CRON job - this caused the CRON job to
fail at 10m of inactivity.
2019-09-22 19:47:44 +01:00
Hao Liang 0a505b6136 [AIRFLOW-XXX] Fix typo and format error (#6149) 2019-09-21 12:56:02 +08:00
Jarek Potiuk 04da038100
[AIRFLOW-XXX] Update documentation about variables forcing answer (#6158) 2019-09-20 16:59:54 +01:00
Andrei deec7548c2 [AIRFLOW-5147] extended character set for for k8s worker pods annotations (#5819)
* [AIRFLOW-5147] extended character set for for k8s worker pods annotations

* updated UPDATING.md with new breaking changes

* excluded pylint too-many-statement check from constructor due to its nature
2019-09-18 09:49:00 -07:00
Jarek Potiuk 857788e305
[AIRFLOW-5369] Adds interactivity to pre-commits (#5976)
This commit adds full interactivity to pre-commits. Whenever you run pre-commit
and it detects that the image should be rebuild, an interactive question will
pop up instead of failing the build and asking to rebuild with REBUILD=yes

This is much nicer from the user perspective. You can choose whether to:
1) Rebuild the image (which will take some time)
2) Not rebuild the image (this will use the old image with hope it's OK)
3) Quit.

Answer to that question is carried across all images needed to rebuild.
There is the special "build" pre-commit hook that takes care about that.

Note that this interactive question cannot be asked if you run only
single pre-commit hook with Dockerfile because it can run multiple processes
and you can start building in parallel. This is not desired so instead we fail
such builds.
2019-09-18 13:43:30 +02:00
Jarek Potiuk 4780105798 [AIRFLOW-5256] Related pylint changes for common licences in python files (#5786) 2019-09-17 13:16:32 +02:00
Tomek Urbaszek b07cb439a0 [AIRFLOW-5457] Move GCS operators to core 2019-09-11 17:22:04 +01:00
Tomek Urbaszek 766ebfe780 [AIRFLOW-5455] Move BigQuery operators to core
For more information check AIP-21.
2019-09-11 17:22:04 +01:00
Jarek Potiuk e399d0c2d5
[AIRFLOW-5440] Static checks from docker file use dumb-init (#6056)
This is needed so that you can easily kill such checks with ^C
Not doing it might cause your docker containers run for a long time
and take precious resources.
2019-09-11 01:47:21 +01:00
Jarek Potiuk 455eb41ba6
[AIRFLOW-5437] Better python version detection/explanation. (#6060)
We have fairly complex python version detection in our CI scripts.

They have to handle several cases:

1) Running builds on DockerHub (we cannot pass different environment
   variables there, so we detect python version based on the image
   name being build (airflow:master-python3.7 -> PYTHON_VERSION=3.7)

2) Running builds on Travis CI. We use python version determined
   from default python3 version available on the path. This way we
   do not have to specify PYTHON_VERSION separately in each job,
   we just specify which host python version is used for that job.
   This makes a nice UI experience where you see python version in
   Travis UI.

3) Running builds locally via scripts where we can pass PYTHON_VERSION
   as environment variable.

4) Running builds locally for the first time with Breeze. By default
   we determine the version based on default python3 version we have
   in the host system (3.5, 3.6 or 3.7) and we use this one.

5) Selecting python version with Breeze's --python switch. This will
   override python version but it will also store the last used version
   of python in .build directory so that it is automatically used next
   time.

This change adds necessary explanations to the code that works for
all the cases and fixes some of the edge-cases we had. It also
extracts the code to common directory.
2019-09-10 10:16:10 +02:00
Jarek Potiuk f116faf7c0
[AIRFLOW-5437] Do not override python when you rebuild ci_slim image (#6053) 2019-09-08 11:55:29 +02:00
Daniel Imberman 50523ea914 fix postrgres bug 2019-09-07 16:57:21 +02:00
Daniel Imberman ddf2a231a2 pre-load requirements for airflow image 2019-09-07 16:57:21 +02:00
Jarek Potiuk 35e7b622c2 [AIRFLOW-5411] Remove the noise produced while running failed pre-commits 2019-09-06 14:35:24 +02:00
Jarek Potiuk 6f6112e262 [AIRFLOW-5405] Fixed Unbound variable in force build 2019-09-04 23:07:35 +02:00
Omkar Desai 13843151fb [Airflow-4668] Make airflow/contrib/utils Pylint compatible (#5916) 2019-09-04 09:23:57 +01:00
Hao Liang f497d1d5aa [AIRFLOW-4858] Deprecate "Historical convenience functions" in airflow.configuration (#5495)
1. Issue old conf method deprecation warnings properly and remove current old conf method usages.
2. Unify the way to use conf as `from airflow.configuration import conf`
2019-09-03 17:08:55 +01:00
Jarek Potiuk 9d6b58d871 [AIRFLOW-5389] better organized scripts for building CI docker deps 2019-09-03 16:13:41 +02:00
Jarek Potiuk 319b80437c [AIRFLOW-5365] No need to do image rebuild when switching master/v1-10-test (#5972) 2019-09-03 11:20:25 +01:00
Jarek Potiuk 593dfb9134 [AIRFLOW-5364] Fix missing port numbers for local ci scripts 2019-08-31 09:49:26 -04:00
Hao Liang a670e5cd2c [Airflow-XXXX] Fix a comment error in _utils.sh 2019-08-29 22:58:33 -04:00
Jarek Potiuk f98867c3a8 [AIRFLOW-5329] Added shared files folder 2019-08-28 04:14:55 -04:00
Jarek Potiuk d766637a41 [AIRFLOW=5327] Fixed .bash* files mounting lost during rebase 2019-08-28 04:14:55 -04:00
Jarek Potiuk 6950a2b1cd [AIRFLOW-5325] Default python version if no python3 on path is 3.5 2019-08-28 04:14:55 -04:00
Jarek Potiuk 286aa7a581
[AIRFLOW-3611] Simplified development environment (#4932) 2019-08-27 14:39:36 -04:00
Tomek 286eb00f33 [AIRFLOW-5300] Move GcsToService operators to core (#5899)
[AIRFLOW-5300] Move GcsToService operators to core

For more information check AIP-21.
2019-08-26 23:30:08 -07:00
Tomek 7f6f2f008e [AIRFLOW-5294] Make GCP MLEngine pylint compatible (#5892)
This commit make MLEngine operators and tests pylint compatible
2019-08-23 20:37:32 -07:00
Tomek 59d371e9e1 [AIRFLOW-5297] Move AdlsToGcs operator to core (#5897)
For more information check AIP-21.
2019-08-23 20:06:07 -07:00
Tomek 52c21b402b [AIRFLOW-5298] Move FileToGcs to core (#5898)
For more information check AIP-21.
2019-08-23 20:04:34 -07:00
Jarek Potiuk 3c60a11c25
[AIRFLOW-5288] Auto-remove temporary containers for static checks (#5887) 2019-08-23 16:22:14 -04:00
Jarek Potiuk d24db825ff
[AIRFLOW-5285] Pylint pre-commit filters out pylint_todo files (#5884)
* [AIRFLOW-5285] Pylint pre-commit filters out pylint_todo files
2019-08-23 16:19:27 -04:00
Jarek Potiuk aacf9ba1a6
[AIRFLOW-5301] Remove not-yet-existing files from mounts (#5901)
This should be only merged if breeze is not yet merged.
2019-08-23 16:16:00 -04:00
Jarek Potiuk e1cb8ce99b
[AIRFLOW-5180] Added static checks (yamllint) + auto-licences for yaml file (#5790) 2019-08-22 10:13:56 -04:00
Jarek Potiuk e090744787
[AIRFLOW-5206] Common licence in all .md files, TOC + removed TODO.md (#5809) 2019-08-21 23:27:54 -04:00
Tomek cfaf90175a [AIRFLOW-5202] Move GCP MLEngine to core (#5805)
This commit moves GCP MLEngine from contrib to core.
For more information check AIP-21.
2019-08-21 10:58:19 +02:00
Jarek Potiuk a317cd22b1 [AIRFLOW-5247] Move NPM dependencies up in the Dockerfile (#5870) 2019-08-20 11:41:51 +02:00
Jarek Potiuk 5e36f421b0
[AIRFLOW-5263] Show diff on failure of pre-commit checks (#5869) 2019-08-20 00:14:50 -04:00
Jarek Potiuk 64207120fd
[AIRFLOW-5204] Shellcheck + common licences + executable shebangs in shell files (#5807)
* [AIRFLOW-5204] Shellcheck + common licence in shell files
2019-08-20 00:07:39 -04:00
Osmar Coronel 0661118b59 [AIRFLOW-4665] Remove contrib/plugins from Pylint todo (#5851)
This commit intends to remove files under contrib/plugins out
of the Pylint todo list.
2019-08-19 12:23:49 +01:00
Jarek Potiuk 6ad628cec9 [AIRFLOW-5248] Pylint fixes related to source constructor param removal 2019-08-18 19:40:07 -04:00
Omkar Desai 513d10f632 [AIRFLOW-4667] Make airflow/contrib/task_runner Pylint compatible (#5852) 2019-08-18 19:17:31 +02:00
Jarek Potiuk e515fee768 [AIRFLOW-5237] Less verbose output for CI builds (#5840) 2019-08-17 15:36:20 +01:00
Felix Uellendall 6d27ced85a [AIRFLOW-5056] Add argument to filter mails in ImapHook and related operators (#5672)
- changes the order of arguments for `has_mail_attachment`, `retrieve_mail_attachments` and `download_mail_attachments`
- add `get_conn` function
- refactor code
- fix pylint issues
- add imap_mail_filter arg to ImapAttachmentToS3Operator
- add mail_filter arg to ImapAttachmentSensor
- remove superfluous tests
- changes the order of arguments in the sensors + operators __init__
2019-08-16 18:31:29 +01:00
Daniel Imberman ef7e37c90d [AIRFLOW-5235] Fixes bug where K8s CI does not properly create user (#5838) 2019-08-16 16:01:01 +01:00
Jarek Potiuk 5cfe9c29a0
[AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems (#5835)
* [AIRFLOW-5233] Fixed consistency in whitespace (tabs/eols) + common problems
2019-08-16 10:35:34 -04:00
Jarek Potiuk 3fac1bd04a
[AIRFLOW-5229] Consistent licences to all other files (#5831) 2019-08-15 20:02:53 -04:00
Jarek Potiuk 70e937a8d8
[AIRFLOW-5161] Static checks are run automatically in pre-commit hooks (#5777) 2019-08-14 20:53:28 -04:00
Felix Uellendall 571ffcc97f [AIRFLOW-4686] Make dags Pylint compatible (#5753) 2019-08-13 03:26:50 +02:00
Jarek Potiuk 8cf0635793
[AIRFLOW-5159] Checklicence image is not built when not needed (#5774) 2019-08-10 18:11:51 +03:00
Jarek Potiuk a4e3295e19
[AIRFLOW-5143] Caching works for Checklicence images (#5762) 2019-08-08 23:22:57 +02:00
Bas Harenslak d2038d22c5 [AIRFLOW-4690] Make tests/api Pylint compatible (#5413) 2019-08-08 08:57:27 +02:00
Chao-Han Tsai 0be39219cd [AIRFLOW-4509] SubDagOperator using scheduler instead of backfill (#5498)
Change SubDagOperator to use Airflow scheduler to schedule
tasks in subdags instead of backfill.

In the past, SubDagOperator relies on backfill scheduler
to schedule tasks in the subdags. Tasks in parent DAG
are scheduled via Airflow scheduler while tasks in
a subdag are scheduled via backfill, which complicates
the scheduling logic and adds difficulties to maintain
the two scheduling code path.

This PR simplifies how tasks in subdags are scheduled.
SubDagOperator is reponsible for creating a DagRun for subdag
and wait until all the tasks in the subdag finish. Airflow
scheduler picks up the DagRun created by SubDagOperator,
create andschedule the tasks accordingly.
2019-08-07 21:17:50 +02:00
Ishan Rastogi 157170ba4c [AIRFLOW-5003] Making AWS Hooks pylint compatible (#5627) 2019-08-07 17:31:54 +02:00
Jarek Potiuk 9267c5e19e
[AIRFLOW-5083] Move image building to before_install for licence (#5695) 2019-08-06 15:34:18 +02:00
Jarek Potiuk 8b41c3f129
[AIRFLOW-5051] Better coverage integration (#5732) 2019-08-06 15:03:18 +02:00
Jarek Potiuk f98428c379
[AIRFLOW-5108] More informative message when kerberos in ci fails (#5719) 2019-08-05 15:18:03 +02:00
Jonathan de Bruin 281298f434 [AIRFLOW-5101] Fix inconsistent owner value in examples (#5712) 2019-08-03 09:37:47 +02:00
Jarek Potiuk c80db83604
[AIRFLOW-5085] we always pass the default branch name to the build (#5699)
TRAVIS_BRANCH is set to TAG when TAG build runs. We should alwayss
use branch and we already have our current branch in
hooks/_default_branch.sh and we can use it from there.

This seems to be the only way as TRAVIS does not pass the branch
in any variable - mainly because we do not know what branch we
are in when building a TAG build
2019-08-01 14:29:36 +02:00
Jarek Potiuk 1031cc827b
[AIRFLOW-5092] Local CI pull and build also pulls python image (#5705)
Needed as the pulled image will usually be rebuilt using the
latest python version.
2019-08-01 14:14:27 +02:00
Jarek Potiuk da938a1ee0
[AIRFLOW-5078] User is asked if an image needs to be rebuild (#5691)
This is not happening when the user explicitely wants to build image
or in CI environment (DockerHub always builds the image via
hooks/build script.
2019-07-31 09:50:31 +02:00
Jarek Potiuk b460e5dd1a
[AIRFLOW-5079] Checklicence test uses own, much smaller image (#5692) 2019-07-31 09:48:23 +02:00
Jarek Potiuk 27c79582ba
[AIRFLOW-5077] Skip force pulling latest python in CI environment (#5690)
The latest python will only be pulled by DockerHub when building
master/v1-10-test - which means that it will eventually catch
up with the latest python security releases but it will not
slow down the CI builds.
2019-07-31 09:12:17 +02:00
Ash Berlin-Taylor b5b9bc1e79
[AIRFLOW-XXX] Remove default/wrong values from test config. (#5684)
Most of the values I've removed here are the current defaults, so we
don't need to specify them again.

The reason I am removing them is that `email_backend` of
`airflow.utils.send_email_smtp` has been incorrect since 1.7.2(!) but
hasn't mattered until #5379 somehow triggered it. By removing the
default values it should make it easier to update in future.
2019-07-30 14:37:12 +01:00
Felix Uellendall fc99998212 [AIRFLOW-5057] Provide bucket name to functions in S3 Hook when none is specified (#5674)
Note: The order of arguments has changed for `check_for_prefix`.
The `bucket_name` is now optional. It falls back to the `connection schema` attribute.
- refactor code
- complete docs
2019-07-30 10:05:02 +02:00
Joshua Carp be0c9901dd
Reorganize sql to gcs operators. (#5504) 2019-07-29 10:50:17 -04:00
Jarek Potiuk 7e498b48f0
[AIRFLOW-5063] Fix performance when switching between master/v1-10 (#5677) 2019-07-29 16:15:55 +02:00
Jarek Potiuk 817cf5b3b1
[AIRFLOW-5064] Switched to python 3.5 (#5678) 2019-07-29 15:27:42 +02:00
Felix Uellendall 80d87923c6 [AIRFLOW-XXX] Ignore rbac node_modules when running pylint (#5670) 2019-07-28 16:23:30 +02:00
Jarek Potiuk 347dda7b98
[AIRFLOW-5041] just force PYTHON_VERSION variable (#5660)
There is no need for python3.6 to be installed in the host.
2019-07-25 16:32:20 +02:00
Jarek Potiuk 94209a8ec9
[AIRFLOW-5001] Moving building image to before_install phase (#5648)
(cherry picked from commit 15d78b723db3bf05f845025fcceafe3170563063)
2019-07-24 10:24:57 +02:00
Jarek Potiuk 96148478ef
[AIRFLOW-5005] Split kubernetes tests into separate jobs (#5625)
(cherry picked from commit 87150e26fb3912dadaaa50b073d5f95ad4df1b0a)
2019-07-24 08:34:14 +02:00
Jarek Potiuk 7a6990a48c
[AIRFLOW-5002] Diagnostics of getopt fixed for zsh on MacOS (#5623) 2019-07-24 01:10:21 +02:00
Jarek Potiuk c6eb8d8e07
[AIRFLOW-4999] Local build and build_and_pull work on both images (#5621)
(cherry picked from commit e054f146cca9c07f753a6e7da29a26d4289d24e8)
2019-07-23 23:13:03 +02:00
Jarek Potiuk 207e54f9a9
[AIRFLOW-4997] Support for non-master branches (#5620)
(cherry picked from commit 98c17d97947ef58b3dbc11b341c67c4ca562d5a7)
2019-07-23 09:08:43 +02:00
Jarek Potiuk a53da88822
[AIRFLOW-5014] Fix sphinx doc problem and leaves API docs (#5636)
This change fixes autodoc generated documentation problems but also
leaves generated .rst files in _api folder so that it is easier to
debug and fix problems like that in the future.
2019-07-22 13:17:08 +02:00
Jarek Potiuk 7b56198126
[AIRFLOW-5007] Remove override of python version to 3.6 in tests (#5628) 2019-07-21 18:53:06 +02:00
Kamil Breguła 96933b0797 [AIRFLOW-4952] Remove unused arguments in tests (#5586) 2019-07-20 11:00:26 +02:00
Joshua Carp 30defe130d [AIRFLOW-3998] Use nested commands in cli. (#4821) 2019-07-19 08:40:14 +01:00
Jarek Potiuk 2d086d77f1
[AIRFLOW-4117] Travis CI uses multi-stage images to run tests (#4938) 2019-07-17 22:42:43 +02:00
Kamil Breguła fe20a9aa01 [AIRFLOW-4945] Use super() syntax (#5579) 2019-07-13 21:11:11 +02:00
Tomek f06ae8fbe9 [AIRFLOW-4882] Make GCP tests and examples Pylint compatible (#5522) 2019-07-13 13:24:40 +02:00
Facu b516183d68 [AIRFLOW-4868] Fix typo in kubernetes/docker/build.sh (#5505) 2019-07-11 11:33:35 +01:00
Kamil Breguła 2758cd1fdd
[AIRFLOW-4840] Fix pylint errors regarding logging-format-interpolation (#5466) 2019-06-28 22:34:58 +02:00
Tomek 8c4633c9f4 [AIRFLOW-4859] Extend list of pylint good-names (#5496)
Nearly 10% of pylint errors are related to invalid-name of variable.
So this commit propose to add cm, db, f, dr, op to pylint good-names.
2019-06-27 21:19:57 +02:00
Ash Berlin-Taylor 8481bb7ab6
[AIRFLOW-XXX] Dump logs in case of kube failure (#5472)
Previously we were only dumping the logs in case of _success_, which was
somewhat pointless
2019-06-26 11:35:02 +01:00
Tomek 7d904467d6 [AIRFLOW-4782] Make GCP hooks Pylint compatible (#5431) 2019-06-24 17:44:13 +02:00
Kamil Breguła 0d38bf40e5 [AIRFLOW-4837] Fix pylint errors regarding ungrouped imports (#5464) 2019-06-24 00:01:47 +02:00
Kamil Breguła 45217d7d5f [AIRFLOW-4818] Remove valid files from pylint_todo.txt (#5439) 2019-06-20 05:12:13 +02:00
Kamil Breguła e77d78db9e [AIRFLOW-4817] Remove deprecated methods from tests (#5438) 2019-06-20 04:56:44 +02:00
Tomek 62ebc7d61a [AIRFLOW-4784] Make GCP operators Pylint compatible (#5432) 2019-06-19 21:25:14 +02:00
Tomek 6c74815e71 [AIRFLOW-4807] Make GCS operators, hooks, sensors Pylint compatible (#5434) 2019-06-19 12:45:37 +02:00