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

5147 Коммитов

Автор SHA1 Сообщение Дата
Kaxil Naik 5646d31154 closes apache/incubator-airflow#3389 *Obsolete PR* 2018-06-25 19:51:07 +01:00
niels 926c628379 [AIRFLOW-2671] Monitor gunicorn process, and exit if it exits
Closes #3545 from
NielsZeilemaker/monitor_webserver
2018-06-25 19:46:28 +01:00
Joshua Iverson 53b89b9837 [AIRFLOW-1978] Add support for additional WinRM parameters
Implemented all of the WinRM options from pywinrm.
Implemented support for streaming stdout/stderr.

Closes #3512 from jshvrsn/winrm
2018-06-25 19:42:38 +01:00
Kevin Yang 216beacd5b [AIRFLOW-2648] Update mapred job name in HiveOperator
Closes #3534 from
yrqls21/keivn_yang_reorder_mapred
2018-06-25 13:31:34 +02:00
pengchen 5a3f399137 [AIRFLOW-2669] Fix bug when setting logs_volume_subpath
Closes #3543 from Cplo/subpath
2018-06-25 13:13:19 +02:00
pengchen adb648c949 [AIRFLOW-2662][AIRFLOW-2397] Add k8s node_selectors and affinity
Add the ability to set the node selection and the affinity
for the k8s executor

Closes #3535 from Cplo/affinity
2018-06-25 13:09:16 +02:00
Thibault Clement 0ce068e086 [AIRFLOW-XXX] Fix typo in http_operator.py
Replace sensor by operator in the comment:
`:param http_conn_id: The connection to run the
sensor against` by `:param http_conn_id: The
connection to run the operator against`

Closes #3544 from thibaultclem/patch-1
2018-06-25 13:07:27 +02:00
Cameron Moberg 702a57ec5a [AIRFLOW-2657] Add ability to delete dag from web UI
Closes #3531 from Noremac201/master
2018-06-22 23:18:36 +01:00
Joy Gao a504a8fe1a Revert "[AIRFLOW-2615] Remove not used app creation"
This reverts commit 9525003ff9.
2018-06-22 14:47:22 -07:00
Kevin Yang 2fd9328b41 [AIRFLOW-2624] Fix webserver login as anonymous 2018-06-22 12:05:28 -07:00
Stefan Seelmann d00762cb91 [AIRFLOW-2604] Add index to task_fail 2018-06-22 20:33:05 +02:00
Joy Gao dbcb93c368 Merge pull request #3506 from yrqls21/kevin_yang_remove_extra_step 2018-06-22 10:08:48 -07:00
Ravi Kotecha 1d93d1b549 [AIRFLOW-2661] fix config dags_volume_subpath and logs_volume_subpath
Make sure you have checked _all_ steps below.

### JIRA
- [x] My PR addresses the following [Airflow JIRA]
(https://issues.apache.org/jira/browse/AIRFLOW/)
issues and references them in the PR title. For
example, "\[AIRFLOW-XXX\] My Airflow PR"
    -
https://issues.apache.org/jira/browse/AIRFLOW-2661
    - In case you are fixing a typo in the
documentation you can prepend your commit with
\[AIRFLOW-XXX\], code changes always need a JIRA
issue.

### Description
- [x] Here are some details about my PR, including
screenshots of any UI changes:
Changes the use of `log_volume_subpath` and
`dags_volume_subpath` which are
now passed into the construction of the worker
pod's volumeMounts instead of
the volume section (where subPath is not valid).

### Tests
- [x] My PR adds the following unit tests __OR__
does not need testing for this extremely good
reason:
Unit tests have been added but I'm not sure how to
add integration tests
for this without breaking the other minikube tests

### Commits
- [x] My commits all reference JIRA issues in
their subject lines, and I have squashed multiple
commits if they address the same issue. In
addition, my commits follow the guidelines from
"[How to write a good git commit
message](http://chris.beams.io/posts/git-
commit/)":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not
"adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

### Documentation
- [x] In case of new functionality, my PR adds
documentation that describes how to use it.

No new functionality added

### Code Quality
- [x] Passes `git diff upstream/master -u --
"*.py" | flake8 --diff`

