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

Unified Diff: appengine/swarming/swarming_rpcs.py

Issue 1946253003: swarming: refactor cipd input (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-py@default-isolate-server
Patch Set: fix import google.protobuf Created 4 years, 7 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/swarming_rpcs.py
diff --git a/appengine/swarming/swarming_rpcs.py b/appengine/swarming/swarming_rpcs.py
index b9f61c49be939eb7e19bb2c80fd987a54a2f3060..71451bdd6bf6086c1697029eeaf70d3a89c8f6a6 100644
--- a/appengine/swarming/swarming_rpcs.py
+++ b/appengine/swarming/swarming_rpcs.py
@@ -84,14 +84,32 @@ class FilesRef(messages.Message):
class CipdPackage(messages.Message):
"""A CIPD package to install in $CIPD_PATH and $PATH before task execution."""
- # Full CIPD package name, e.g. "infra/tools/authutil/linux-amd64"
+ # A template of a full CIPD package name, e.g.
+ # "infra/tools/authutil/${platform}"
+ # See also cipd.ALL_PARAMS.
package_name = messages.StringField(1)
- # Instance ID, tag or ref, e.g. "latest".
+ # Valid package version for all packages matched by package name.
version = messages.StringField(2)
+class CipdInput(messages.Message):
+ """Defines CIPD packages to install in $CIPD_PATH.
+
+ A command may use $CIPD_PATH in its arguments. It will be expanded to the path
+ of the CIPD site root.
+ """
+ # Serialized config_pb2.CipdSettings message. When creating a new task
+ # this field can override cipd settings defined on the server,
+ # for testing purposes.
+ # This field is optional if default settings are configured on the server.
+ settings = messages.BytesField(1)
M-A Ruel 2016/05/11 14:56:45 why not expand it? I'd prefer that to encoded prot
nodir 2016/05/12 01:53:22 Done. This lead to rethinking of how I embed cipd
+ # List of CIPD packages to install in $CIPD_PATH prior task execution.
+ packages = messages.MessageField(CipdPackage, 2, repeated=True)
+
+
class TaskProperties(messages.Message):
"""Important metadata about a particular task."""
+ cipd_input = messages.MessageField(CipdInput, 10)
command = messages.StringField(1, repeated=True)
dimensions = messages.MessageField(StringPair, 2, repeated=True)
env = messages.MessageField(StringPair, 3, repeated=True)
@@ -101,7 +119,6 @@ class TaskProperties(messages.Message):
idempotent = messages.BooleanField(7)
inputs_ref = messages.MessageField(FilesRef, 8)
io_timeout_secs = messages.IntegerField(9)
- packages = messages.MessageField(CipdPackage, 10, repeated=True)
class NewTaskRequest(messages.Message):

Powered by Google App Engine
This is Rietveld 408576698