From 3457f7224cfa8b58201c2fcd397c126ce8246671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Thu, 15 Jun 2017 19:46:26 +0200 Subject: [PATCH 1/2] Fix SLE-12-SP1-LTSS project link and make url consistent --- data/repos.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/data/repos.json b/data/repos.json index 13c115ab..1cb651bb 100644 --- a/data/repos.json +++ b/data/repos.json @@ -49,7 +49,7 @@ "SUSE:Updates:SLE-DESKTOP:12-SP2:x86_64": { "repos": [ "http://download.suse.de/ibs/SUSE/Updates/SLE-DESKTOP/12-SP2/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-DESKTOP:/12-SP2:/x86_64/update", + "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-DESKTOP:/12-SP2:/x86_64/update/", "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SDK:/12-SP2:/x86_64/update/", "http://download.suse.de/ibs/SUSE/Updates/SLE-SDK/12-SP2/x86_64/update/" ], @@ -69,7 +69,7 @@ }, "repos": [ "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-LTSS/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-LTSS:/x86_64/update" + "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-LTSS:/x86_64/update/" ], "settings": [ { @@ -83,11 +83,11 @@ }, "SUSE:Updates:SLE-SERVER:12-SP1-LTSS:x86_64": { "incidents": { - "OS": "SUSE:Maintenance:Test:SERVER:12-SP1-LTSS:x86_64" + "OS": "SUSE:Maintenance:Test:SLE-SERVER:12-SP1-LTSS:x86_64" }, "repos": [ "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP1-LTSS/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP1-LTSS:/x86_64/update" + "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP1-LTSS:/x86_64/update/" ], "settings": [ { @@ -110,7 +110,7 @@ }, "repos": [ "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP2/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP2:/x86_64/update", + "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP2:/x86_64/update/", "http://download.suse.de/ibs/SUSE/Updates/SLE-SDK/12-SP2/x86_64/update/", "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SDK:/12-SP2:/x86_64/update/", "http://download.suse.de/ibs/SUSE/Updates/SLE-WE/12-SP2/x86_64/update/", From 8220a6a1c74405a5a03080cf2656bb4d7b803568 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= Date: Thu, 15 Jun 2017 19:49:04 +0200 Subject: [PATCH 2/2] Small fixes and optimalization calculate_incidents now retuns list of tuples --- openqa-maintenance.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openqa-maintenance.py b/openqa-maintenance.py index 2f90855d..13cd1b43 100755 --- a/openqa-maintenance.py +++ b/openqa-maintenance.py @@ -500,13 +500,14 @@ class OpenQABot(ReviewBot.ReviewBot): def calculate_incidents(self, incidents): """ - get incidet numbers from SUSE:Maintenance:Test project + get incident numbers from SUSE:Maintenance:Test project returns dict with openQA var name : string with numbers """ - l_incidents={} + l_incidents=[] for kind, prj in incidents.items(): - iid = ','.join([x.split('.')[1] for x in osc.core.meta_get_packagelist(self.apiurl, prj)]) - l_incidents[kind+'_TEST_ISSUES']=iid + # TODO: unfortuanetly this works correctly only for IBS ( OBS using + # incident_NR ) + l_incidents.append((kind + '_TEST_ISSUES', ','.join([x.split('.')[1] for x in osc.core.meta_get_packagelist(self.apiurl, prj)]))) return l_incidents def jobs_for_target(self, data): @@ -558,11 +559,10 @@ class OpenQABot(ReviewBot.ReviewBot): buildnr = "%s-%d" % (today, buildnr + 1) for s in data['settings']: - if 'incidents' in data.keys(): - incidents = self.calculate_incidents(data['incidents']) - for x,y in incidents.items(): - s[x]=y # now schedule it for real + if 'incidents' in data.keys(): + for x,y in self.calculate_incidents(data['incidents']): + s[x]=y s['BUILD'] = buildnr s['REPOHASH'] = repohash self.openqa.openqa_request('POST', 'isos', data=s, retries=1)