Closes #3537 from r4vi/AIRFLOW-2661
2018-06-22 16:37:46 +02:00
Kaxil Naik 7961ee8f08 [AIRFLOW-2663] Add instructions to install SSH dependencies
Closes #3536 from kaxil/patch-1
2018-06-22 16:35:48 +02:00
Tao feng 07db7a3d71 [AIRFLOW-2652] implement / enhance baseOperator deepcopy
Make sure you have checked _all_ steps below.

### JIRA
- [x] My PR addresses the following [Airflow JIRA]
(https://issues.apache.org/jira/browse/AIRFLOW/)
issues and references them in the PR title. For
example, "\[AIRFLOW-XXX\] My Airflow PR"
    -
https://issues.apache.org/jira/browse/AIRFLOW-2652
    - In case you are fixing a typo in the
documentation you can prepend your commit with
\[AIRFLOW-XXX\], code changes always need a JIRA
issue.

### Description
- [x] Here are some details about my PR, including
screenshots of any UI changes:
When running ``airflow backfill`` on
pythonOperator, it will do / trigger a deepcopy of
the task_instance. If some objects can't be
deepcopy in certain python version(e.g Protobuf in
python 2.7) , an exception will be thrown. We
should just do a shallow copy instead of deep copy
for the object.

The pr here is to copy the ``_deepcopy__`` method
in BaseOperator, but skip doing deepcopy for
`op_kwargs` and `python_callable`.

### Tests
- [x] My PR adds the following unit tests __OR__
does not need testing for this extremely good
reason:
I can't think of a good way to test. We encounter
this in our production.

### Commits
- [x] My commits all reference JIRA issues in
their subject lines, and I have squashed multiple
commits if they address the same issue. In
addition, my commits follow the guidelines from
"[How to write a good git commit
message](http://chris.beams.io/posts/git-
commit/)":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not
"adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

### Documentation
- [x] In case of new functionality, my PR adds
documentation that describes how to use it.
    - When adding new operators/hooks/sensors, the
autoclass documentation generation needs to be
added.

### Code Quality
- [x] Passes `git diff upstream/master -u --
"*.py" | flake8 --diff`

Closes #3528 from feng-tao/airflow-2652
2018-06-21 16:28:30 -07:00
Joy Gao 55b56a4336 Merge pull request #3492 from seelmann/AIRFLOW-2602-show-failed-attempts-in-gantt-view 2018-06-21 15:46:31 -07:00
Joy Gao 16d1957110 Merge pull request #3527 from kaxil/AIRFLOW-2654 2018-06-21 13:30:52 -07:00
Stefan Seelmann c989972d2d [AIRFLOW-2602] Show failed attempts in Gantt view
* Get failed attempts from `task_fail` table and show them in Gantt view.
* Fix TaskFail class column definition to match actual database schema.
  Change was required to retrieve all records for one task instance run
  otherwise only one was returned by SQLAlchemy.
2018-06-21 07:26:29 +02:00
Joy Gao 3162e1c9ac Merge pull request #3516 from seelmann/AIRFLOW-2606-db-schema-model 2018-06-20 17:42:44 -07:00
Kaxil Naik 8dc54e6e00 [AIRFLOW-2654] Fix incorret URL on refresh in Graph View of FAB UI
- Fix incorrect URL requested on pressing the refresh button in the graph view.
2018-06-20 23:45:39 +01:00
roc c9a6fec093 [AIRFLOW-2645][AIRFLOW-2617] Add worker_container_image_pull_policy
Set worker_container_image_pull_policy in default_airflow.cfg

As AIRFLOW-2617 added worker_container_image_pull_policy config
to the section of kubernetes, but the airflow_default.cfg
was not updated, this PR add worker_container_image_pull_policy
to default_airflow.cfg.

Closes #3521 from imroc/AIRFLOW-2645
2018-06-20 20:37:42 +02:00
Kengo Seki 5f49ebf018 [AIRFLOW-2640] Add Cassandra table sensor
Just like a partition sensor for Hive,
this PR adds a sensor that waits for
a table to be created in Cassandra cluster.

Closes #3518 from sekikn/AIRFLOW-2640
2018-06-20 20:36:32 +02:00
Tao feng 6ed2fb716a [AIRFLOW-1919] Add option to query for DAG runs given a DAG ID
Closes #3515 from feng-tao/airflow-1919
2018-06-20 20:32:50 +02:00
Christian Trebing 8622046783 [AIRFLOW-2592] Bump bleach dependency
Bleach dependency is updated to 2.1.3 to address
CVE-2018-7753

