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

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: Fix bottest 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 | « appengine/swarming/handlers_frontend.py ('k') | appengine/swarming/server/task_request.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/message_conversion.py
diff --git a/appengine/swarming/message_conversion.py b/appengine/swarming/message_conversion.py
index e5f7f11ff9b67694206467f89a3a9522b4775d84..4dcca2277915ef39667fffde26531f794fcad02d 100644
--- a/appengine/swarming/message_conversion.py
+++ b/appengine/swarming/message_conversion.py
@@ -200,6 +200,19 @@ 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 = None
+ if entity.cipd_pins:
+ cipd_pins = swarming_rpcs.CipdPins(
+ client_package=(
+ _ndb_to_rpc(swarming_rpcs.CipdPackage,
+ entity.cipd_pins.client_package)
+ if entity.cipd_pins.client_package else None
+ ),
+ packages=[
+ _ndb_to_rpc(swarming_rpcs.CipdPackage, pkg)
+ for pkg in entity.cipd_pins.packages
+ ] if entity.cipd_pins.packages else None
+ )
performance_stats = None
if send_stats and entity.performance_stats.is_valid:
def op(entity):
@@ -213,8 +226,9 @@ def task_result_to_rpc(entity, send_stats):
isolated_upload=op(entity.performance_stats.isolated_upload))
kwargs = {
'bot_dimensions': _string_list_pairs_from_dict(entity.bot_dimensions or {}),
- 'performance_stats': performance_stats,
+ 'cipd_pins': cipd_pins,
'outputs_ref': outputs_ref,
+ 'performance_stats': performance_stats,
'state': swarming_rpcs.StateField(entity.state),
}
if entity.__class__ is task_result.TaskRunResult:
« no previous file with comments | « appengine/swarming/handlers_frontend.py ('k') | appengine/swarming/server/task_request.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698