[autotest] Explicitly cast job_id to int in sequences.
This prepares the way for job_directories.get_job_id_or_task_id() to
return opaque str ids
BUG=chromium:842343
TEST=None
Change-Id: If899534674eb84739894d00c2b090274e5d46a51
Reviewed-on: https://chromium-review.googlesource.com/1056408
Commit-Ready: ChromeOS CL Exonerator Bot <[email protected]>
Tested-by: Prathmesh Prabhu <[email protected]>
Reviewed-by: Prathmesh Prabhu <[email protected]>
Reviewed-by: Xixuan Wu <[email protected]>
diff --git a/server/sequence.py b/server/sequence.py
index 836d9f9..a44f65f 100644
--- a/server/sequence.py
+++ b/server/sequence.py
@@ -134,7 +134,11 @@
"""
afe = frontend_wrappers.RetryingAFE(timeout_min=30, delay_sec=10,
user=job.user, debug=False)
- current_job_id = job_directories.get_job_id_or_task_id(job.resultdir)
+ # job_directores.get_job_id_or_task_id() will return a non-int opaque id
+ # for Chrome OS Skylab tasks. But sequences will break in that case
+ # anyway, because they try to create AFE jobs internally.
+ current_job_id = int(
+ job_directories.get_job_id_or_task_id(job.resultdir))
logging.debug('Current job id: %s', current_job_id)
runtime_mins = self.child_job_timeout()
hostname = utils.get_hostname_from_machine(machine)