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

64 Коммитов

Автор SHA1 Сообщение Дата
Patrick Cando f3e87c5030
Add D202 pydocstyle check (#11032) 2020-09-22 16:17:24 +01:00
Patrick Cando b61225a885
Add D204 pydocstyle check (#11031) 2020-09-21 11:45:06 +01:00
David Cavaletto f6734b3b85
Enable Sphinx spellcheck for doc generation (#10280) 2020-08-12 21:30:37 +01:00
Kamil Breguła 2b12c304f6
Improve typing coverage in scheduler_job.py (#9783) 2020-07-13 11:11:33 +02:00
Kaxil Naik 631ac484f1
Some Pylint fixes in airflow/models/taskinstance.py (#9674) 2020-07-06 20:32:02 +01:00
Jarek Potiuk 44d4ae809c
Upgrade to latest pre-commit checks (#9686) 2020-07-06 11:37:22 +02:00
Gerard Casas Saez 23faab59eb
[AIRFLOW-8057] [AIP-31] Add @task decorator (#8962)
Closes #8057. Closes #8056.
2020-06-23 22:58:30 +01:00
crhyatt c41192fa1f
Upgrade pendulum to latest major version ~2.0 (#9184) 2020-06-10 17:12:27 +02:00
Tomek Urbaszek b7627635f4
Query TaskReschedule only if task is UP_FOR_RESCHEDULE (#9087)
* Query TaskReschedule only if task is UP_FOR_RESCHEDULE

* Query for single TaskReschedule when possible

* Apply suggestions from code review

Co-authored-by: Stefan Seelmann <mail@stefan-seelmann.de>

* Adjust mocking in tests

* fixup! Adjust mocking in tests

* fixup! fixup! Adjust mocking in tests

Co-authored-by: Stefan Seelmann <mail@stefan-seelmann.de>
2020-06-09 14:17:13 +02:00
Tomek Urbaszek 533b14341c
Add run_type to DagRun (#8227)
* Add run_type to DagRun

fixup! Add run_type to DagRun

fixup! fixup! Add run_type to DagRun

fixup! fixup! fixup! Add run_type to DagRun

fixup! fixup! fixup! Add run_type to DagRun

fixup! Add run_type to DagRun

fixup! Add run_type to DagRun

Adjust TriggerDagRunOperator

fixup! Adjust TriggerDagRunOperator

Add index

Make run_type not nullable

Add type check for run_type

fixup! Add type check for run_type

* fixup! Add run_type to DagRun

* fixup! fixup! Add run_type to DagRun

* Fix migration

* fixup! Fix migration
2020-06-04 16:20:26 +02:00
Ben Nadler fa3872a89f
Handle no Dagrun in DagrunIdDep (#8389) 2020-04-16 15:57:12 +02:00
Kamil Breguła c1f94786b9
Convert properties with query to real methods (#7900)
* Convert properties with query to real methods
2020-04-13 09:52:43 +02:00
j-y-matsubara 8d31ca21a7
Make models/pool.py pylint compatible (#8068)
* Make models/pool.py pylint compatible

* Fixed for isort

Co-authored-by: matsubara <matsubara@matsubaranoMacBook-Pro.local>
2020-04-04 10:04:03 +02:00
yuqian90 f0c65e3210
[AIRFLOW-4453] Make behavior of `none_failed` consistent with documentation (#7464)
The documentation for the `none_failed` trigger rule
(https://airflow.apache.org/docs/stable/concepts.html#trigger-rules)
describes its behavior as "all parents have not failed (`failed` or
`upstream_failed`) i.e. all parents have succeeded or been skipped."
With that definition in mind, there is no reason that the check for
`none_failed` should ever have to check for skipped upstream tasks or
set the current task to `skipped`. The current behavior causes the rule
to skip if all upstream tasks have skipped, which is more than a little
confusing. This fixes the behavior to be consistent with the documentation.

Co-authored-by: root <jcroteau@liveramp.com>
2020-03-26 21:17:51 +00:00
Tomek Urbaszek 3e2323561f
[AIRFLOW-6954] Use DagRunType instead of ID_PREFIX in run_id (#7583)
fixup! [AIRFLOW-6954] Use DagRunType instead of ID_PREFIX in run_id
2020-03-12 13:48:07 +01:00
Tomek Urbaszek 311140616d
[AIRFLOW-6864] Make airfow/jobs pylint compatible (#7484)
fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible

fixup! [AIRFLOW-6864] Make airfow/jobs pylint compatible
2020-02-25 22:06:46 +01:00
Tomek Urbaszek 6b90b11bfd
[AIRFLOW-6863] Make airflow/task and airflow/ti_deps pylint compatible (#7482) 2020-02-21 18:54:26 +00:00
yuqian90 1cdab56a61
[AIRFLOW-5391] Do not re-run skipped tasks when they are cleared (#7276)
If a task is skipped by BranchPythonOperator, BaseBranchOperator or ShortCircuitOperator and the user then clears the skipped task later, it'll execute. This is probably not the right
behaviour.

This commit changes that so it will be skipped again. This can be ignored by running the task again with "Ignore Task Deps" override.
2020-02-21 11:35:55 +00:00
Kamil Breguła 97a429f9d0
[AIRFLOW-6714] Remove magic comments about UTF-8 (#7338) 2020-02-02 22:18:19 +01:00
tooptoop4 6414d38a04 [AIRFLOW-4495] Allow externally triggered dags to run for future exec dates (#7038) 2020-01-22 17:59:56 +05:30
Lokesh Lal 5878e48b78 [AIRFLOW-1467] Allow tasks to use more than one pool slot (#7160) 2020-01-19 16:25:43 +05:30
amichai07 50efda5c69 [AIRFLOW-3607] Only query DB once per DAG run for TriggerRuleDep (#4751)
This decreases scheduler delay between tasks by about 20% for larger DAGs,
sometimes more for larger or more complex DAGs.

The delay between tasks can be a major issue, especially when we have dags with 
many subdags, figures out that the scheduling process spends plenty of time in
dependency checking, we took the trigger rule dependency which calls the db for
each task instance, we made it call the db just once for each dag_run
2020-01-16 22:52:52 +00:00
Jarek Potiuk 6df30a3ee7 Revert "[AIRFLOW-1467] Dynamic pooling via allowing tasks to use more than one pool slot (depending upon the need) (#6975)"
This reverts commit 277d01d4c5.
2020-01-13 22:10:12 +01:00
Lokesh Lal 277d01d4c5 [AIRFLOW-1467] Dynamic pooling via allowing tasks to use more than one pool slot (depending upon the need) (#6975)
* adding pool capacity required for each task for dynamic pooling

* Added pool_capacity column migration script

* removed test checkedin file

* removed extra space

* correct test_database_schema_and_sqlalchemy_model_are_in_sync test case

* Added description for pool_capacity property for task instance

* Modified test cases to include pool_capacity along with pool in task instances

* Modified test cases to include pool_capacity along with pool in task instances

* Removed Column.name property, since property value is same as actual variable

* check for pool_capacity property to be always >= 1

* removed unused variable ti

* modified test cases for pool_capacity

* modified test cases for pool_capacity
2020-01-13 09:53:09 -08:00
Bjorn Olsen c232b49be7 [AIRFLOW-XXXX] Clarify wait_for_downstream and execution_date (#6999) 2020-01-06 08:03:23 +01:00
Tomek Urbaszek d2cbf92290
[AIRFLOW-6382] Extract provide/create session to session module (#6938)
Extracting provide_session and create_session to separate module
reduces number of cyclic imports and make a disctinction between
session and database
2019-12-28 20:31:07 +01:00
Kamil Breguła 63d23ed1da [AIRFLOW-6196] Use new syntax for NamedTuple (#6751) 2019-12-09 09:48:48 +01:00
Alex Guziel aeb4a262ea [AIRFLOW-5882] Add task_not_running dep (#6531) 2019-11-12 15:50:10 +01:00
Kamil Breguła 4903c9730c
[AIRFLOW-5702] Fix common docstring issues (#6372) 2019-10-20 07:28:29 +02:00
Kaxil Naik f14947cfb3
[AIRFLOW-5302] Fix bug in none_skipped Trigger Rule (#5902) 2019-08-24 09:58:31 +01:00
Kevin Yang 203e6e891e
[AIRFLOW-4285] Update task dependency context defination and usage (#5079) 2019-08-15 15:06:12 -07:00
Kamil Breguła 6aaa19b9e5 [AIRFLOW-4946] Use yield from syntax (#5580) 2019-07-13 23:06:54 +02:00
Bas Harenslak e76020c0a0 [AIRFLOW-4197] Remove Python2 CI jobs (#5022) (#5021) 2019-05-06 09:31:50 +02:00
Chao-Han Tsai e62ad5333c [AIRFLOW-4204] Update super() calls (#5143)
Replace super(_class, self) by super() for all files
except ones in _vendor.
2019-04-24 08:16:11 +02:00
BasPH 6970b23396 [AIRFLOW-4259] Move models out of models.py (#5056) 2019-04-09 14:08:34 +02:00
al ec631954b8 [AIRFLOW-4232] Add `none_skipped` trigger rule (#5032)
Downstream tasks should run as long as their parents are in
`success`, `failed`, or `upstream_failed` states.
2019-04-06 09:17:26 +01:00
Kamil Breguła 0982715a61 [AIRFLOW-XXX] Fix syntax docs errors (#4789)
Co-authored-by: Jarek Potiuk <jarek.potiuk@polidea.com>
2019-02-27 14:55:27 +01:00
Kamil Breguła 6b38649fa6 [AIRFLOW-XXX] Improve linking to classes (#4655) 2019-02-07 11:57:32 +00:00
Stefan Seelmann 8e6bca1546 [AIRFLOW-3462] Move TaskReschedule out of models.py (#4618) 2019-01-30 14:31:37 -08:00
zhongjiajie ac25322da2 [AIRFLOW-XXX] Fix typo (#4564)
Fix typos in various files
2019-01-21 11:11:58 +01:00
Stefan Seelmann 098356e814 [AIRFLOW-3589] Visualize reschedule state in all views (#4408)
* [AIRFLOW-3589] Visualize reschedule state in all views

* Add explicit `UP_FOR_RESCHEDULE` state
* Add legend and CSS to views

* [AIRFLOW-3589] Visualize reschedule state in all views

* Use set or tuple instad of list
* Use `with` statement for session handling
2019-01-11 10:58:14 +01:00
rmn36 5955db1c76 [AIRFLOW-3336] Add new TriggerRule for 0 upstream failures (#4182)
Add new TriggerRule that triggers only if all upstream do not fail (success or skipped tasks are allowed)
2018-11-23 18:41:04 +00:00
Stefan Seelmann dc59d7e275 [AIRFLOW-2747] Explicit re-schedule of sensors (#3596)
* [AIRFLOW-2747] Explicit re-schedule of sensors

Add `mode` property to sensors. If set to `reschedule` an
AirflowRescheduleException is raised instead of sleeping which sets
the task back to state `NONE`. Reschedules are recorded in new
`task_schedule` table and visualized in the Gantt view. New TI
dependency checks if a sensor task is ready to be re-scheduled.

* Reformat sqlalchemy imports

* Make `_handle_reschedule` private

* Remove print

* Add comment

* Add comment

* Don't record reschule request in test mode
2018-09-20 22:00:29 -07:00
Kaxil Naik 5127ea34e1 [AIRFLOW-3023] Fix docstring datatypes 2018-09-06 15:07:43 -07:00
Tao feng 726dc9a219 [AIRFLOW-2429] Fix security/task/sensors/ti_deps folders flake8 error
Closes #3501 from feng-tao/flake8_p7
2018-06-15 11:34:02 +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
William Pursell 15b8a36b90 [AIRFLOW-2083] Docs: Use "its" instead of "it's" where appropriate
Closes #3020 from wrp/spelling
2018-02-09 10:08:06 +01:00
Bolke de Bruin c857436b75 [AIRFLOW-1808] Convert all utcnow() to time zone aware
datetime.utcnow() does not set time zone information.
2017-11-27 15:54:20 +01:00
Alex Guziel cfc2f73c44 [AIRFLOW-1634] Adds task_concurrency feature
This adds a feature to limit the concurrency of
individual tasks. The
default will be to not change existing behavior.

Closes #2624 from saguziel/aguziel-task-
concurrency
2017-10-05 14:37:26 -07:00
Bolke de Bruin a81c153cc4 [AIRFLOW-289] Make airflow timezone independent
Airflow mixes datetime.now()/today() and utcnow().
This can lead
to issues in case the OS is not in UTC.

Closes #2618 from bolkedebruin/use_utcnow
2017-09-20 21:27:02 +02:00