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

8032 Коммитов

Автор SHA1 Сообщение Дата
Jarek Potiuk 627365ab74 Revert "[AIRFLOW-XXXX] Prevent Docker cache-busting on when editing www templates (#7427)"
This reverts commit 3eb30ed12c.
2020-02-16 10:10:37 +01:00
Ash Berlin-Taylor 3eb30ed12c
[AIRFLOW-XXXX] Prevent Docker cache-busting on when editing www templates (#7427)
There is two parts to this PR:

1. Only copying www/webpack.config.js and www/static/ before running the
   asset pipeline
2. Making sure that _all_ files (not just the critical ones) have the
   same permissions.

The goal of both of these is to make sure that the docker build cache for the "expensive"
operations (installing NPM modules, running asset pipeline, installing python modules)
isn't run when it isn't necessary.
2020-02-15 20:24:35 +00: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
QP Hou edcad79b8d
[AIRFLOW-3607] fix scheduler bug related to concurrency and depends on past (#7402)
commit 50efda5c69 introduced a bug that
prevents scheduler from scheduling tasks with the following properties:

* has depends on past set to True
* has custom concurrency limit
2020-02-14 20:04:59 +00:00
peter-volkov ee1ab7697c
[AIRFLOW-6531] Initial Yandex.Cloud Dataproc support (#7252)
* [AIRFLOW-6531] Initial Yandex.Cloud Dataproc support

* [AIRFLOW-6531] Move from contrib to providers. Drop py2 support

* [AIRFLOW-6531] Add service account support to YC connection

* [AIRFLOW-6531] Use Dataproc wrapper

* [AIRFLOW-6531] Move base classes to init to test "test_providers_modules_should_have_tests"

* [AIRFLOW-6531] Add type annotations. Remove op base class

* [AIRFLOW-6531] Add cluster id to templated fields
2020-02-14 20:04:29 +01:00
QP Hou 343d38af38
[AIRFLOW-6802] Fix bug where dag.max_active_run wasn't always honored by scheduler (#7416)
commit 50efda5c69 introduced a bug that
prevents the scheduler from enforcing max active run config for all
DAGs.

this commit fixes the regression as well as the test.
2020-02-14 09:15:09 +00:00
yuqian90 df24b43370
[AIRFLOW-6800] Close file object after parsing ssh config (#7415) 2020-02-14 09:34:10 +01: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
davidshopback 920bf9096e
[AIRFLOW-XXXX] Add ShopBack as an Airflow user (#7418) 2020-02-14 08:41:02 +01:00
chandu kavar ed2f3dc4ca
[AIRFLOW-2906] Add support for DataDog's dogstatsd when emitting metrics (#7376) 2020-02-13 21:06:06 +00: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
damon09273@gmail.com 2381c820c8
[AIRFLOW-6505] Let emoji encoded properly for json.dumps() (#7399) 2020-02-13 15:11:34 +01:00
Kamil Breguła 33af616b83
[AIRFLOW-6781] Enforce example_dags and guide for Google integrations (#7404) 2020-02-13 14:22:11 +01:00
Kumpan Anton 96176273a8
[AIRFLOW-5590] Add run_id to trigger DAG run API response (#6256) 2020-02-12 23:28:31 +00:00
Cyril Shcherbin 58c3542ed2
[AIRFLOW-5231] Fix S3Hook.delete_objects method (#7375) 2020-02-12 16:44:08 +01:00
Kamil Breguła 6b19889c01
[AIRFLOW-6065] Add Stackdriver Task Handler (#6660) 2020-02-12 11:31:51 +01:00
davlum 967930c0cb
[AIRFLOW-5413] Allow K8S worker pod to be configured from JSON/YAML file (#6230)
* [AIRFLOW-5413] enable pod config from file

* Update airflow/kubernetes/pod_generator.py

Co-Authored-By: Ash Berlin-Taylor <ash_github@firemirror.com>

* Update airflow/providers/cncf/kubernetes/operators/kubernetes_pod.py

Co-Authored-By: Ash Berlin-Taylor <ash_github@firemirror.com>

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-02-11 09:47:32 -08: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
Michael Spector 1e00243014
[AIRFLOW-5176] Add Azure Data Explorer (Kusto) operator (#5785) 2020-02-10 20:20:03 +00:00
Bhavika Tekwani b7aa778b38
[AIRFLOW-6767] Correct name for default Athena workgroup (#7394)
* Change default wg name

* Change workgroup in tests
2020-02-10 17:44:54 +01:00
Jarek Potiuk 53ba6d607c
[AIRFLOW-6764] Fixed environment installation for Linux (#7390) 2020-02-10 13:36:12 +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
Tomek Urbaszek f3a43ed383
[AIRFLOW-XXXX] Add explicit info about JIRAs for code-related PRs (#7318)
* [AIRFLOW-XXXX] Add explicit info about JIRAs for code-related PRs

* fixup! [AIRFLOW-XXXX] Add explicit info about JIRAs for code-related PRs

Co-Authored-By: Jarek Potiuk <jarek@potiuk.com>

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-02-10 13:09:29 +01:00
Louis Guitton 133948532d
[AIRFLOW-XXXX] Fix typo commiter => committer (#7392)
https://github.com/apache/airflow-site/pull/247
2020-02-10 12:50:07 +01:00
Kamil Breguła 1464f16eab
[AIRFLOW-6762] Fix link to "Suggest changes on this page" (#7387) 2020-02-09 20:00:49 +01:00
Jarek Potiuk 951aa6230b
[AIRFLOW-6758] Skip git version retrieval in case of invalid git (#7382)
This happens when you have shared clone of the repository
2020-02-09 17:18:15 +01:00
Van-Duyet Le 9282185e66 [AIRFLOW-6761] Fix WorkGroup param in AWSAthenaHook (#7386)
Unknown parameter in input: "Workgroup", must be one of: QueryString, ClientRequestToken, QueryExecutionContext, ResultConfiguration, WorkGroup
2020-02-09 16:15:39 +01:00
Kaxil Naik 9e09fa3c94
[AIRFLOW-XXXX] Add Changelog & Updating.md section for 1.10.9 (#7385) 2020-02-08 16:06:15 +05:30
Kaxil Naik 288a50a0c9
[AIRFLOW-XXXX] Add Changelog for 1.10.8 (#7383) 2020-02-08 12:40:39 +05:30
Kaxil Naik 54768c899c
[AIRFLOW-XXXX] Add section for 1.10.8 in Updating.md (#7384) 2020-02-08 12:40:07 +05:30
Madison Bowden b738c9eaca
[AIRFLOW-6728] Change various DAG info methods to POST (#7364)
If the number of dags was large and/or the length of the DAG ids were too large this would exceed the maximum possible query string limit.

To work around that we have made these endpoints always make POST requests
2020-02-07 16:11:16 +00:00
Jarek Potiuk e6d0b575ed
[AIRFLOW-XXXX] Update autolabeler config (#7379) 2020-02-07 17:05:24 +01:00
Jarek Potiuk 50f01db6df
[AIRFLOW-6756] Drop also deprecated tables in reset (#7381) 2020-02-07 17:05:05 +01:00
Jarek Potiuk cf1109d661
[AIRFLOW-6755] Fix snowflake hook bug and tests (#7380) 2020-02-07 17:04:38 +01:00
Jarek Potiuk 52db2abfff
[AIRFLOW-6751] Pin Werkzeug < 1.0.0 release - 1.0.0 is not compatible (#7377) 2020-02-07 12:04:19 +01:00
Anita Fronczak f3eea3ea0e
[AIRFLOW-6683] Run REST API tests when DAGs are serialized (#7352) 2020-02-07 11:29:32 +01:00
Jarek Potiuk f46be8152a
[AIRFLOW-6737] Enable kubernetes diagnostics for all kubernetes tests (#7371)
The logs are now sent in the bash scripts when all tests are complete
2020-02-06 18:31:19 +01:00
Daniel Cohen f0c31c597a
[AIRFLOW-6695] Can now pass dagrun conf when triggering dags via UI (#7312) 2020-02-06 16:46:43 +00:00
Ash Berlin-Taylor 976ec4d707
[AIRFLOW-6734] Use configured base_template instead of hard-coding (#7367)
Flask/FAB gives us a `base_template` variable that we should use instead
of hard-coding a specific template to extend.
2020-02-06 13:20:22 +00:00
Ash Berlin-Taylor 220bc0ebed
[AIRFLOW-6733] Extend not replace template (#7366)
* [AIRFLOW-6733] Extend, rather than replace, the base_template

This commit just moves the existing template to airflow/master.html
(without further changes)

* [AIRFLOW-6733] Only change blocks we have customized

This makes is easier to see which parts of the template we have changed.
2020-02-06 13:19:40 +00:00
Jarek Potiuk e84e20711c
[AIRFLOW-6738] Upload container diagnostics always (#7372) 2020-02-06 13:52:38 +01:00
Sebastian Brandt 936f7fec39
[AIRFLOW-6740] Remove Undocumented, deprecated, dysfunctional PROXY_FIX_NUM_PROXIES (#7359)
This parameter is deprecated by werkzeug, see:
https://github.com/pallets/werkzeug/blob/0.16.1/src/werkzeug/middleware/proxy_fix.py#L113-L120

However, it is also broken. The value is acquired as string from the
config, while it should be int like the other `x_*` attributes. Those
were fixed in #6901, but `num_proxies` was forgotten.

I think we can safely remove it because:

* There is virtually no possibility that someone is using that parameter
  in their config without raising an exception.
* The configuration variable is not present in Airflow's docs or
   anywhere else anymore. The removed line is the only trace of it.

More details:
https://issues.apache.org/jira/browse/AIRFLOW-6740
2020-02-06 10:24:10 +00:00
Jarek Potiuk 9e150cf17c
[AIRFLOW-XXXX] Fix location of kubernetes tests (#7373) 2020-02-05 22:51:27 +01:00
Clinton Dow 61455c69dd
[AIRFLOW-6739] Update tutorial.rst (#7369)
Traceback from sqlite3.OperationalError: no such table: slot_pool when tutorial being followed on a new installation, include the initdb step
2020-02-05 21:02:40 +01:00
Jarek Potiuk 675cc6a83a
[AIRFLOW-6736] Fix the repo/branch that is used in PRs for git sync (#7368)
Kubernetes Git test uses always apache/airflow:master as source of files

This made it impossible to test how the Kubernetes GitSync test will behave
when merged. The git sync should always be done with the original repo/branch
or from the TRAVIS_BRANCH if this is a push build
2020-02-05 20:40:18 +01:00
Kamil Breguła 2195bb45be
[AIRFLOW-XXXX] Remove "Core and community package" section (#7361) 2020-02-05 14:07:51 +01:00
Kamil Breguła a2009bd5d8
[AIRFLOW-XXXX] Add notes about airflow.providers and docs (#7360)
Co-Authored-By: Jarek Potiuk <jarek.potiuk@polidea.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-02-05 14:07:11 +01:00
Madison Bowden ea93bb6f0e
[AIRFLOW-XXXX] Add user and DAGs folder notes to BREEZE.rst (#7362)
Co-authored-by: Matthew Bowden <bowdenm@spu.edu>
2020-02-05 00:14:18 +01:00
Kamil Breguła 2bfd7f2844 Revert "[AIRFLOW-XXXX] Add note about docs/autoapi_templates/index.rst file"
This reverts commit fe6b17034f.
2020-02-04 20:44:06 +01:00
Kamil Breguła fe6b17034f
[AIRFLOW-XXXX] Add note about docs/autoapi_templates/index.rst file 2020-02-04 20:42:31 +01:00