Keyvals
Job keyvals are key/
The initial job keyvals get specified as part of the arguments to the create_job
RPC and entered into the database (into the afe_job_keyvals table). Then, before
we go to run a job, we pull the keyvals out of the database and write them to a
file. This is done by a class named TaskWithJobKeyvals that is a mixin that gets
included for the Agents representing job runs. The parsing of these keyvals back
into the database happens when the scheduler kicks off tko/
afe_job_keyvals stores the a job's suite and build information.
tko_job_keyvals stores the test result information, including:
user that requested the job
job start/
perf keyvals, which are up to individual tests to create as they see fit. The use and lifecycle of perf keyvals is explained in detail on a separate webpage.
Importantly, the tko_job_keyvals entry for a suite job stores a dictionary between hashed test names and job_id-owner. After a suite job is finished, run_suite uses this dictionary to find out the job url for a particular test. The reason for this is that when a suite is started, all keyvals are keyed by suite job id. The test job id is set only after the test job is started. After a test job has finished, autoserv creates logs a keyval (for the test’s job id) with the hashed test name as the key and job_id-owner as the value. run_suite pulls the keyval from tko_job_keyval table and maps the test job to its result page, which is the test job page, rather than suite job page.