Closes #3524 from ctrebing/AIRFLOW-2592-bump-
bleach-dependency
2018-06-20 20:19:21 +02:00
Kengo Seki 105ac15058 [AIRFLOW-2646] Fix setup.py not to install snakebite on Python3
setup.py has a logic to avoid installing
snakebite on Python3, but it doesn't work.
This is because the variable devel_all is
now a tuple of lists. This PR fixes
that variable to be a flat list and
makes the logic work as expected.

Closes #3522 from sekikn/AIRFLOW-2646
2018-06-19 17:09:00 -07:00
Kengo Seki ecf68c7d31 [AIRFLOW-2612][AIRFLOW-2534] Clean up Hive-related tests
There is several HiveServer2-related tests
which are not run by default in
tests/operators/hive_operator.py,
but AIRFLOW-2534 implemented almost all of them
in airflow/hooks/hive_hooks.py.
This PR removes duplicated tests from
tests/operators/hive_operator.py and
moves an unimplemented test to
airflow/hooks/hive_hooks.py with a bit of fix.

Closes #3498 from sekikn/AIRFLOW-2612
2018-06-19 10:51:01 +01:00
Verdan Mahmood 5676ec79d5 [AIRFLOW-2608] Implements/Standardize custom exceptions for experimental APIs
Implements/Standardize custom exceptions for
experimental APIs

Implements/Standardize custom exceptions for
experimental APIs

Closes #3496 from verdan/AIRFLOW-2608-api-
exceptions-handling
2018-06-19 10:27:14 +02:00
Verdan Mahmood 8c4131ba30 [AIRFLOW-2607] Fix failing TestLocalClient
Closes #3494 from verdan/fix-api-tests
2018-06-19 10:22:34 +02:00
Florian Klink 3d8c3db7f1 [AIRFLOW-2638] dbapi_hook: support REPLACE INTO
Sometimes, it's desirable to be able to use
REPLACE INTO instead of
INSERT INTO for insert_rows method (if importing
the same data multiple
times).
This adds an optional parameter to the insert_rows
column that flips the
generated sql statement from "INSERT INTO" to
"REPLACE INTO".

Closes #3517 from flokli/dbapi_hook-replace
2018-06-19 10:04:36 +02:00
Hugo Prudente 6c3c8f4459 [AIRFLOW-2542][AIRFLOW-1790] Rename AWS Batch Operator queue to job_queue
- Improved the retries times to jobs below 60s
- Renamed property queue to job_queue to prevent
AWS Batch and CeleryExecutor queue conflict
- Added Breaking Chain note for the UPDATING.md
master
- Fixed operator infinit loop
- Added documentation warning about the Breaking
chain
- Fixed the commit parameter to keep it on Airflow
guidelines
- Fixed logging typo
- rebased with master

Changes to be committed:
	modified:   ../../../UPDATING.md
	modified:   awsbatch_operator.py
	modified:   ../../../tests/contrib/operators/test_
awsbatch_operator.py

Closes #3436 from hprudent/master
2018-06-19 10:00:47 +02:00
Shintaro Murakami 2b93f88888 [AIRFLOW-2567] Extract result from the kubernetes pod as Xcom
Closes #3466 from mrkm4ntr/airflow-2567
2018-06-19 09:54:22 +02:00
r39132 7bdf6162fb [AIRFLOW-XXX] Adding REA Group to readme 2018-06-18 15:47:08 -07:00
r39132 528859b817 closes apache/incubator-airflow#3507 *Closed for inactivity.* 2018-06-18 15:28:50 -07:00
Stefan Seelmann 680651f0ae [AIRFLOW-2606] Fix DB schema and SQLAlchemy model
* Add test that verifies that database schema and SQLAlchemy model are in sync
* Add exception for users.password that doesn't exist in model and tables created by other tests
* Add migration script to merge the two heads
* Add migration script to fix not-null constrains for MySQL that were lost by 0e2a74e0fc9f_add_time_zone_awareness
* Add migration script to fix FK constraint for existing SQLite DBs
* Enable ForeignKey support for SQLite, otherwise 2e82aab8ef20_rename_user_table won't change FK in chart and known_event tables
2018-06-18 23:29:29 +02:00
Cameron Moberg 14a77a701e [AIRFLOW-2601] Allow user to specify k8s config
Closes #3491 from Noremac201/config_kube
2018-06-18 22:29:19 +01:00
niels 3dade5413f [AIRFLOW-2559] Azure Fileshare hook
Closes #3457 from NielsZeilemaker/fileshare_hook
2018-06-18 22:23:53 +01:00
Artem Kirillov eaa03dbc74 [AIRFLOW-1786] Enforce correct behavior for soft-fail sensors
Soft-fail sensor failure causes skip of all
downstream tasks. It also enables ability to set
up non-blocking and soft-fail sensors in the same
way as for regular sensors.

