forked from apache/airflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AIRFLOW-149] Task Dependency Engine + Why Isn't My Task Running View
Here is the original PR with Max's LGTM: aoen#1 Since then I have made some fixes but this PR is essentially the same. It could definitely use more eyes as there are likely still issues. **Goals** - Simplify, consolidate, and make consistent the logic of whether or not a task should be run - Provide a view/better logging that gives insight into why a task instance is not currently running (no more viewing the scheduler logs to find out why a task instance isn't running for the majority of cases): ![image](https://cloud.githubusercontent.com/assets/1592778/17637621/aa669f5e-6099-11e6-81c2-d988d2073aac.png) **Notable Functional Changes** - Webserver view + task_failing_deps CLI command to explain why a given task instance isn't being run by the scheduler - Running a backfill in the command line and running a task in the UI will now display detailed error messages based on which dependencies were not met for a task instead of appearing to succeed but actually failing silently - Maximum task concurrency and pools are not respected by backfills - Backfill now has the equivalent of the old force flag to run even for successful tasks This will break one use case: Using pools to restrict some resource on airflow executors themselves (rather than an external resource like a DB), e.g. some task uses 60% of cpu on a worker so we restrict that task's pool size to 1 to prevent two of the tasks from running on the same host. When backfilling a task of this type, now the backfill will wait on the pool to have slots open up before running the task even though we don't need to do this if backfilling on a different host outside of the pool. I think breaking this use case is OK since the use case is a hack due to not having a proper resource isolation solution (e.g. mesos should be used in this case instead). - To make things less confusing for users, there is now a "ignore all dependencies" option for running tasks, "ignore dependencies" has been renamed to "ignore task dependencies", and "force" has been renamed to "ignore task instance state". The new "Ignore all dependencies" flag will ignore the following: - task instance's pool being full - execution date for a task instance being in the future - a task instance being in the retry waiting period - the task instance's task ending prior to the task instance's execution date - task instance is already queued - task instance has already completed - task instance is in the shutdown state - WILL NOT IGNORE task instance is already running - SLA miss emails will now include all tasks that did not finish for a particular DAG run, even if the tasks didn't run because depends_on_past was not met for a task - Tasks with pools won't get queued automatically the first time they reach a worker; if they are ready to run they will be run immediately - Running a task via the UI or via the command line (backfill/run commands) will now log why a task could not get run if one if it's dependencies isn't met. For tasks kicked off via the web UI this means that tasks don't silently fail to get queued despite a successful message in the UI. - Queuing a task into a pool that doesn't exist will now get stopped in the scheduler instead of a worker **Follow Up Items** - Update the docs to reference the new explainer views/CLI command Closes apache#1729 from aoen/ddavydov/blockedTIExplainerRebasedMaster
- Loading branch information
Showing
56 changed files
with
2,440 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.