[LNT] r310280 - Log failed submission attempts
Matthias Braun via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 7 11:41:22 PDT 2017
Author: matze
Date: Mon Aug 7 11:41:22 2017
New Revision: 310280
URL: http://llvm.org/viewvc/llvm-project?rev=310280&view=rev
Log:
Log failed submission attempts
Modified:
lnt/trunk/lnt/server/ui/api.py
lnt/trunk/lnt/server/ui/views.py
Modified: lnt/trunk/lnt/server/ui/api.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/api.py?rev=310280&r1=310279&r2=310280&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/api.py (original)
+++ lnt/trunk/lnt/server/ui/api.py Mon Aug 7 11:41:22 2017
@@ -283,6 +283,13 @@ class Runs(Resource):
current_app.old_config, g.db_name, db, g.testsuite_name, data,
updateMachine=updateMachine, mergeRun=merge)
+ if result['error'] is not None:
+ response = jsonify(response)
+ response.status = '400'
+ logger.info("%s: Submission rejected: %s" %
+ (request.url, result['error']))
+ return response
+
new_url = ('%sapi/db_%s/v4/%s/runs/%s' %
(request.url_root, g.db_name, g.testsuite_name,
result['run_id']))
Modified: lnt/trunk/lnt/server/ui/views.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/server/ui/views.py?rev=310280&r1=310279&r2=310280&view=diff
==============================================================================
--- lnt/trunk/lnt/server/ui/views.py (original)
+++ lnt/trunk/lnt/server/ui/views.py Mon Aug 7 11:41:22 2017
@@ -40,6 +40,7 @@ from lnt.server.ui.regression_views impo
from lnt.server.ui.util import FLASH_DANGER, FLASH_SUCCESS, FLASH_INFO
from lnt.server.ui.util import mean
from lnt.util import async_ops
+from lnt.util import logger
from lnt.server.ui.util import baseline_key, convert_revision
@@ -155,6 +156,8 @@ def _do_submit():
response = flask.jsonify(**result)
if result['error'] is not None:
response.status_code = 400
+ logger.info("%s: Submission rejected: %s" %
+ (request.url, result['error']))
return response
More information about the llvm-commits
mailing list