Closes #3509 from artem-kirillov/AIRFLOW-1786
2018-06-17 21:47:55 +02:00
milton0825 2090011bb7 [AIRFLOW-2355] Airflow trigger tag parameters in subdag
Parameters passed through airflow trigger_dag -c
'{"text": "blah"}' can be accessed through
{{ dag_run.conf.text }} in subdag.

Closes #3460 from milton0825/trigger-dag-subdag
2018-06-17 19:19:05 +01:00
Cameron Moberg dc38b2f46d [AIRFLOW-2613] Fix Airflow searching .zip bug
When Airflow was populating a DagBag from a .zip
file, if a single
file in the root directory did not contain the
strings 'airflow' and
'DAG' it would ignore the entire .zip file.

Also added a small amount of logging to not
bombard user with info
about skipping their .py files.

Closes #3505 from Noremac201/dag_name
2018-06-17 19:16:12 +01:00
Kengo Seki 4d153ad4e8 [AIRFLOW-2627] Add a sensor for Cassandra
Closes #3510 from sekikn/AIRFLOW-2627
2018-06-17 19:10:48 +01:00
Kengo Seki b9cb54f873 [AIRFLOW-2634][AIRFLOW-2534] Remove dependency for impyla
Closes #3514 from sekikn/AIRFLOW-2634
2018-06-16 13:35:41 +01:00
roc ef3ead167b [AIRFLOW-2611] Fix wrong dag volume mount path for kubernetes executor
There are two way of syncing dags, pvc and git-
sync, if set both
(dags_volume_claim and git_subpath), I won't get
the mountPath what I
want. I think the priority of pvc should higher
than git-sync, so I
think when dags_volume_claim is been set, the
mountPath shuold not join the git_subpath.

Closes #3497 from imroc/AIRFLOW-2611
2018-06-15 21:15:02 +01:00
Cameron Moberg 7255589f95 [AIRFLOW-2562] Add Google Kubernetes Engine Operators
Add Google Kubernetes Engine create_cluster,
delete_cluster operators
This allows users to use airflow to create or
delete clusters in the
google cloud platform

Closes #3477 from Noremac201/gke_create
2018-06-15 20:44:29 +01:00
Kengo Seki caaa4a5160 [AIRFLOW-2630] Fix classname in test_sql_sensor.py
Closes #3511 from sekikn/AIRFLOW-2630
2018-06-15 20:31:55 +01:00
Giovanni Lanzani 3245d1745d [AIRFLOW-2534] Fix bug in HiveServer2Hook
This commit also adds numerous tests for
HiveServer2 and switches
Impyla for PyHive (0.6.0), making HiveServer2
Python 2 compatible.

Closes #3432 from gglanzani/AIRFLOW-2534
2018-06-15 14:19:25 +02:00
Kevin Yang 08a18395e7 [AIRFLOW-2586] Stop getting AIRFLOW_HOME value from config file in bash operator
Closes #3484 from
yrqls21/kevin_yang_fix_bash_operator
2018-06-15 13:32:04 +02:00
Kevin Yang ef8a6ca4e4 [AIRFLOW-2605] Fix autocommit for MySqlHook
Closes #3493 from
yrqls21/kevin_yang_fix_mysql_autocommit
2018-06-15 13:27:22 +02:00
niels d62a037671 [AIRFLOW-2539][AIRFLOW-2359] Move remaing log config to configuration file
Closes #3435 from
NielsZeilemaker/env_logging_filename
2018-06-15 13:25:26 +02:00
djordje f7f585a897 [AIRFLOW-1656] Tree view dags query changed
[AIRFLOW-1656] Tree view query changes

Closes #3427 from djo10/master
2018-06-15 12:30:06 +02:00
pengchen 2fa155fe8b [AIRFLOW-2617] add imagePullPolicy config for kubernetes executor
Closes #3500 from Cplo/k8sexecutor
2018-06-15 11:38:19 +02:00