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

Unified Diff: dashboard/dashboard/pinpoint/models/job.py

Issue 2996473002: [pinpoint] Add QuestGenerator object. (Closed)
Patch Set: QuestGenerator Created 3 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: dashboard/dashboard/pinpoint/models/job.py
diff --git a/dashboard/dashboard/pinpoint/models/job.py b/dashboard/dashboard/pinpoint/models/job.py
index 0be28e3f9c6915888a219c293e3940ff76d9bf0d..c52ed991c958a522af1cee0a728d8a376601f095 100644
--- a/dashboard/dashboard/pinpoint/models/job.py
+++ b/dashboard/dashboard/pinpoint/models/job.py
@@ -14,7 +14,6 @@ from dashboard.common import utils
from dashboard.pinpoint import mann_whitney_u
from dashboard.pinpoint.models import attempt as attempt_module
from dashboard.pinpoint.models import change as change_module
-from dashboard.pinpoint.models import quest as quest_module
from dashboard.services import issue_tracker_service
@@ -59,10 +58,7 @@ class Job(ndb.Model):
exception = ndb.StringProperty()
# Request parameters.
- configuration = ndb.StringProperty(required=True)
- test_suite = ndb.StringProperty()
- test = ndb.StringProperty()
- metric = ndb.StringProperty()
+ arguments = ndb.JsonProperty(required=True)
# If True, the service should pick additional Changes to run (bisect).
# If False, only run the Changes explicitly added by the user.
@@ -75,21 +71,10 @@ class Job(ndb.Model):
state = ndb.PickleProperty(required=True)
@classmethod
- def New(cls, configuration, test_suite, test, metric, auto_explore, bug_id):
- # Get list of quests.
- quests = [quest_module.FindIsolate(configuration)]
- if test_suite:
- quests.append(quest_module.RunTest(configuration, test_suite, test,
- _DEFAULT_REPEAT_COUNT))
- if metric:
- quests.append(quest_module.ReadValue(metric, test))
-
+ def New(cls, arguments, quests, auto_explore, bug_id):
# Create job.
return cls(
- configuration=configuration,
- test_suite=test_suite,
- test=test,
- metric=metric,
+ arguments=arguments,
auto_explore=auto_explore,
bug_id=bug_id,
state=_JobState(quests, _DEFAULT_ATTEMPT_COUNT))
@@ -164,10 +149,7 @@ class Job(ndb.Model):
return {
'job_id': self.job_id,
- 'configuration': self.configuration,
- 'test_suite': self.test_suite,
- 'test': self.test,
- 'metric': self.metric,
+ 'arguments': self.arguments,
'auto_explore': self.auto_explore,
'created': self.created.strftime('%Y-%m-%d %H:%M:%S %Z'),

Powered by Google App Engine
This is Rietveld 408576698