airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From criccom...@apache.org
Subject incubator-airflow git commit: [AIRFLOW-183] Fetch log from remote when worker returns 4xx/5xx response
Date Fri, 27 May 2016 17:25:43 GMT
Repository: incubator-airflow
Updated Branches:
  refs/heads/master afcd4fcf0 -> 4aac54d64


[AIRFLOW-183] Fetch log from remote when worker returns 4xx/5xx response

Dear Airflow Maintainers,

Please accept this PR that addresses the following issues:

- https://issues.apache.org/jira/browse/AIRFLOW-183

This is mainly to make the behavior consistent when some log files have
been deleted from the log folder. Without the change, the remote s3/gcs
fallback will only trigger if the task ran on the local worker.

Author: Yap Sok Ann <sokann@gmail.com>

Closes #1551 from sayap/remote-log-remote-worker.


Project: http://git-wip-us.apache.org/repos/asf/incubator-airflow/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-airflow/commit/4aac54d6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-airflow/tree/4aac54d6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-airflow/diff/4aac54d6

Branch: refs/heads/master
Commit: 4aac54d64437ad4aae3020de6debabbc9e911709
Parents: afcd4fc
Author: Yap Sok Ann <sokann@gmail.com>
Authored: Fri May 27 10:25:25 2016 -0700
Committer: Chris Riccomini <chrisr@wepay.com>
Committed: Fri May 27 10:25:25 2016 -0700

----------------------------------------------------------------------
 airflow/www/views.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-airflow/blob/4aac54d6/airflow/www/views.py
----------------------------------------------------------------------
diff --git a/airflow/www/views.py b/airflow/www/views.py
index 78f9677..bba417b 100644
--- a/airflow/www/views.py
+++ b/airflow/www/views.py
@@ -856,7 +856,9 @@ class Airflow(BaseView):
                 log += "*** Fetching here: {url}\n".format(**locals())
                 try:
                     import requests
-                    log += '\n' + requests.get(url).text
+                    response = requests.get(url)
+                    response.raise_for_status()
+                    log += '\n' + response.text
                     log_loaded = True
                 except:
                     log += "*** Failed to fetch log file from worker.\n".format(


Mime
View raw message