commit openSUSE-release-tools for openSUSE:Factory
Hello community, here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2018-04-26 13:38:34 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old) and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "openSUSE-release-tools" Thu Apr 26 13:38:34 2018 rev:86 rq:600971 version:20180425.8bb627d Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2018-04-25 10:02:42.247865210 +0200 +++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes 2018-04-26 13:38:38.626733390 +0200 @@ -1,0 +2,17 @@ +Wed Apr 25 09:50:31 UTC 2018 - opensuse-releaseteam@opensuse.org + +- Update to version 20180425.8bb627d: + * [oqamaint] Reset the hashes on every review round + * [oqamaint] Fix re-reviewing requests + * [oqamaint] Do not append to OS_TEST_ISSUES + * [oqamaint] Look at all open release requests for Updates + * [oqamaint] Reschedule Updates test if the list of incidents changed + * [oqamaint] Remove wrong entries in json + +------------------------------------------------------------------- +Wed Apr 25 01:23:09 UTC 2018 - opensuse-releaseteam@opensuse.org + +- Update to version 20180424.2010288: + * osclib/accept_command: avoid making empty commit to dashboard. + +------------------------------------------------------------------- Old: ---- openSUSE-release-tools-20180424.855f660.obscpio New: ---- openSUSE-release-tools-20180425.8bb627d.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openSUSE-release-tools.spec ++++++ --- /var/tmp/diff_new_pack.AIXwCk/_old 2018-04-26 13:38:39.230711253 +0200 +++ /var/tmp/diff_new_pack.AIXwCk/_new 2018-04-26 13:38:39.230711253 +0200 @@ -20,7 +20,7 @@ %define source_dir openSUSE-release-tools %define announcer_filename factory-package-news Name: openSUSE-release-tools -Version: 20180424.855f660 +Version: 20180425.8bb627d Release: 0 Summary: Tools to aid in staging and release work for openSUSE/SUSE License: GPL-2.0-or-later AND MIT ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.AIXwCk/_old 2018-04-26 13:38:39.282709347 +0200 +++ /var/tmp/diff_new_pack.AIXwCk/_new 2018-04-26 13:38:39.286709201 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param> - <param name="changesrevision">855f660bf4af3e275c86933c3420663d2fb53385</param> + <param name="changesrevision">8bb627d9bfe07dc22af6910b73564eef7cb0f53d</param> </service> </servicedata> ++++++ openSUSE-release-tools-20180424.855f660.obscpio -> openSUSE-release-tools-20180425.8bb627d.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180424.855f660/ReviewBot.py new/openSUSE-release-tools-20180425.8bb627d/ReviewBot.py --- old/openSUSE-release-tools-20180424.855f660/ReviewBot.py 2018-04-24 18:31:28.000000000 +0200 +++ new/openSUSE-release-tools-20180425.8bb627d/ReviewBot.py 2018-04-25 11:44:55.000000000 +0200 @@ -449,18 +449,23 @@ req.read(request) self.requests.append(req) - def set_request_ids_project(self, project, typename): + # also used by openqabot + def ids_project(self, project, typename): url = osc.core.makeurl(self.apiurl, ('search', 'request'), { 'match': "(state/@name='review' or state/@name='new') and (action/target/@project='%s' and action/@type='%s')" % (project, typename), 'withfullhistory': 1 }) root = ET.parse(osc.core.http_GET(url)).getroot() - self.requests = [] + ret = [] for request in root.findall('request'): req = osc.core.Request() req.read(request) - self.requests.append(req) + ret.append(req) + return ret + + def set_request_ids_project(self, project, typename): + self.requests = self.ids_project(project, typename) def comment_handler_add(self, level=logging.INFO): """Add handler to start recording log messages for comment.""" @@ -720,4 +725,3 @@ if __name__ == "__main__": app = CommandLineInterface() sys.exit( app.main() ) - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180424.855f660/data/incidents.json new/openSUSE-release-tools-20180425.8bb627d/data/incidents.json --- old/openSUSE-release-tools-20180424.855f660/data/incidents.json 2018-04-24 18:31:28.000000000 +0200 +++ new/openSUSE-release-tools-20180425.8bb627d/data/incidents.json 2018-04-25 11:44:55.000000000 +0200 @@ -17,20 +17,6 @@ "FLAVOR" : "Server-DVD-Incidents", "VERSION" : "12-SP1" }, - "openSUSE:Leap:42.3:Update" : { - "FLAVOR" : "Maintenance", - "VERSION" : "42.3", - "DISTRI" : "opensuse", - "ARCH" : "x86_64", - "ISO" : "openSUSE-Leap-42.3-DVD-x86_64.iso" - }, - "openSUSE:Leap:15.0:Update" : { - "FLAVOR" : "Maintenance", - "VERSION" : "15.0", - "DISTRI" : "opensuse", - "ARCH" : "x86_64", - "ISO" : "openSUSE-Leap-15.0-DVD-x86_64.iso" - }, "SUSE:Updates:SLE-DESKTOP:12-SP3:x86_64" : { "FLAVOR" : "Desktop-DVD-Incidents", "VERSION" : "12-SP3", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180424.855f660/data/repos.json new/openSUSE-release-tools-20180425.8bb627d/data/repos.json --- old/openSUSE-release-tools-20180424.855f660/data/repos.json 2018-04-24 18:31:28.000000000 +0200 +++ new/openSUSE-release-tools-20180425.8bb627d/data/repos.json 2018-04-25 11:44:55.000000000 +0200 @@ -41,17 +41,11 @@ }, "repos" : [ "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP3/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP3:/x86...", "http://download.suse.de/ibs/SUSE/Updates/SLE-SDK/12-SP3/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SDK:/12-SP3:/x86_64...", "http://download.suse.de/ibs/SUSE/Updates/SLE-WE/12-SP3/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-WE:/12-SP3:/x86_64/...", "http://download.suse.de/ibs/SUSE/Updates/SLE-Module-Web-Scripting/12/x86_64/...", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-Module-Web-Scriptin...", "http://download.suse.de/ibs/SUSE/Updates/SLE-Module-Toolchain/12/x86_64/upda...", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-Module-Toolchain:/1...", - "http://download.suse.de/ibs/SUSE/Updates/SLE-Module-HPC/12/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-Module-HPC:/12:/x86..." + "http://download.suse.de/ibs/SUSE/Updates/SLE-Module-HPC/12/x86_64/update/" ], "settings" : { "VERSION" : "12-SP3", @@ -71,8 +65,6 @@ "test" : "qam-gnome", "repos" : [ "http://download.suse.de/ibs/SUSE/Updates/SLE-DESKTOP/12-SP3/x86_64/update/", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-DESKTOP:/12-SP3:/x8...", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SDK:/12-SP3:/x86_64...", "http://download.suse.de/ibs/SUSE/Updates/SLE-SDK/12-SP3/x86_64/update/" ], "incidents" : { @@ -89,8 +81,7 @@ }, "test" : "qam-gnome", "repos" : [ - "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP1-LTSS/x86_64/updat...", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP1-LTSS..." + "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP1-LTSS/x86_64/updat..." ], "incidents" : { "OS" : "SUSE:Maintenance:Test:SLE-SERVER:12-SP1-LTSS:x86_64" @@ -108,8 +99,7 @@ "OS" : "SUSE:Maintenance:Test:SLE-SERVER:12-SP2-LTSS:x86_64" }, "repos" : [ - "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP2-LTSS/x86_64/updat...", - "http://download.suse.de/ibs/SUSE:/Maintenance:/Test:/SLE-SERVER:/12-SP2-LTSS..." + "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-SP2-LTSS/x86_64/updat..." ] }, "SUSE:Updates:SLE-SERVER:12-LTSS:x86_64" : { @@ -117,8 +107,7 @@ "OS" : "SUSE:Maintenance:Test:SLE-SERVER:12-LTSS:x86_64" }, "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:/x8..." + "http://download.suse.de/ibs/SUSE/Updates/SLE-SERVER/12-LTSS/x86_64/update/" ], "settings" : { "DISTRI" : "sle", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180424.855f660/oqamaint/openqabot.py new/openSUSE-release-tools-20180425.8bb627d/oqamaint/openqabot.py --- old/openSUSE-release-tools-20180424.855f660/oqamaint/openqabot.py 2018-04-24 18:31:28.000000000 +0200 +++ new/openSUSE-release-tools-20180425.8bb627d/oqamaint/openqabot.py 2018-04-25 11:44:55.000000000 +0200 @@ -46,9 +46,6 @@ self.force = False self.openqa = None self.commentapi = CommentAPI(self.apiurl) - self.update_test_builds = {} - self.pending_target_repos = set() - self.openqa_jobs = {} def gather_test_builds(self): for prj, u in self.tgt_repo[self.openqa.baseurl].items(): @@ -69,6 +66,12 @@ # reimplemention from baseclass def check_requests(self): + # to be filled by repos of active + self.incident_repos = dict() + self.update_test_builds = {} + self.pending_target_repos = set() + self.openqa_jobs = {} + if self.ibs: self.check_suse_incidents() else: @@ -77,39 +80,18 @@ # first calculate the latest build number for current jobs self.gather_test_builds() - started = [] - # then check progress on running incidents - for req in self.requests: - jobs = self.request_get_openqa_jobs(req, incident=True, test_repo=True) - ret = self.calculate_qa_status(jobs) - if ret != QA_UNKNOWN: - started.append(req) - - all_requests = self.requests - self.requests = started - self.logger.debug("check started requests") super(OpenQABot, self).check_requests() - self.requests = all_requests - - skipped_one = False # now make sure the jobs are for current repo for prj, u in self.tgt_repo[self.openqa.baseurl].items(): if prj in self.pending_target_repos: - skipped_one = True + self.logger.debug("Do not trigger for " + prj) continue self.trigger_build_for_target(prj, u) - # do not schedule new incidents unless we finished - # last wave - if skipped_one: - return - self.logger.debug("Check all requests") - super(OpenQABot, self).check_requests() - # check a set of repos for their primary checksums @staticmethod - def calculate_repo_hash(repos): + def calculate_repo_hash(repos, incidents): m = md5.new() # if you want to force it, increase this number m.update('b') @@ -122,6 +104,8 @@ cs = root.find( './/{http://linux.duke.edu/metadata/repo}data[@type="primary"]/{http://linux.duke.edu/metadata/repo}checksum') m.update(cs.text) + # now add the open incidents + m.update(json.dumps(incidents, sort_keys=True)) return m.hexdigest() def is_incident_in_testing(self, incident): @@ -192,9 +176,9 @@ today = date.today().strftime("%Y%m%d") try: - repohash = self.calculate_repo_hash(data['repos']) + repohash = self.calculate_repo_hash(data['repos'], self.incident_repos.get(prj, {})) except HTTPError as e: - self.logger.debug("REPOHAS not calculated with response {}".format(e)) + self.logger.debug("REPOHASH not calculated with response {}".format(e)) return buildnr = None @@ -241,25 +225,41 @@ self.logger.error(e) self.update_test_builds[prj] = buildnr - def request_get_openqa_jobs(self, req, incident=True, test_repo=False): - ret = None + def request_get_openqa_status(self, req): types = {a.type for a in req.actions} - if 'maintenance_release' in types: - src_prjs = {a.src_project for a in req.actions} - if len(src_prjs) != 1: - raise Exception("can't handle maintenance_release from different incidents") - build = src_prjs.pop() - tgt_prjs = {a.tgt_project for a in req.actions} - ret = [] - if incident: - ret += self.openqa_jobs.get(build, []) - for prj in sorted(tgt_prjs): - repo_settings = self.tgt_repo.get(self.openqa.baseurl, {}) - if test_repo and prj in repo_settings: - repo_jobs = self.openqa_jobs[prj] - ret += repo_jobs + if not 'maintenance_release' in types: + return [], QA_UNKNOWN - return ret + src_prjs = {a.src_project for a in req.actions} + if len(src_prjs) != 1: + raise Exception("can't handle maintenance_release from different incidents") + build = src_prjs.pop() + incident_id = build.split(':')[-1] + tgt_prjs = {a.tgt_project for a in req.actions} + jobs = self.openqa_jobs.get(build, []) + qa_status = self.calculate_qa_status(jobs) + if qa_status == QA_UNKNOWN or qa_status == QA_INPROGRESS: + return jobs, qa_status + + # check if the repo jobs include the incident + repo_jobs = [] + for prj in sorted(tgt_prjs): + repo_settings = self.tgt_repo.get(self.openqa.baseurl, {}) + if prj in repo_settings: + repo_jobs += self.openqa_jobs[prj] + for job in repo_jobs: + foundissue = False + for key, value in job['settings'].items(): + if key.endswith('_TEST_ISSUES'): + if incident_id in value.split(','): + foundissue = True + if not foundissue: + self.logger.info("Repo job {} not for {} - ignoring".format(job['id'], incident_id)) + return jobs, QA_INPROGRESS + #print(foundissue, incident_id, json.dumps(job['settings'], indent=4)) + + jobs += repo_jobs + return jobs, self.calculate_qa_status(jobs) def calculate_qa_status(self, jobs=None): if not jobs: @@ -378,39 +378,15 @@ ret = None try: - jobs = self.request_get_openqa_jobs(req) - qa_state = self.calculate_qa_status(jobs) + jobs, qa_state = self.request_get_openqa_status(req) self.logger.debug("request %s state %s", req.reqid, qa_state) msg = None - if self.force or qa_state == QA_UNKNOWN: - ret = super(OpenQABot, self).check_one_request(req) - jobs = self.request_get_openqa_jobs(req) - - if self.force: - # make sure to delete previous comments if we're forcing - info = self.find_obs_request_comment(request_id=req.reqid) - if 'id' in info: - self.logger.debug("deleting old comment %s", info['id']) - if not self.dryrun: - self.commentapi.delete(info['id']) - - if jobs: - # no notification until the result is done - osc.core.change_review_state(self.apiurl, req.reqid, newstate='new', - by_group=self.review_group, by_user=self.review_user, - message='now testing in openQA') - else: + if qa_state == QA_UNKNOWN: + if not jobs: msg = "no openQA tests defined" self.comment_write(state='done', message=msg, request=req, result='accepted') - ret = True + return True elif qa_state == QA_FAILED or qa_state == QA_PASSED: - # don't take test repo results into the calculation of total - # this is for humans to decide which incident broke the test repo - jobs += self.request_get_openqa_jobs(req, incident=False, test_repo=True) - if self.calculate_qa_status(jobs) == QA_INPROGRESS: - self.logger.info( - "incident tests for request %s are done, but need to wait for test repo", req.reqid) - return if qa_state == QA_PASSED: msg = "openQA tests passed\n" result = 'accepted' @@ -431,7 +407,7 @@ import traceback self.logger.error("unhandled exception in openQA Bot") self.logger.error(traceback.format_exc()) - ret = None + return None return ret @@ -449,12 +425,12 @@ need = False settings = {'VERSION': pmap['version']} settings['ARCH'] = arch if arch else 'x86_64' - settings['DISTRI'] = 'sle' if 'distri' not in pmap else pmap['distri'] + settings['DISTRI'] = pmap.get('distri', 'sle') issues = pmap.get('issues', {}) issues['OS_TEST_ISSUES'] = issues.get('OS_TEST_ISSUES', product_prefix) required_issue = pmap.get('required_issue', False) for key, prefix in issues.items(): - self.logger.debug("KP {} {}".format(key, prefix) + str(job)) + #self.logger.debug("KP {} {}".format(key, prefix) + str(job)) channel = prefix if arch: channel += arch @@ -482,6 +458,8 @@ job['openqa_build'] = update.get_max_revision(job) if not job.get('openqa_build'): return [] + self.incident_repos.setdefault(product_prefix, dict())[ + str(job['id'])] = job.get('openqa_build') j['BUILD'] += '.' + str(job['openqa_build']) j.update(settings) # kGraft jobs can have different version @@ -518,7 +496,13 @@ # for SUSE we use mesh for openSUSE we limit the jobs to open release requests def check_opensuse_incidents(self): - for req in self.requests: + requests = [] + for prj in self.tgt_repo[self.openqa.baseurl].keys(): + requests += self.ids_project(prj, 'maintenance_release') + + # to be stored in settings + issues = dict() + for req in requests: types = set([a.type for a in req.actions]) if not 'maintenance_release' in types: continue @@ -536,13 +520,11 @@ incident_id = build.split(':')[-1] self.test_job({'project': build, 'id': incident_id, 'channels': [prj]}) - issues = self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'].split( - ',') - # filter empty values - issues = filter(None, issues) - issues.append(incident_id) - self.tgt_repo[self.openqa.baseurl][prj]['settings']['OS_TEST_ISSUES'] = ','.join( - issues) + issues.setdefault(prj, set()).add(incident_id) + + for prj in self.tgt_repo[self.openqa.baseurl].keys(): + s = self.tgt_repo[self.openqa.baseurl][prj]['settings'] + s['OS_TEST_ISSUES'] = ','.join(sorted(issues.get(prj, set()))) def check_suse_incidents(self): for inc in requests.get('https://maintenance.suse.de/api/incident/active/').json(): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20180424.855f660/osclib/accept_command.py new/openSUSE-release-tools-20180425.8bb627d/osclib/accept_command.py --- old/openSUSE-release-tools-20180424.855f660/osclib/accept_command.py 2018-04-24 18:31:28.000000000 +0200 +++ new/openSUSE-release-tools-20180425.8bb627d/osclib/accept_command.py 2018-04-25 11:44:55.000000000 +0200 @@ -67,13 +67,11 @@ return rqs def reset_rebuild_data(self, project): - url = self.api.makeurl(['source', self.api.cstaging, 'dashboard', 'support_pkg_rebuild?expand=1']) - try: - data = http_GET(url) - except urllib2.HTTPError: + data = self.api.dashboard_content_load('support_pkg_rebuild') + if data is None: return - tree = ET.parse(data) - root = tree.getroot() + + root = ET.fromstring(data) for stg in root.findall('staging'): if stg.get('name') == project: stg.find('rebuild').text = 'unknown' @@ -81,9 +79,9 @@ # reset accpted staging project rebuild state to unknown and clean up # supportpkg list - url = self.api.makeurl(['source', self.api.cstaging, 'dashboard', 'support_pkg_rebuild']) content = ET.tostring(root) - http_PUT(url + '?comment=accept+command+update', data=content) + if content != data: + self.api.dashboard_content_save('support_pkg_rebuild', content, 'accept command update') def virtually_accept_delete(self, request_id, package): self.api.add_review(request_id, by_group=self.api.cdelreq_review, msg='Request accepted. Cleanup in progress - DO NOT REVOKE!') ++++++ openSUSE-release-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.AIXwCk/_old 2018-04-26 13:38:40.050681198 +0200 +++ /var/tmp/diff_new_pack.AIXwCk/_new 2018-04-26 13:38:40.054681052 +0200 @@ -1,5 +1,5 @@ name: openSUSE-release-tools -version: 20180424.855f660 -mtime: 1524587488 -commit: 855f660bf4af3e275c86933c3420663d2fb53385 +version: 20180425.8bb627d +mtime: 1524649495 +commit: 8bb627d9bfe07dc22af6910b73564eef7cb0f53d
participants (1)
-
root@hilbert.suse.de