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

Unified Diff: appengine/swarming/server/task_result.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
Index: appengine/swarming/server/task_result.py
diff --git a/appengine/swarming/server/task_result.py b/appengine/swarming/server/task_result.py
index b905db0cb14a90cdc7ef7c361d44232f105af5cd..3f359a2daea456ad7109ebc999679c17f67a6b1e 100644
--- a/appengine/swarming/server/task_result.py
+++ b/appengine/swarming/server/task_result.py
@@ -58,6 +58,7 @@ Graph of schema:
+---------------+ +---------------+
"""
+import collections
import datetime
import logging
import random
@@ -373,6 +374,14 @@ class _TaskResultCommon(ndb.Model):
# set. The isolateserver and namespace should match.
outputs_ref = ndb.LocalStructuredProperty(task_request.FilesRef)
+ # The pinned versions of all the cipd packages that were specified as inputs
+ # to the task. So if the task inputs included `package/${platform}@latest`,
+ # the pinned version might be `package/windows@deadbeef`, where 'windows' is
+ # the expanded template parameter, and `deadbeef` is the resolved version of
+ # the package that the task actually used.
+ cipd_pins = ndb.LocalStructuredProperty(task_request.CipdPackage,
+ repeated=True)
+
@property
def can_be_canceled(self):
"""Returns True if the task is in a state that can be canceled."""
@@ -786,6 +795,7 @@ class TaskResultSummary(_TaskResultCommon):
self.exit_code = None
self.internal_failure = False
self.outputs_ref = None
+ self.cipd_pins = None
M-A Ruel 2016/08/24 02:13:44 the list was sorted
iannucci 2016/08/24 02:31:57 done
self.started_ts = None
self.state = State.PENDING

Powered by Google App Engine
This is Rietveld 408576698