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

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

Issue 2870793002: swarming: fix support for raw command + isolated file (Closed)
Patch Set: . Created 3 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/server/task_request.py
diff --git a/appengine/swarming/server/task_request.py b/appengine/swarming/server/task_request.py
index 8e2ecd98f8b398ea310a6ab108f92c6522d0cf48..5ef30bcfb5cc74e2243eb3eb366655c580098547 100644
--- a/appengine/swarming/server/task_request.py
+++ b/appengine/swarming/server/task_request.py
@@ -292,6 +292,8 @@ class FilesRef(ndb.Model):
namespace = ndb.StringProperty(validator=_validate_namespace, indexed=False)
def _pre_put_hook(self):
+ # TODO(maruel): Get default value from config
+ # IsolateSettings.default_server.
super(FilesRef, self)._pre_put_hook()
if not self.isolatedserver or not self.namespace:
raise datastore_errors.BadValueError(
@@ -511,6 +513,9 @@ class TaskProperties(ndb.Model):
if not self.command and not isolated_input:
raise datastore_errors.BadValueError(
'use at least one of command or inputs_ref.isolated')
+ if self.command and self.extra_args:
+ raise datastore_errors.BadValueError(
+ 'can\'t use both command and extra_args')
if self.extra_args and not isolated_input:
raise datastore_errors.BadValueError(
'extra_args require inputs_ref.isolated')

Powered by Google App Engine
This is Rietveld 408576698