Strip legacy prefix if it's present

Migrated jobs have the legacy- prefix which makes tracking things across
the migration a bit difficult. This commit strips that from the job
name on db insertion.

Change-Id: Ibfca7a7f4ff66ec6d3809f0ee96a98d598e27e91
This commit is contained in:
Matthew Treinish 2017-09-28 14:58:59 -04:00
parent 2a7070995e
commit fc0a11ebc4
No known key found for this signature in database
GPG Key ID: FD12A0F214C9E177
1 changed files with 2 additions and 0 deletions

View File

@ -73,6 +73,8 @@ class SubunitRetriever(object):
project = meta['project'].split('/')[-1]
if project not in job_name:
job_name = '-'.join([job_name, project])
if job_name.startswith('legacy-'):
job_name = job_name[7:]
meta['build_name'] = job_name
return meta