Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3934)

Unified Diff: appengine/swarming/handlers_bot.py

Issue 2267363004: Add CIPD pin reporting to swarming. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/swarming/server/task_request.py » ('j') | appengine/swarming/server/task_result.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/handlers_bot.py
diff --git a/appengine/swarming/handlers_bot.py b/appengine/swarming/handlers_bot.py
index b41fb60f416d11742d50993db18ec7c413893978..7bcce920b2dbe429c9410db4d03586fde2990dc2 100644
--- a/appengine/swarming/handlers_bot.py
+++ b/appengine/swarming/handlers_bot.py
@@ -575,7 +575,7 @@ class BotTaskUpdateHandler(_BotApiHandler):
ACCEPTED_KEYS = {
u'bot_overhead', u'cipd_stats', u'cost_usd', u'duration', u'exit_code',
u'hard_timeout', u'id', u'io_timeout', u'isolated_stats', u'output',
- u'output_chunk_start', u'outputs_ref', u'task_id',
+ u'output_chunk_start', u'outputs_ref', u'cipd_pins', u'task_id',
M-A Ruel 2016/08/24 02:13:44 keep ordered lists ordered
iannucci 2016/08/24 02:31:57 Done.
}
REQUIRED_KEYS = {u'id', u'task_id'}
@@ -608,6 +608,7 @@ class BotTaskUpdateHandler(_BotApiHandler):
output = request.get('output')
output_chunk_start = request.get('output_chunk_start')
outputs_ref = request.get('outputs_ref')
+ cipd_pins = request.get('cipd_pins')
if (isolated_stats or cipd_stats) and bot_overhead is None:
ereporter2.log_request(
@@ -661,6 +662,9 @@ class BotTaskUpdateHandler(_BotApiHandler):
if outputs_ref:
outputs_ref = task_request.FilesRef(**outputs_ref)
+ if cipd_pins:
+ cipd_pins = [task_request.CipdPackage(**pin) for pin in cipd_pins]
+
try:
state = task_scheduler.bot_update_task(
run_result_key=run_result_key,
@@ -673,6 +677,7 @@ class BotTaskUpdateHandler(_BotApiHandler):
io_timeout=io_timeout,
cost_usd=cost_usd,
outputs_ref=outputs_ref,
+ cipd_pins=cipd_pins,
performance_stats=performance_stats)
if not state:
logging.info('Failed to update, please retry')
« no previous file with comments | « no previous file | appengine/swarming/server/task_request.py » ('j') | appengine/swarming/server/task_result.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698