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-880] Make webserver serve logs in a sane way for remote logs
There are two major problems with remote logs in Airflow right now: 1. Lack of Complete Logs: Remote logs should be the default instead of the log that is only loaded if the local log is not present, because the remote log will have the logs for all of the tries of a task, whereas the local log is only guaranteed to have the most recent one 2. Lack of Consistency: The logs returned will always be the same from all the webservers (right now different logs can be returned if a webserver has a log vs doesn't, and there can be different logs between webservers that have the log). Right now log functionality is not consistent when it comes to remote logs. This PR addresses these issues by ALWAYS reading from remote logs and then also reading logs from worker hosts if the task is already running (to get in-flight logs). The one issue with this PR is that if a task is running on a worker it already ran on, then you will get duplicate logs for all of the previous runs of the task that already completed (delimited by something like "*** Getting remote logs" "*** Getting logs on local worker"). This can be fixed later (either by streaming logs to the log server or by creating a proper abstraction for multiple task instance runs), and is still better than the current behavior (duplicate info is better than omitting previous task instance logs from the webserver log). Testing Done: Tested on staging cluster: - Task instance doesn't exist - Task instance is running and has previous remote log - Task instance is running for first time - Task instance has completed and has remote log Closes apache#2086 from aoen/ddavydov/fix_s3_logging
- Loading branch information
Showing
1 changed file
with
97 additions
and
81 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