Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
log.debug('Config is: %s', job.body)
job_config = yaml.safe_load(job.body)
- job_config['job_id'] = job.jid
+ job_config['job_id'] = str(job.jid)
safe_archive = safepath.munge(job_config['name'])
archive_path_full = os.path.join(ctx.archive_dir, safe_archive, str(job.jid))
job_config['archive_path'] = archive_path_full
from .orchestra import monkey
monkey.patch_all()
-
# WARNING: Do not import any modules that import logging before this next
# block. That would cause connections to hang because the monkey patching
# hadn't been done.
from teuthology.misc import get_user
ctx.owner = get_user()
+ # Older versions of teuthology stored job_id as an int. Convert it to a str
+ # if necessary.
+ job_id = ctx.config.get('job_id')
+ if job_id is not None:
+ job_id = str(job_id)
+ ctx.config['job_id'] = job_id
+
write_initial_metadata(ctx)
report.try_push_job_info(ctx.config)