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

470 Коммитов

Автор SHA1 Сообщение Дата
Noël Bardelot ae035cdb69
[AIRFLOW-6987] Avoid creating default connections (#7629) 2020-03-16 11:09:29 +01:00
Jarek Potiuk 271ee6477b
[AIRFLOW-7058] Add support for different DB versions (#7717) 2020-03-14 23:57:47 +01:00
Jarek Potiuk dced43bee9
[AIRFLOW-6946] Switch to MySQL 5.7 in 2.0 as base (#7570)
Switch to MySQL 5.7 in tests.

Fixes the utf8mb4 encoding issue where utf8mb4 encoding
produces too long keys for mysql to handle in XCom table.

You can optionally specify a separate option to set
encoding differently for the columns that are part of the
index - dag_id, task_id and key.
2020-03-14 22:24:03 +01:00
Bas Harenslak 5f784ae5c0
[AIRFLOW-7061] Rename openfass to openfaas (#7721) 2020-03-14 10:47:50 +01:00
Jarek Potiuk 2bc020c431
[AIRFLOW-7055] Verbose logging option for google provider (#7711) 2020-03-14 08:10:59 +01:00
Ash Berlin-Taylor ef71ac6a22
[AIRFLOW-7029] Use separate docker image for running license check (#7678)
Each stage of the CI tests needs to pull our `ci` image. By removing
java from it we can save 1-2minutes from each test stage. This is part
of that work.
2020-03-13 18:54:22 +00:00
Jarek Potiuk a86924f0e0
[AIRFLOW-7054] Breeze has an option now to reset db at entry (#7710) 2020-03-13 16:08:16 +01:00
Jarek Potiuk 289bc80cbc
[AIRFLOW-7056] Selective backport packages build (#7712) 2020-03-13 12:37:48 +01:00
Jarek Potiuk 421e7a26dd
[AIRFLOW-7047] Fixe build providers dependencies pre-commit on Mac (#7705) 2020-03-12 15:40:27 +01:00
Jarek Potiuk 6cc9d817fa
[AIRFLOW-7013] Automated check if Breeze image needs to be pulled (#7656) 2020-03-12 09:48:24 +01:00
Kaxil Naik 6539af34ed
[AIRFLOW-XXXX] Wrap line under 90 characters (#7701) 2020-03-12 08:19:25 +01:00
Kaxil Naik a251ae9a7e
[AIRFLOW-XXXX] Change CONTRIBUTING.md to CONTRIBUTING.rst (#7695) 2020-03-12 08:11:07 +01:00
Kaxil Naik facd59b406
[AIRFLOW-XXXX] Remove already solved items from pylint_todo.txt (#7697) 2020-03-12 01:52:06 +00:00
Tomek Urbaszek 1f77f943d5
[AIRFLOW-6980] Improve system tests and building providers package (#7615)
This PR removes initdb from system tests setup as it seems unneccessary operation.
Also some automatic code changes has been added before building providers package.

fixup! [AIRFLOW-6980] Improve system tests and building providers package

fixup! [AIRFLOW-6980] Improve system tests and building providers package

fixup! fixup! [AIRFLOW-6980] Improve system tests and building providers package
2020-03-10 14:05:08 +01:00
Jarek Potiuk e2711af83d
[AIRFLOW-7015] Detect Dockerhub repo/user when building on Dockerhub (#7673) 2020-03-10 12:44:14 +01:00
Jarek Potiuk 29e848d846
[AIRFLOW-7018] fixing travis's job name escaping problem (#7668) 2020-03-09 17:55:18 +01:00
Jarek Potiuk 3aca396294
[AIRFLOW-7010] Skip in-container checks for Dockerhub builds (#7652) 2020-03-09 10:00:10 +01:00
Jarek Potiuk 42eef38217
[AIRFLOW-6877] Add cross-provider dependencies as extras (#7506)
Cross-provider dependencies are now extras in the backport
packages.
2020-03-07 20:55:27 +01:00
Jarek Potiuk cad20c28da
[AIRFLOW-5842] Swtch to Debian buster image as a base (#7647) 2020-03-07 20:20:05 +01:00
Jarek Potiuk 265282cf6b
[AIRFLOW-7005] Added exec command to Breeze (#7649) 2020-03-07 20:18:51 +01:00
Kamil Breguła 609707eddf
[AIRFLOW-6967] Add tests to avoid performance regression in DagFileProcessor (#7602) 2020-03-07 19:13:00 +01:00
Jarek Potiuk 680f767592
[AIRFLOW-7002] Get rid of yaml "parser" in bash (#7646)
Mounts in docker compose file is now generated from an env variable
2020-03-07 18:12:28 +01:00
Jarek Potiuk c2a47c4446
[AIRFLOW-7006] Fix missing +e in Breeze script (#7648) 2020-03-07 17:48:15 +01:00
Jarek Potiuk d18513ceb1
[AIRFLOW-5828] Move build logic out from hooks/build (#7618)
This is the final step of simplifying the Breeze scripts by
moving all the logic out from Travis' hooks/build
2020-03-07 16:09:06 +01:00
Tomek Urbaszek ff38e15776
[AIRFLOW-6984] Improve setup/teardown in SFTP-GCS system tests (#7623) 2020-03-06 15:33:16 +01:00
Kamil Breguła a6e5bcd591
[AIRFLOW-6972] Shorter frequently used commands in Breeze (#7608) 2020-03-04 01:21:11 +01:00
Tomek Urbaszek fae99e1c39
[AIRFLOW-XXXX] Add -- to rm in install_released_airflow_version (#7548)
Adding this -- after rm -f helps in case when you have some weird
files that have spaces and -W in names.
2020-02-29 18:02:42 +01:00
Jarek Potiuk d0d8732a84
[AIRFLOW-6932] Add restart-environment command to Breeze (#7557)
When you switch between versions of Aiflow installed, you want to delete the
database so that the scripts for resetdb work
2020-02-27 10:44:43 +01:00
Ash Berlin-Taylor 513b154747
[AIRFLOW-6454] And script to benchmark scheduler dag-run time (#7537)
This script will run the SchedulerJob for the specified dags "to completion".

That is it creates a fixed number of DAG runs for the specified DAGs (from
the configured dag path/example dags etc), disable the scheduler from
creating more, and then monitor them for completion. When the file task of
the final dag run is completed the scheduler will be terminated.

The aim of this script is to have a benchmark for real-world scheduler
performance -- i.e. total time take to run N dag runs to completion.

It is recommended to repeat the test at least 3 times so that you can get
somewhat-accurate variance on the reported timing numbers.
2020-02-27 09:37:19 +00:00
Pete DeJoy 676c8515f7
[AIRFLOW-6843] Add delete_option_kwargs to delete_namespaced_pod (#7523) 2020-02-26 18:59:27 +00:00
Jarek Potiuk 83b60f0946
[AIRFLOW-6919] Make Breeze DAG-test friedly (#7539)
Originally Breeze was used to run unit and integration tests, recently system
tests and finally we make it a bit more friendly to test  your DAGs there. You
can now install any older airflow version in Breeze via
--install-airflow-version switch and "files/dags" folder is mounted to
"/files/dags" and this folder is used to read the dags from.
2020-02-26 11:11:53 +01:00
Tomek Urbaszek 311140616d
[AIRFLOW-6864] Make airfow/jobs pylint compatible (#7484)
fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible
2020-02-25 22:06:46 +01:00
Jarek Potiuk 20b6b34392
[AIRFLOW-6838] Introduce real subcommands for Breeze (#7515)
This change introduces sub-commands in breeze tool.
It is much needed as we have many commands now
and it was difficult to separate commands from flags.

Also --help output was very long and unreadable.

With this change help it is much easier to discover
what breeze can do for you as well as navigate with it.

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Kamil Breguła <mik-laj@users.noreply.github.com>
2020-02-24 22:31:50 +01:00
Jarek Potiuk ccb2899e5b
[AIRFLOW-6663] Prepare backporting packages (#7391) 2020-02-24 10:29:38 +01:00
Daniel Imberman a812f48052
[AIRFLOW-6062] Executor would only delete workers in its own namespace (#7123)
* [AIRFLOW-6062] Executor would only delete pods in its own namespace

* add tests

* clean up PR

* static tests

* Update airflow/executors/kubernetes_executor.py

Co-Authored-By: Kaxil Naik <kaxilnaik@gmail.com>

* Update airflow/executors/kubernetes_executor.py

Co-Authored-By: Kaxil Naik <kaxilnaik@gmail.com>

* Update airflow/executors/kubernetes_executor.py

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-02-23 08:40:05 -08:00
Vanessasaurus 0bb687990b
[AIRFLOW-4030] second attempt to add singularity to airflow (#7191)
* adding singularity operator and tests

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* removing encoding pragmas and fixing up dockerfile to pass linting

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* make workdir in /tmp because AIRFLOW_SOURCES not defined yet

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* curl needs to follow redirects with -L

Signed-off-by: Vanessa Sochat <vsochat@stanford.edu>

* moving files to where they are supposed to be, more changes to mock, no clue

Signed-off-by: vsoch <vsochat@stanford.edu>

* removing trailing whitespace, moving example_dag for singularity, adding licenses to empty init files

Signed-off-by: vsoch <vsochat@stanford.edu>

* ran isort on example dags file

Signed-off-by: vsoch <vsochat@stanford.edu>

* adding missing init in example_dags folder for singularity

Signed-off-by: vsoch <vsochat@stanford.edu>

* removing code from __init__.py files for singularity operator to fix documentation generation

Signed-off-by: vsoch <vsochat@stanford.edu>

* forgot to update link to singularity in operators and hooks ref

Signed-off-by: vsoch <vsochat@stanford.edu>

* command must have been provided on init of singularity operator instance

Signed-off-by: vsoch <vsochat@stanford.edu>

* I guess I'm required to have a task_id?

Signed-off-by: vsoch <vsochat@stanford.edu>

* try adding working_dir to singularity operator type definitions

Signed-off-by: vsoch <vsochat@stanford.edu>

* disable too many arguments for pylint of singularity operator init

Signed-off-by: vsoch <vsochat@stanford.edu>

* move pylint disable up to line 64 - doesnt catch at end of statement like other examples

Signed-off-by: vsoch <vsochat@stanford.edu>

* two spaces before inline comment

Signed-off-by: vsoch <vsochat@stanford.edu>

* I dont see task_id as a param for other providers, removing for singularity operator

Signed-off-by: vsoch <vsochat@stanford.edu>

* adding debug print

Signed-off-by: vsoch <vsochat@stanford.edu>

* allow for return of just image and/or lines

Signed-off-by: vsoch <vsochat@stanford.edu>

* dont understand how mock works, but the image should exist after its pulled....

Signed-off-by: vsoch <vsochat@stanford.edu>

* try removing shutil, the client should handle pull folder instead

Signed-off-by: vsoch <vsochat@stanford.edu>

* try changing pull-file to same uri that is expected to be pulled

Signed-off-by: vsoch <vsochat@stanford.edu>

* import of AirflowException moved to exceptions

Signed-off-by: vsoch <vsochat@stanford.edu>

* DAG module was moved to airflow.models

Signed-off-by: vsoch <vsochat@stanford.edu>

* ensure pull is called with pull_folder

Signed-off-by: vsoch <vsochat@stanford.edu>
2020-02-23 10:49:47 +01:00
Matt Buell 4d03e33c11
[AIRFLOW-6817] remove imports from `airflow/__init__.py`, replaced implicit imports with explicit imports, added entry to `UPDATING.MD` - squashed/rebased (#7456) 2020-02-22 08:21:19 +01:00
Tomek Urbaszek 6b90b11bfd
[AIRFLOW-6863] Make airflow/task and airflow/ti_deps pylint compatible (#7482) 2020-02-21 18:54:26 +00:00
Jarek Potiuk 848fbab5bd
[AIRFLOW-6763] Make systems tests ready for backport tests (#7389)
We will run system test on back-ported operators for 1.10* series of airflow
and for that we need to have support for running system tests using pytest's
markers and reading environment variables passed from HOST machine (to pass
credentials). 

This is the first step to automate system tests execution.
2020-02-21 18:25:32 +01:00
Jarek Potiuk 1a9a9f7618
[AIRFLOW-6842] Skip fixing ownership on Mac (#7469) 2020-02-19 21:59:54 +01:00
Jarek Potiuk d2ab8b8f5f
[AIRFLOW-6820] fixup! fix unbound variable (#7459) 2020-02-19 03:25:00 +01:00
Jarek Potiuk 24f9f11775
[AIRFLOW-6820] split breeze into functions (#7433) 2020-02-19 01:58:53 +01:00
Jarek Potiuk 03fb50aaa4
[AIRFLOW-6823] Fix root owned files automatically in Breeze (#7449) 2020-02-18 20:22:57 +01:00
Felix Uellendall d1ab3705d3
[AIRFLOW-XXXX] Fix breeze build-docs (#7445) 2020-02-17 17:34:22 +01:00
Jarek Potiuk ff7034f39a
[AIRFLOW-6816] Simplified common functions in breeze scripts (#7430) 2020-02-16 20:05:50 +01:00
Ash Berlin-Taylor cc6e46f98d
[AIRFLOW-XXXX] Speed up mypy runs. (#7421)
This PR does two things:

1. It enables the mypy cache (default folder name .mypy_cache) so that
   repeated runs locally are quicker
2. It _disables_ passing only the changed files in.

Point 2 seems counter-intuitave, but in my testing running with all
files (airflow docs tests) was about twice as fast as without. My
hypothesis for why this happens is that when mypy is checking file x, it
has to check dependencies/imports for it too, and when we have
pass_filenames set runs multiple processes in parallel, and each of them
have to do this work!

Timings before and after:

- Before:

  For all files
  ```
  ❯ time pre-commit run mypy -a
  Run mypy.................................................................Passed
  pre-commit run mypy -a  0.31s user 0.07s system 2% cpu 17.140 total
  ```

  With only a single file

  ```
  ❯ time pre-commit run mypy --files airflow/configuration.py
  Run mypy.................................................................Passed
  pre-commit run mypy --files airflow/configuration.py  0.30s user 0.07s system 5% cpu 6.724 total
  ```

- After:

  With a clean cache (`rm -rf .mypy_cache`):

  ```
  $ time pre-commit run mypy
  Run mypy.................................................................Passed
  pre-commit run mypy -a  0.26s user 0.10s system 2% cpu 17.226 total
  ```

  Clean cache with single file:

  ```
  $ time pre-commit run mypy  --file airflow/version.py
  Run mypy.................................................................Passed
  pre-commit run mypy --file airflow/version.py  0.23s user 0.07s system 4% cpu 7.091 total
  ```

  Repeated run (cache folder exists):

  ```
  $ time pre-commit run mypy  --file airflow/version.py
  Run mypy.................................................................Passed
  pre-commit run mypy --file airflow/version.py  0.23s user 0.05s system 6% cpu 4.178 total
  ```

  and for all files

  ```
  airflow ❯ time pre-commit run mypy  -a
  Run mypy.................................................................Passed
  pre-commit run mypy -a  0.25s user 0.09s system 6% cpu 4.833 total
  ```
2020-02-15 14:30:31 +00:00
Tomek Urbaszek fb00c687b6
[AIRFLOW-6590] Use batch db operations in jobs (#7370)
* [AIRFLOW-6590] Use batch db operations in jobs

The PR changes numerous single selects / updates in base,
scheduler, and backfill jobs to bulk operations.

* fixup! [AIRFLOW-6590] Use batch db operations in jobs

* fixup! fixup! [AIRFLOW-6590] Use batch db operations in jobs
2020-02-14 08:54:21 +01:00
Ash Berlin-Taylor 67463c3d8e
[AIRFLOW-6344] Fix travis CI for tag builds (#7411)
Don't try to find changed files unless we are building a pull request.
This only caused a problem on build of tags, but we were also doing this
for master/branch builds, but it was always saying finding no files
changed.

By checking this early we can make the other conditions in this function
simpler.
2020-02-13 15:30:54 +00:00
Jithin Sukumar a0fa964c5e
[AIRFLOW-6770] Run particular test using breeze CLI bug fix (#7396)
* [AIRFLOW-6770] Run particular test using breeze CLI bug fix

* [AIRFLOW-6770] Fix typo in travis config

* [AIRFLOW-6770] Fix variable name and remove unnecessary travis command
2020-02-11 11:09:18 +01:00
Jarek Potiuk 319714f07c
[AIRFLOW-6766] Fix "cannot import ensure_text" error for pre-commit (#7393)
* [AIRFLOW-6766] Fix "cannot import ensure_text" error for pre-commit

As of today Travis bundles six version 1.11.0 with their python
3.6 image and it misses ensure_text method. Bumping to 1.14+
solves the problem.
2020-02-10 13:26:44 +01:00