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

Unified Diff: appengine/swarming/message_conversion.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: comments and some tests 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
Index: appengine/swarming/message_conversion.py
diff --git a/appengine/swarming/message_conversion.py b/appengine/swarming/message_conversion.py
index e5f7f11ff9b67694206467f89a3a9522b4775d84..fafb28e8ac6d5ac180f8ceece2fea08ef45e6378 100644
--- a/appengine/swarming/message_conversion.py
+++ b/appengine/swarming/message_conversion.py
@@ -200,6 +200,10 @@ def task_result_to_rpc(entity, send_stats):
outputs_ref = (
_ndb_to_rpc(swarming_rpcs.FilesRef, entity.outputs_ref)
if entity.outputs_ref else None)
+ cipd_pins = [
+ _ndb_to_rpc(swarming_rpcs.CipdPackage, pkg)
+ for pkg in (entity.cipd_pins or ())
M-A Ruel 2016/08/24 02:40:23 I've always used "or []" and never realized that (
+ ]
performance_stats = None
if send_stats and entity.performance_stats.is_valid:
def op(entity):
@@ -215,6 +219,7 @@ def task_result_to_rpc(entity, send_stats):
'bot_dimensions': _string_list_pairs_from_dict(entity.bot_dimensions or {}),
'performance_stats': performance_stats,
'outputs_ref': outputs_ref,
+ 'cipd_pins': cipd_pins,
'state': swarming_rpcs.StateField(entity.state),
}
if entity.__class__ is task_result.TaskRunResult:

Powered by Google App Engine
This is Rietveld 408576698