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

25 Коммитов

Автор SHA1 Сообщение Дата
Kamil Breguła 97a429f9d0
[AIRFLOW-6714] Remove magic comments about UTF-8 (#7338) 2020-02-02 22:18:19 +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
Jiajie Zhong d2a2e2cbff [AIRFLOW-4200] Remove all __future__ imports (#5020) 2019-04-22 11:26:11 +02:00
Joshua Carp 0e30793849 [AIRFLOW-4177] Check types in tests (#4994) 2019-03-29 23:03:34 +01:00
Peter van 't Hof 4fb91b0b67 [AIRFLOW-4058] Name models test file to get automatically picked up (#4901)
We had `from .models import *` inside test/__init__.py as a kludge around this test
file not being named according to expected Python conventions. Renaming the file
makes more test tools happier (and makes it easier to run a single test file without
importing half of the test tree which the current approach suffers from)
2019-03-11 11:21:27 +00:00
Xiaodong 5ea0d97b49 [AIRFLOW-3239] Enable existing CI tests (#4131)
1. Renamed files:
- tests/configuration.py → tests/test_configuration.py
- tests/impersonation.py → tests/test_impersonation.py
- tests/utils.py → tests/test_utils.py
- tests/operators/operators.py → tests/operators/test_operators.py
- tests/operators/bash_operator.py → tests/operators/test_bash_operator.py
- tests/jobs.py → tests/test_jobs.py

2. Updated tests/__init__.py accordingly

3. Fixed database-specific tests in tests/operators/test_operators.py

4. Fixed issue in tests/operators/test_bash_operator.py
2018-11-05 16:52:22 +01:00
Bolke de Bruin 648e1e6930 [AIRFLOW-2425] Add lineage support
Add lineage support by having inlets and oulets
that
are made available to dependent upstream or
downstream
tasks.

If configured to do so can send lineage data to a
backend. Apache Atlas is supported out of the box.

Closes #3321 from bolkedebruin/lineage_exp
2018-05-14 09:09:25 +02:00
Bolke de Bruin c7a472ed6b [AIRFLOW-2287] Fix incorrect ASF headers
Closes #3219 from bolkedebruin/fix_header
2018-04-14 09:13:23 +02:00
Bolke de Bruin 39b7d7d87c [AIRFLOW-1623] Trigger on_kill method in operators
on_kill methods were not triggered, due to
processes
not being properly terminated. This was due to the
fact
the runners use a shell which is then replaced by
the
child pid, which is unknown to Airflow.

Closes #3204 from bolkedebruin/AIRFLOW-1623
2018-04-11 08:05:42 +02:00
Alexander Bij 6393366a78 [AIRFLOW-840] Make ticket renewer python3 compatible
The return from the subprocess is in bytes when
the universal
newlines is set to False (default). This will fail
in Py3 and
works fine in Py2. And with a working unit test.

Closes #2158 from abij/AIRFLOW-840
2017-03-28 16:50:10 -07:00
Jeremiah Lowin 6e22102782 [AIRFLOW-862] Add DaskExecutor
Adds a DaskExecutor for running Airflow tasks
in Dask clusters.

Closes #2067 from jlowin/dask-executor
2017-02-12 16:06:31 -05:00
Bolke de Bruin b7c828bf09 [AIRFLOW-856] Make sure execution date is set for local client
In the local api client the execution date was
hardi coded to None.
Secondly, when no execution date was specified the
execution date
was set to datetime.now(). Datetime.now() includes
the fractional seconds
that are supported in the database, but they are
not supported in
a.o. the current logging setup. Now we cut off
fractional seconds for
the execution date.

Closes #2064 from bolkedebruin/AIRFLOW-856
2017-02-10 14:17:26 +01:00
Dan Davydov b56cb5cc97 [AIRFLOW-219][AIRFLOW-398] Cgroups + impersonation
Submitting on behalf of plypaul

Please accept this PR that addresses the following
issues:
-
https://issues.apache.org/jira/browse/AIRFLOW-219
-
https://issues.apache.org/jira/browse/AIRFLOW-398

Testing Done:
- Running on Airbnb prod (though on a different
mergebase) for many months

Credits:
Impersonation Work: georgeke did most of the work
but plypaul did quite a bit of work too.
Cgroups: plypaul did most of the work, I just did
some touch up/bug fixes (see commit history,
cgroups + impersonation commit is actually plypaul
's not mine)

Closes #1934 from aoen/ddavydov/cgroups_and_impers
onation_after_rebase
2017-01-18 18:11:06 -08:00
Ajay Yadav 3ffa656d97 [AIRFLOW-248] Add Apache license header to all files
- Added Apache license header for files with extension (.service, .in, .mako, .properties, .ini, .sh, .ldif, .coveragerc, .cfg, .yml, .conf, .sql, .css, .js, .html, .xml.
- Added/Replaced shebang on all .sh files with portable version - #!/usr/bin/env bash.
- Skipped third party css and js files. Skipped all minified js files as well.

Closes #1598 from ajayyadava/248
2016-06-21 08:15:42 -07:00
jlowin 851adc5547 [AIRFLOW-31] Use standard imports for hooks/operators 2016-06-16 14:55:07 -04:00
Maxime Beauchemin eca6a5a619 Change DAG.tasks from a list to a dict
This prevents iterating over a potentially very large list of tasks.
2016-04-14 11:22:09 +02:00
jlowin 6516a24851 Add unit tests 2016-04-02 23:25:29 -04:00
jlowin dfdec8954f Use urlparse for remote GCS logs, and add unit tests
It’s conceivable that the bucket starts with g or s, in which case this
lstrip would remove characters from the bucket name. Instead, use
urlparse to properly parse the string.

Also clean up the equivalent function in the S3 and GCS Hooks, using
`strip` to clean up leading/trailing slashes.
2016-03-30 18:25:37 -04:00
jlowin a296cca03b Add function to get configuration as dict, plus unit tests
There are many ways to set configuration options in Airflow
but no way to actually see all of them (the web UI only shows
airflow.cfg). This takes the current configuration object
and writes it to a dict.

The "source" of an option can be displayed (for example,
'airflow.cfg', 'default', 'env var', etc.).

Sensitive (confidential) configuration options can be included
Unless specified, they are censored as '< hidden >'.
2016-03-28 13:04:17 -04:00
Sunrin SHIMURA (keen) 60dcc6befe implement SSHExecuteOperator 2016-02-01 15:11:36 +09:00
asnir d3e91a8c11 The code was taken from: https://github.com/wndhydrnt/airflow/tree/docker_operator
Credit to: @wndhydrnt

This branch, came to solve the CI problems.
2016-01-17 11:57:38 +02:00
asnir 2e6bf9b72f The code was taken from: https://github.com/wndhydrnt/airflow/tree/docker_operator
Credit to: @wndhydrnt

This branch, came to solve the CI problems.
2016-01-17 11:44:06 +02:00
Thoralf Gutierrez 89a489fe6a import tests from models.py 2015-12-05 22:42:24 +01:00
Jeremiah Lowin d926f7b495 futurize stage 1: absolute imports 2015-08-06 23:02:53 -04:00
Maxime Beauchemin bdb205aebc Unit tests! 2015-02-08 21:50:18 -08:00