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

9012 Коммитов

Автор SHA1 Сообщение Дата
Kamil Breguła 1459970b3b
Rename CloudBuildCreateBuildOperator to CloudBuildCreateOperator (#9314) 2020-06-15 19:27:03 +02:00
Kamil Breguła 2c18a3f3b3
Fix failing tests from #9250 (#9307) 2020-06-15 16:23:11 +02:00
Kamil Breguła d0e06efbb0
Keep consistent system test names (#9272) 2020-06-15 15:55:40 +02:00
Kamil Breguła 832593a9fc
Add /version endpoint (#9296) 2020-06-15 14:14:25 +02:00
Ash Berlin-Taylor 9312a04134
Remove duplicated log line from `db upgrade` (#9305)
Fixes these logs -- we only want one of them

    [2020-06-15 12:19:38,673]  3613796 {{airflow.utils.db db.py:610}} INFO - Creating tables
    [2020-06-15 12:19:38,673]  3613796 {{airflow.utils.db db.py:565}} INFO - Creating tables
2020-06-15 12:40:28 +01:00
Mathew Wicks c44f1b1726
Include some missing RBAC roles on User and Viewer roles (#9133) 2020-06-15 11:47:32 +01:00
Tomek Urbaszek 431ea3291c
Resolve upstream tasks when template field is XComArg (#8805)
* Resolve upstream tasks when template field is XComArg

closes: #8054

* fixup! Resolve upstream tasks when template field is XComArg

* Resolve task relations in DagRun and DagBag

* Add tests for serialized DAG

* Set dependencies only in bag_dag, refactor tests

* Traverse template_fields attribute

* Use provide_test_dag_bag in all tests

* fixup! Use provide_test_dag_bag in all tests

* Use metaclass + setattr

* Add prepare_for_execution method

* Check signature of __init__ not class

* Apply suggestions from code review

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

* Update airflow/models/baseoperator.py

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-06-15 12:29:16 +02:00
Tomek Urbaszek aee6ab94eb
Wait for pipeline state in Data Fusion operators (#8954)
* Wait for pipeline state in Data Fusion operators

fixup! Wait for pipeline state in Data Fusion operators

fixup! fixup! Wait for pipeline state in Data Fusion operators

fixup! fixup! fixup! Wait for pipeline state in Data Fusion operators

* Use quote to encode url parts

* fixup! Use quote to encode url parts
2020-06-15 12:09:00 +02:00
Igor Khrol a8cd23c8f0
Fix tree view if config contains " (#9250)
If you run DAG with `{"\"": ""}` configuration tree view will be broken:
```
tree:1 Uncaught SyntaxError: Unexpected string in JSON at position 806
    at JSON.parse (<anonymous>)
    at tree?dag_id=hightlight_test&num_runs=25:1190
```

JSON.parse is given incorrectly escaped json string.
2020-06-15 11:08:34 +01:00
Ash Berlin-Taylor e5ce87ac25
Send Celery tasks from main process when sync_parallelism is 1 (#9253)
In attempting to debug some other behaviour I discovered that we spawn a
"pool" of 1 process (main process, plus another) -- which makes it
hard to use a debugger against.

This changes it so that if a single process is configured that it is
just run directly, preserving the ability to step through with a
debugger
2020-06-15 10:16:04 +01:00
Kaxil Naik 12d39cd5b6
Make airflow/models/errors.py Pylint compatible (#9288) 2020-06-15 09:04:07 +02:00
Kaxil Naik 7c445183b9
Make experimental/endpoints.py Pylint compatible (#9287) 2020-06-14 23:17:24 +01:00
Kaxil Naik 4c7f4b40d7
Make airflow/models/skipmixin.py Pylint compatible (#9289) 2020-06-14 23:24:17 +02:00
Kaxil Naik a38c35a47f
Use actions/cache@v2 (#9293)
We upgraded to v2 in https://github.com/apache/airflow/pull/8265 for other places in `.github/workflows/ci.yml`. This was left, so fixing it.
2020-06-14 23:04:47 +02:00
Nathan Toups ffb8574037
Decrypt secrets from SystemsManagerParameterStoreBackend (#9214) 2020-06-14 17:35:59 +01:00
Kamil Breguła 2362853464
Refactor create_app in airflow/www/app.py (#9291) 2020-06-14 18:35:09 +02:00
James Timmins cef1df4ebe
Add dev script to compare GH issues against merges (#9270)
Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
2020-06-14 17:07:35 +01:00
Kaxil Naik ce589d896e
Fix cyclic imports (#9292)
Fixes the following error:
```
************* Module airflow.providers.yandex.hooks.yandex
airflow/providers/yandex/hooks/yandex.py:1:0: R0401: Cyclic import (airflow.settings -> airflow.utils.orm_event_handlers -> airflow.utils.sqlalchemy -> airflow.utils.timezone) (cyclic-import)

```
2020-06-14 16:26:53 +01:00
Kaxil Naik 2dc85a9e99
Make airflow/settings.py Pylint compatible (#9286) 2020-06-14 13:32:34 +01:00
Kaxil Naik ea7a8f7d80
Allow Lazy Logging (#9283)
It is recommended to leave string interpolation to the logging method itself. For more details, see http://www.python.org/dev/peps/pep-0282.
2020-06-14 12:49:20 +01:00
Kaxil Naik e148f34408
Merge comparisons with "in" operator in DagBag (#9281)
This is faster, less verbose, and more readable.
2020-06-14 12:48:49 +01:00
Kaxil Naik d066d33062
Remove trailing comma in setup_backport_packages.py (#9284) 2020-06-14 12:15:31 +01:00
Felix Uellendall 1698db4ac1
Update pre-commit-hooks repo version (#9195)
- use official isort pre-commit-hook
- use official yamllint pre-commit-hook
- run isort pre-commit-hook on all python files instead of files ending with py
2020-06-14 01:37:30 +01:00
Kaxil Naik 34d0c2d981
Fix Failing test for JSON Formatter on Python 3.8 (#9278) 2020-06-13 19:09:12 +01:00
Kaxil Naik f5795f1d6e
Remove generating temp remote manifest file in project dir (#9267) 2020-06-13 18:35:34 +01:00
Kaxil Naik f957de622e
Fix typo in test_dask_executor.py (#9269) 2020-06-13 07:50:14 +02:00
Kaxil Naik 6b451360c0
Add test_remove_unused_code to Quarantined test (#9268)
This test is passing locally and on breeze. Not sure of a reason why it is failing on CI
2020-06-13 07:49:52 +02:00
Chao-Han Tsai bacb05df38
Add task instance mutation hook (#8852)
* Add task instance mutation hook

* add merge

* update docs

* fix

* add missing import

* fix lint

* test state as well

* persist state

* fix lint
2020-06-12 21:03:17 -07:00
Kaxil Naik ea939ec9a7
JSON escape text in test_list_dagrun_includes_conf (#9264)
Needed because of the change in https://github.com/apache/airflow/pull/9180
2020-06-12 23:39:33 +01:00
Kaxil Naik 1ccf6bd445
Increase the number of expected queries on index view to 38 (#9263)
I am not sure what bumped this number from 37 to 38 but fixing the test for now. We can investidate it later
2020-06-12 23:34:16 +01:00
Ash Berlin-Taylor ed095981e8
Fix Azure container registry hook tests (#9262)
conn_type was enforced by #9187
2020-06-12 23:25:45 +01:00
Ash Berlin-Taylor cf5ab1d80d
Fix PagerDuty and OpsGenie tests (#9261)
conn_type was enforced by #9187
2020-06-12 23:20:27 +01:00
Kaxil Naik f00dde64f5
Fix failing TestSlackWebhookHook (#9260)
`conn_type` was enforced by #9187
2020-06-12 23:14:59 +01:00
Kaxil Naik 72c7ba9475
Fix failing TestGoogleDiscoveryApiHook & SnowflakeExampleDagsSystemTest (#9259) 2020-06-12 23:14:48 +01:00
Kaxil Naik e2a909787c
Add conn_type to Fix failing Livy Tests (#9258) 2020-06-12 22:42:04 +01:00
Ash Berlin-Taylor f90a14189a
Update (previously null) imap_default conn_type (#9256)
This is a test fixup to #9187, and updates the possibly existing
imap_default connection, and adds that hook type to the various lists
2020-06-12 22:31:24 +01:00
Kaxil Naik 63c1edb57f
Fix null conn_type for TestDiscordWebhookHook & TestGoogleApiToS3Transfer (#9257) 2020-06-12 22:30:48 +01:00
Kaxil Naik 99c534e9fa
Further validation that only task commands are run by executors (#9240) 2020-06-12 22:24:00 +01:00
Kaxil Naik 2540d9cd0a
CI: Propogate Exit Code Correctly (#9247)
This was unfortunately broken since #9138

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>
2020-06-12 15:55:58 +01:00
Kaxil Naik dcf65765e5
Use Markup for htmlcontent for landing_times (#9242) 2020-06-12 12:28:26 +01:00
Kaxil Naik c3f612dba7
Fix typo in test_connection_schema.py (#9241) 2020-06-12 08:06:19 +01:00
Kamil Breguła 5a68f54e5c
Add missing variable in run_cli_tool.sh (#9239) 2020-06-11 23:30:43 +02:00
Ephraim Anierobi ecbb366e63
Add readonly connection API endpoints (#9095)
* add connection schema with tests

* add endpoints for connection

* update patch

* update endpoint methods

* add readonly connection endpoints

* improve base schema and add tests

* update spec set connection id to string

* update type hint

* improve base schema

* add pre_load processing to return data to normal

* remove pre_load processing as it is not needed

* readonly endpoints

* improve code

* handle exception and improve code

* improve pagination test

* add nullable to spec and improve code

* remove base and add parameterized tests

* add pagination limit test
2020-06-11 21:53:36 +02:00
zikun 0682e784b1
Additional apt dependencies options in breeze (#9231) 2020-06-11 18:53:26 +02:00
Kamil Breguła f17a02d330
Add generic CLI tool wrapper (#9223)
* Add generic  CLI tool wrapper

* Pas working directory to container

* Share namespaces between all containers

* Fix permissions hack

* Unify code style

Co-authored-by: Felix Uellendall <feluelle@users.noreply.github.com>

* Detect standalone execution by checking symboli link

* User friendly error message when env var is missing

* Display error to stderr

* Display errors on stderr

* Fix permission hack

* Fix condition in if

* Fix missing env-file

* TEST: Install airflow without copying ssources

* Update scripts/ci/in_container/run_prepare_backport_readme.sh

Co-authored-by: Felix Uellendall <feluelle@users.noreply.github.com>
2020-06-11 18:50:31 +02:00
Ash Berlin-Taylor 9c82c5b21b
Upload kind logs to Github Actions artifact (#9230)
* Upload kind logs to Github Artifacts

* get_ci_environment needed to correctly dump kind logs

Without this the "setup cluster" step dumps the logs as
`kind_logs_2020-06-11_default_default.tar.gz`

Since this is now used outside of just building images, I have moved the
function to _initialization.sh

* Github already compresses artifacts for download.

If we upload a .tar.gz, the download is a .zip file containing that
.tar.gz, which isn't ideal

Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
2020-06-11 16:00:27 +01:00
Ash Berlin-Taylor daed752609
Make it possible to silence warnings from Airflow (#9208)
If we blindly set the warnings filter, it is _impossible_ to silence
these warnings. This is the approach suggested in https://docs.python.org/3/library/warnings.html#overriding-the-default-filter
2020-06-11 11:51:17 +01:00
Ash Berlin-Taylor bfe1d6b1aa
Correctly restore colour in logs after format arg (#9222)
The "\e[22m" escape sequence has been tested on Konsole, iTerm2 and
Terminal.app
2020-06-11 11:50:33 +01:00
Ash Berlin-Taylor c7236376ec
Disable KIND git-sync tests for now (#9229)
There is some DNS problem causing it to be unable to resolve github.com
in the container.

To unblock tests we are disabling the git-sync mode tests for the
moment.
2020-06-11 11:34:30 +01:00
Ash Berlin-Taylor 151924343c
Fix up coredns pods in KIND CI (#9224)
These were passing for a while, but seemingly broke after _something_
outside of the airflow code base changed (DNS of Github Actions runners?
Phase of the moon) so adding this config map that we had when KIND
inside docker, rather than in the host.

Co-authored-by: Ash Berlin-Taylor <ash_github@firemirror.com>

Co-authored-by: Daniel Imberman <daniel.imberman@gmail.com>
2020-06-11 10:39:57 +01:00