You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by cr...@apache.org on 2016/05/27 17:25:43 UTC
incubator-airflow git commit: [AIRFLOW-183] Fetch log from remote
when worker returns 4xx/5xx response
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 <so...@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 <so...@gmail.com>
Authored: Fri May 27 10:25:25 2016 -0700
Committer: Chris Riccomini <ch...@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(