[autotest] Thread priority from create_suite_job through to create_job.
This schedules a suite job itself at the same priority level of its
tests, and also injects the priority value into the suite control files.
The change to thread priority through from dynamic_suite into create_job
needs to happen concurrently, because the type of `priority` is changing
from a string to an int. This also means everything that passes in a
priority gets fixed up in this CL.
suite_scheduler has also been tweaked to schedule all tests at the
PostBuild priority (for now...).
This also does all of the work to get priority to show up by name
instead of by integral value. In the create_job pane, we disallow
anyone to schedule a job at a priority that would preempt major build
processes (anything coming from a waterfall). However, all old jobs are
shown at the integral value, because showing two seperate priority
scales at the same time would be incredibly confusing. (Especially
since URGENT would be incredibly low priority)
BUG=chromium:250583
DEPLOY=afe, apache, suite_scheduler
TEST=unit, run_suite with a priority level
Change-Id: I9ecf5ceed5c58bd8ee0815c6d15f4aba300082fe
Reviewed-on: https://chromium-review.googlesource.com/168143
Reviewed-by: Alex Miller <milleral@chromium.org>
Tested-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Alex Miller <milleral@chromium.org>
diff --git a/frontend/afe/rpc_interface_unittest.py b/frontend/afe/rpc_interface_unittest.py
index 332482e..503f555 100755
--- a/frontend/afe/rpc_interface_unittest.py
+++ b/frontend/afe/rpc_interface_unittest.py
@@ -11,6 +11,7 @@
from autotest_lib.client.common_lib import global_config
from autotest_lib.client.common_lib import control_data
from autotest_lib.client.common_lib import error
+from autotest_lib.client.common_lib import priorities
CLIENT = control_data.CONTROL_TYPE_NAMES.CLIENT
SERVER = control_data.CONTROL_TYPE_NAMES.SERVER
@@ -365,7 +366,7 @@
job_parameters = {'key': ('value', string_type)}
job_id = rpc_interface.create_parameterized_job(
- name='job', priority=models.Job.Priority.MEDIUM, test='test',
+ name='job', priority=priorities.Priority.DEFAULT, test='test',
parameters=job_parameters, kernel=kernels, label='label1',
profilers=profilers, profiler_parameters=profiler_parameters,
profile_only=False, hosts=('host1',))