From fc0a11ebc4890c8da2ee568a1ec3df8c594bcf50 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Thu, 28 Sep 2017 14:58:59 -0400 Subject: [PATCH] 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 --- files/subunit-gearman-worker.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/subunit-gearman-worker.py b/files/subunit-gearman-worker.py index 0679260..e6b3107 100644 --- a/files/subunit-gearman-worker.py +++ b/files/subunit-gearman-worker.py @@ -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