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

Unified Diff: appengine/swarming/server/task_request.py

Issue 2453873002: Add --output option to Swarming client and pass it through to the bot (Closed)
Patch Set: Extra help text for examples Created 4 years, 2 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/local_smoke_test.py ('k') | appengine/swarming/server/task_request_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/swarming/server/task_request.py
diff --git a/appengine/swarming/server/task_request.py b/appengine/swarming/server/task_request.py
index de0aa0dc7533984c9ddd900d34937571fd573c87..79023af882cbd2a0c781bd1226f2bc216009342a 100644
--- a/appengine/swarming/server/task_request.py
+++ b/appengine/swarming/server/task_request.py
@@ -226,13 +226,21 @@ def _validate_package_version(prop, value):
def _validate_package_path(_prop, path):
"""Validates a CIPD installation path."""
+ if not path:
+ raise datastore_errors.BadValueError(
+ 'CIPD package path is required. Use "." to install to run dir.')
_validate_rel_path('CIPD package path', path)
+def _validate_output_path(_prop, value):
+ """Validates a path for an output file."""
+ _validate_rel_path('output file', value)
+
+
def _validate_rel_path(value_name, path):
if not path:
raise datastore_errors.BadValueError(
- '%s is required. Use "." to install to run dir.' % value_name)
+ 'No argument provided for %s.' % value_name)
if '\\' in path:
raise datastore_errors.BadValueError(
'%s cannot contain \\. On Windows forward-slashes '
@@ -449,6 +457,12 @@ class TaskProperties(ndb.Model):
# task.
idempotent = ndb.BooleanProperty(default=False, indexed=False)
+ # A list of outputs expected. If empty, all files written to
+ # $(ISOLATED_OUTDIR) will be returned; otherwise, the files in this list
+ # will be added to those in that directory.
+ outputs = ndb.StringProperty(repeated=True, indexed=False,
+ validator=_validate_output_path)
+
@property
def is_terminate(self):
"""If True, it is a terminate request."""
« no previous file with comments | « appengine/swarming/local_smoke_test.py ('k') | appengine/swarming/server/task_request_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698