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

38 Коммитов

Автор SHA1 Сообщение Дата
Bolke de Bruin c7a472ed6b [AIRFLOW-2287] Fix incorrect ASF headers
Closes #3219 from bolkedebruin/fix_header
2018-04-14 09:13:23 +02:00
Joy Gao 05e1861e24 [AIRFLOW-1433][AIRFLOW-85] New Airflow Webserver UI with RBAC support
Closes #3015 from jgao54/rbac
2018-03-23 09:18:48 +01:00
Edgar Rodriguez 9d9727a80a [AIRFLOW-1893][AIRFLOW-1901] Propagate PYTHONPATH when using impersonation
When using impersonation via `run_as_user`, the
PYTHONPATH environment
variable is not propagated hence there may be
issues when depending on
specific custom packages used in DAGs.
This PR propagates only the PYTHONPATH in the
process creating the
sub-process with impersonation, if any.

Tested in staging environment; impersonation tests
in airflow are not very portable and fixing them
would take additional work, leaving as TODO and
tracking with jira ticket: https://issues.apache.o
rg/jira/browse/AIRFLOW-1901.

Closes #2860 from edgarRd/erod-
pythonpath_run_as_user
2017-12-11 16:47:49 -08:00
Bolke de Bruin 4f52db317f [AIRFLOW-911] Add coloring and timing to tests
Closes #2106 from bolkedebruin/profile_tests
2017-02-25 22:10:14 +01:00
Jeremiah Lowin 61fb6a5e52 [AIRFLOW-830][AIRFLOW-829][AIRFLOW-88] Reduce Travis log verbosity
[AIRFLOW-829][AIRFLOW-88] Reduce verbosity of
Travis tests

Remove the -s flag for Travis unit tests to
suppress output
from successful tests.

[AIRFLOW-830] Reduce plugins manager verbosity

The plugin manager prints all status to INFO,
which is unnecessary and
overly verbose.

Closes #2049 from jlowin/reduce-logs
2017-02-08 08:32:25 -05: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
Li Xuanji dedc54eeaf [AIRFLOW-640] Install and enable nose-ignore-docstring
Closes #1896 from zodiac/nose-ignore-docstring
2016-11-20 17:38:24 -08:00
jlowin 7662cd8ce4 [AIRFLOW-328][AIRFLOW-371] Remove redundant default configuration & fix unit test configuration
AIRFLOW-328
https://issues.apache.org/jira/browse/AIRFLOW-328
Previously, Airflow had both a default template for airflow.cfg AND a
dictionary of default values. Frequently, these get out of sync (an
option in one has a different value than in the other, or isn’t present
in the other). This commit removes the default dict and uses the
airflow.cfg template to provide defaults. The ConfigParser first reads
the template, loading all the options it contains, and then reads the
user’s actual airflow.cfg to overwrite the default values with any new
ones.

AIRFLOW-371
https://issues.apache.org/jira/browse/AIRFLOW-371
Calling test_mode() didn't actually change Airflow's configuration! This actually wasn't an issue in unit tests because the unit test run script was hardcoded to point at the unittest.cfg file, but it needed to be fixed.

[AIRFLOW-328] Remove redundant default configuration

Previously, Airflow had both a default template
for airflow.cfg AND a dictionary of default
values. Frequently, these get out of sync (an
option in one has a different value than in the
other, or isn’t present in the other). This commit
removes the default dict and uses the airflow.cfg
template to provide defaults. The ConfigParser
first reads the template, loading all the options
it contains, and then reads the user’s actual
airflow.cfg to overwrite the default values with
any new ones.

[AIRFLOW-371] Make test_mode() functional

Previously, calling test_mode() didn’t actually
do anything.

This PR renames it to load_test_config() (to
avoid confusion, ht @r39132).

In addition, manually entering test_mode after
Airflow launches might be too late — some
options have already been loaded (DAGS_FOLDER,
etc.). This makes it so setting
tests/unit_test_mode OR the equivalent env var
(AIRFLOW__TESTS__UNIT_TEST_MODE) will load the
test config immediately, prior to loading the
rest of Airflow.

Closes #1677 from jlowin/Simplify-config
2016-08-12 10:34:50 -07: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
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
Nicholas Travers 5d80dea09a Clean test database out in between unit test runs 2016-02-10 08:55:52 -08:00
Thoralf Gutierrez 732297b7f5 fix condition in run_unit_tests.sh + fix indent + remove duplicated loaded config 2015-12-04 12:00:43 +01:00
Maxime Beauchemin 8506b60351 Removing forced resetdb from ./run_unit_tests 2015-11-30 08:47:02 -08:00
Marcin Tustin abbd181889 Address review comments. Add -y option to resetdb. 2015-11-20 16:11:57 +00:00
Marcin Tustin 37b60213c7 Add tests around schedule_dag. Make run_unit_tests.sh idempotent. Fix a
bug with @once dags
2015-11-19 20:06:50 +00:00
Svend Vanderveken 8783a10fd3 fix missplaced comment in run_unit_tests.sh 2015-11-11 00:13:14 +01:00
Svend Vanderveken 197b4bbd13 more flexible UT execution
- we now can specify nose parameter on the command line of ./run_unit_test.sh.
- if unspecified, the script falls back to previous behaviour, i.e. run all UTs
2015-11-10 17:52:45 +01:00
Maxime Beauchemin a37a4bcf66 Adapting CONTRIBUTING.md 2015-10-26 20:39:36 -07:00
Maxime Beauchemin c7cc36ab8d Moving to hadoop tests to the side for now 2015-10-21 10:45:27 -07:00
Maxime Beauchemin 2bfcb81412 Removing doctests for the time being 2015-10-21 10:42:01 -07:00
Maxime Beauchemin be39b353e7 Tweaks 2015-10-21 10:42:01 -07:00
Maxime Beauchemin 1ca1776b3d Trying different strategies to get initdb to run 2015-10-21 10:42:01 -07:00
Jack Danger Canty cc2f3ecd72 Setting up necessary dependencies for tests 2015-08-12 14:16:08 -07:00
Maxime c770c415da Better logging for the scheduler 2015-08-04 19:42:50 +00:00
Arthur Wiedmer 49201eef25 adding option to remove previous run data instead of manual rm 2015-06-15 16:07:20 -07:00
e3 2574507de2 Random spelling updates. 2015-06-05 19:41:36 +02:00
Maxime Beauchemin 00be1d05e7 Prioritization and concurency limitation on executor queues 2015-05-11 03:48:59 +00:00
Maxime 472d3c1221 Support for dicts and list in operators template_fields 2015-04-06 21:38:45 +00:00
Maxime 5580d10292 Making master scheduler disregard subdags 2015-03-18 15:48:36 +00:00
Mike Kerzhner ec2fc4b3e6 Postgres operator unit tests 2015-03-11 16:48:15 -07:00
Maxime Beauchemin 77fcc80599 Adding TimeSensor (operator) 2015-02-16 22:10:27 +00:00
Maxime 55c268d421 Improving the unit tests 2015-02-16 21:10:58 +00:00
Maxime Beauchemin 926408a9bb Copying the dict to be safe 2015-02-10 09:46:18 -08:00
Maxime 9d7815804c More unit tests 2015-02-10 08:30:51 +00:00
Maxime 62d5a97224 Insuring we're using the unittest cnfig 2015-02-09 19:02:45 +00:00
Maxime Beauchemin 836772ffdb Breaking downt initdb into initdb and resetdb 2015-02-09 08:09:06 -08:00
Maxime Beauchemin bdb205aebc Unit tests! 2015-02-08 21:50:18 -08:00