[autotest] Add a new field require_ssp in afe_jobs table
When a job is created, data in control file is parsed and saved in afe_jobs.
scheduler picks up the database row and tries to compile the commandline for
autoserv to run. require_ssp (require server-side packaging) is a new field
will be added to control file to force to use/do not use ssp when running
a server side test.
If the value is True or None(default), server-side packaging will be applied
to run server side test, if global config AUTOSERV/enable_ssp_container is
set to True.
Since the attribute can only be retrieved when parsing control file, it needs
to be stored in afe_jobs table. Therefore, the new field is added to the table.
require_ssp is nullable and has no default value, so the sql command should
only take several minutes to finish in production database.
BUG=chromium:453624
TEST=local run migrate.py sync and migrate.py sync 97
run scheduler locally and run a dummy suite, confirm scheduler and other
components work without issue (refer to bug 459523).
DEPLOY=migrate, db must be migrated after this CL is pushed to prod. Otherwise
scheduler will fail.
Change-Id: I7c65150b7ee3309310fdbed42b5079e564845a65
Reviewed-on: https://chromium-review.googlesource.com/251340
Trybot-Ready: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
diff --git a/frontend/afe/models_test.py b/frontend/afe/models_test.py
index 993f145..8219755 100755
--- a/frontend/afe/models_test.py
+++ b/frontend/afe/models_test.py
@@ -506,7 +506,8 @@
'synch_count': 1,
'test_retry': 0,
'timeout': 24,
- 'timeout_mins': 1440},
+ 'timeout_mins': 1440,
+ 'require_ssp': None},
{'control_file': 'some control file\n\n\n',
'control_type': 2,
'created_on': '2014-09-04T13:09:35',
@@ -573,7 +574,8 @@
'synch_count': 1,
'test_retry': 0,
'timeout': 24,
- 'timeout_mins': 1440}]}
+ 'timeout_mins': 1440,
+ 'require_ssp': None}]}
def test_response(self):