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

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: rebased 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
« no previous file with comments | « appengine/swarming/server/task_request_test.py ('k') | appengine/swarming/test_env_handlers.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/swarming_rpcs.py
diff --git a/appengine/swarming/swarming_rpcs.py b/appengine/swarming/swarming_rpcs.py
index b9f61c49be939eb7e19bb2c80fd987a54a2f3060..75cf0986aa56d3b1c793b4e5f47e5c05fa09c756 100644
--- a/appengine/swarming/swarming_rpcs.py
+++ b/appengine/swarming/swarming_rpcs.py
@@ -84,14 +84,37 @@ 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.
+ """
+ # URL of the CIPD server. Must start with "https://" or "http://".
+ # This field or its subfields are optional if default cipd client is defined
+ # in the server config.
+ server = messages.StringField(1)
+
+ # CIPD package of CIPD client to use.
+ # client_package.version is required.
+ # This field is optional is default value is defined in the server config.
+ client_package = messages.MessageField(CipdPackage, 2)
+
+ # List of CIPD packages to install in $CIPD_PATH prior task execution.
+ packages = messages.MessageField(CipdPackage, 3, 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 +124,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):
« no previous file with comments | « appengine/swarming/server/task_request_test.py ('k') | appengine/swarming/test_env_handlers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698