Hello community, here is the log from the commit of package openSUSE-release-tools for openSUSE:Factory checked in at 2020-01-31 23:57:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old) and /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "openSUSE-release-tools" Fri Jan 31 23:57:38 2020 rev:273 rq:768986 version:20200131.38632736 Changes: -------- --- /work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes 2020-01-30 22:37:44.172590145 +0100 +++ /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new.26092/openSUSE-release-tools.changes 2020-01-31 23:59:01.455705498 +0100 @@ -1,0 +2,33 @@ +Fri Jan 31 07:54:53 UTC 2020 - opensuse-releaseteam@opensuse.org + +- Update to version 20200131.38632736: + * dashboard: Add openQA results + * Add the same link to openqa than what is on obs_factory + * Dashboard: link the product package + +------------------------------------------------------------------- +Thu Jan 30 21:03:49 UTC 2020 - opensuse-releaseteam@opensuse.org + +- Update to version 20200130.1ad5de89: + * dashboard: Output the time in UTC + +------------------------------------------------------------------- +Thu Jan 30 20:53:26 UTC 2020 - opensuse-releaseteam@opensuse.org + +- Update to version 20200130.cb660d72: + * Add timestamp to the page for update info + * Add versions to the dashboard + +------------------------------------------------------------------- +Thu Jan 30 16:08:31 UTC 2020 - opensuse-releaseteam@opensuse.org + +- Update to version 20200130.063dd72a: + * One more fix for the dashboard generator config + +------------------------------------------------------------------- +Thu Jan 30 16:04:36 UTC 2020 - opensuse-releaseteam@opensuse.org + +- Update to version 20200130.1335e55b: + * Fix indentation of gocd config + +------------------------------------------------------------------- Old: ---- openSUSE-release-tools-20200130.02d3038b.obscpio New: ---- openSUSE-release-tools-20200131.38632736.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ openSUSE-release-tools.spec ++++++ --- /var/tmp/diff_new_pack.BboJKU/_old 2020-01-31 23:59:02.411705993 +0100 +++ /var/tmp/diff_new_pack.BboJKU/_new 2020-01-31 23:59:02.411705993 +0100 @@ -20,7 +20,7 @@ %define source_dir openSUSE-release-tools %define announcer_filename factory-package-news Name: openSUSE-release-tools -Version: 20200130.02d3038b +Version: 20200131.38632736 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.BboJKU/_old 2020-01-31 23:59:02.455706016 +0100 +++ /var/tmp/diff_new_pack.BboJKU/_new 2020-01-31 23:59:02.455706016 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/openSUSE/openSUSE-release-tools.git</param> - <param name="changesrevision">5788e9ce2f17a3db2937177829a41c37bb78e712</param> + <param name="changesrevision">34ecf36d357e0f1fbf345a7ccb9d66e9663b37d8</param> </service> </servicedata> ++++++ openSUSE-release-tools-20200130.02d3038b.obscpio -> openSUSE-release-tools-20200131.38632736.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20200130.02d3038b/dashboard/generate.py new/openSUSE-release-tools-20200131.38632736/dashboard/generate.py --- old/openSUSE-release-tools-20200130.02d3038b/dashboard/generate.py 2020-01-30 16:57:27.000000000 +0100 +++ new/openSUSE-release-tools-20200131.38632736/dashboard/generate.py 2020-01-31 08:53:01.000000000 +0100 @@ -7,16 +7,19 @@ import json import osc import re +import yaml from time import sleep from osc.core import http_GET, http_POST, makeurl, show_project_meta from M2Crypto.SSL import SSLError as SSLError from osclib.conf import Config +from osclib.core import attribute_value_load from osclib.stagingapi import StagingAPI from lxml import etree as ET from openqa_client.client import OpenQA_Client from openqa_client.exceptions import ConnectionError, RequestError from urllib.error import HTTPError, URLError from urllib.parse import quote_plus +from datetime import datetime, timezone import requests from osclib.PubSubConsumer import PubSubConsumer @@ -33,10 +36,28 @@ else: amqp_prefix = 'opensuse' openqa_url = 'https://openqa.opensuse.org' + self.openqa = OpenQA_Client(openqa_url) - def add(self, name, nick): + def openqa_results(self, openqa_group, snapshot): + jobs = {} + if not openqa_group or not snapshot: + return jobs + result = self.openqa.openqa_request('GET', 'jobs', {'groupid': openqa_group, 'build': snapshot, 'latest': 1}) + for job in result['jobs']: + if job['clone_id'] or job['result'] == 'obsoleted': + continue + name = job['name'].replace(snapshot, '') + key = job['result'] + if job['state'] != 'done': + key = job['state'] + if key == 'uploading' or key == 'assigned': + key = 'running' + jobs.setdefault(key, []).append(job['name']) + return jobs + + def add(self, name, **kwargs): # cyclic dependency! - self.projects.append(Project(self, name, nick)) + self.projects.append(Project(self, name, kwargs)) def build_summary(self, project, repository): url = makeurl(self.apiurl, ['build', project, '_result'], { 'repository': repository, 'view': 'summary' }) @@ -80,12 +101,27 @@ result.append(f"arch_{arch}=1") return '&'.join(result) + def fetch_ttm_status(self, project): + text = attribute_value_load(self.apiurl, project, 'ToTestManagerStatus') + if text: + return yaml.safe_load(text) + return dict() + + def fetch_product_version(self, project): + return attribute_value_load(self.apiurl, project, 'ProductVersion') + class Project(object): - def __init__(self, fetcher, name, nick): + def __init__(self, fetcher, name, kwargs): self.fetcher = fetcher self.name = name - self.nick = nick + self.nick = kwargs.get('nick') + self.openqa_version = kwargs.get('openqa_version') + self.openqa_group = kwargs.get('openqa_group') + self.openqa_id = kwargs.get('openqa_groupid') + self.download_url = kwargs.get('download_url') self.all_archs = fetcher.generate_all_archs(name) + self.ttm_status = fetcher.fetch_ttm_status(name) + self.ttm_version = fetcher.fetch_product_version(name) def standard_progress(self): return fetcher.build_summary(self.name, 'standard') @@ -100,6 +136,9 @@ def all_archs(self): self.all_archs + def openqa_summary(self): + return self.fetcher.openqa_results(self.openqa_id, self.ttm_status.get('testing')) + if __name__ == '__main__': parser = argparse.ArgumentParser( description='Bot to sync openQA status to OBS') @@ -120,16 +159,18 @@ app = Flask(__name__) - fetcher.add('openSUSE:Factory', 'Factory') - fetcher.add('openSUSE:Factory:Rings:0-Bootstrap', 'Ring 0') - fetcher.add('openSUSE:Factory:Rings:1-MinimalX', 'Ring 1') - fetcher.add('openSUSE:Factory:ARM', 'ARM') - fetcher.add('openSUSE:Factory:PowerPC', 'Power') - fetcher.add('openSUSE:Factory:zSystems', 'System Z') - fetcher.add('openSUSE:Factory:RISCV', 'Risc V') + fetcher.add('openSUSE:Factory', nick='Factory', download_url='https://download.opensuse.org/tumbleweed/iso/', openqa_group='openSUSE Tumbleweed', openqa_version='Tumbleweed', openqa_groupid=1) + fetcher.add('openSUSE:Factory:Live', nick='Live') + fetcher.add('openSUSE:Factory:Rings:0-Bootstrap', nick='Ring 0') + fetcher.add('openSUSE:Factory:Rings:1-MinimalX', nick='Ring 1') + fetcher.add('openSUSE:Factory:ARM', nick='ARM', download_url='http://download.opensuse.org/ports/aarch64/tumbleweed/iso/', openqa_groupid=3) + fetcher.add('openSUSE:Factory:PowerPC', nick='Power', download_url='http://download.opensuse.org/ports/ppc/tumbleweed/iso/', openqa_groupid=4) + fetcher.add('openSUSE:Factory:zSystems', nick='System Z', download_url='http://download.opensuse.org/ports/zsystems/tumbleweed/iso/', openqa_groupid=34) + fetcher.add('openSUSE:Factory:RISCV', nick='Risc V', download_url='http://download.opensuse.org/ports/riscv/tumbleweed/iso/') with app.app_context(): rendered = render_template('dashboard.html', projectname = args.project, + lastupdate = datetime.now(timezone.utc), projects = fetcher.projects) print(rendered) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20200130.02d3038b/dashboard/templates/dashboard.html new/openSUSE-release-tools-20200131.38632736/dashboard/templates/dashboard.html --- old/openSUSE-release-tools-20200130.02d3038b/dashboard/templates/dashboard.html 2020-01-30 16:57:27.000000000 +0100 +++ new/openSUSE-release-tools-20200131.38632736/dashboard/templates/dashboard.html 2020-01-31 08:53:01.000000000 +0100 @@ -1,64 +1,115 @@ <!doctype html> <html lang="en"> - <head> - <!-- Required meta tags --> - <meta charset="utf-8"> - <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> - <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> - <title>Dashboard for {{ projectname }}</title> - </head> - <body> - <h1>Dashboard for {{ projectname }}</h1> - <table class="table"> - <thead> +<head> + <!-- Required meta tags --> + <meta charset="utf-8"> + <meta http-equiv="refresh" content="60" /> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + + <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> + <title>Dashboard for {{ projectname }}</title> +</head> + +<body> + <div class="container"> + <div class="row"> + <div class="h1 col text-left">Dashboard for {{ projectname }}</div> + <div class="col-3 text-right">Last update: <time class="timeago" datetime="{{lastupdate}}">{{ lastupdate }}</time></div> + </div> + <table class="table"> + <thead> + <tr> + <th scope="col">Part</th> + <th scope="col">standard</th> + <th scope="col">images</th> + <th scope="col">source</th> + <th scope="col">testing</th> + <th scope="col">published</th> + <th scope="col">openQA</th> + </tr> + </thead> + {% for project in projects %} <tr> - <th scope="col">Part</th> - <th scope="col">standard</th> - <th scope="col">images</th> - </tr> - </thead> - {% for project in projects %} - <tr> - <th scope="row"><a href="https://build.opensuse.org/project/show/{{ project.name }}">{{project.nick}}</a></th> - <td> - {% set progress = project.standard_progress() %} - {% if progress['building'] < 1000 %} + <th scope="row"><a href="https://build.opensuse.org/project/show/{{ project.name }}">{{project.nick}}</a></th> + <td> + {% set progress = project.standard_progress() %} + {% if progress['building'] < 1000 %} {{ progress['building'] / 10}}% done - {% else %} + {% else %} done - {% endif %} - {% if progress['failed'] > 0 %} - , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?failed=1&defaults=0&repo_standard=1&{{project.all_archs}}">{{ progress['failed'] }} failed</a> - {% endif %} - {% if progress['unresolvable'] > 0 %} - , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?unresolvable=1&defaults=0&repo_standard=1&{{project.all_archs}}">{{ progress['unresolvable'] }} unresolvable</a> - {% endif %} - </td> - <td> - {% set progress = project.images_progress() %} - {% if progress['building'] >= 0 %} + {% endif %} + {% if progress['failed'] > 0 %} + , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?failed=1&defaults=0&repo_standard=1&{{project.all_archs}}">{{ progress['failed'] }} failed</a> + {% endif %} + {% if progress['unresolvable'] > 0 %} + , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?unresolvable=1&defaults=0&repo_standard=1&{{project.all_archs}}">{{ progress['unresolvable'] }} unresolvable</a> + {% endif %} + </td> + <td> + {% set progress = project.images_progress() %} + {% if progress['building'] >= 0 %} {% if progress['building'] < 1000 %} - {{ progress['building'] / 10}}% done + {{ progress['building'] / 10}}% done {% else %} - done + done {% endif %} {% if progress['failed'] > 0 %} - , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?failed=1&defaults=0&repo_images=1&{{project.all_archs}}">{{ progress['failed'] }} failed</a> + , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?failed=1&defaults=0&repo_images=1&{{project.all_archs}}">{{ progress['failed'] }} failed</a> {% endif %} {% if progress['unresolvable'] > 0 %} - , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?unresolvable=1&defaults=0&repo_images=1&{{project.all_archs}}">{{ progress['unresolvable'] }} unresolvable</a> + , <a href="https://build.opensuse.org/project/monitor/{{ project.name }}?unresolvable=1&defaults=0&repo_images=1&{{project.all_archs}}">{{ progress['unresolvable'] }} unresolvable</a> {% endif %} - {% else %} - N.A. - {% endif %} - </td> - </tr> - {% endfor %} - </table> + {% else %} + n.a. + {% endif %} + </td> + <td> + {% if project.ttm_version %} + <a href="https://build.opensuse.org/package/show/{{ project.name }}/000product">{{ project.ttm_version }}</a> + {% else %} + n.a. + {% endif %} + </td> + <td> + {% set ttm_testing = project.ttm_status.get('testing') %} + {% if ttm_testing %} + {% if project.openqa_version %} + <a href='https://openqa.opensuse.org/tests/overview?distri=opensuse&version={{ project.openqa_version }}'>{{ ttm_testing }}</a> + {% else %} + {{ ttm_testing }} + {% endif %} + {% else %} + n.a. + {% endif %} + </td> + <td> + {% set ttm_published = project.ttm_status.get('published', None) %} + {% if ttm_published %} + <a href="{{ project.download_url }}">{{ ttm_published }}</a> + {% else %} + n.a. + {% endif %} + </td> + <td> + {% set openqa_summary = project.openqa_summary() %} + {% for state in openqa_summary.keys() %} + {{ state }}: {{ openqa_summary[state]|length }} + {% endfor %} + </td> + </tr> + {% endfor %} + </table> + </div> <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script> <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script> + <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-timeago/1.6.7/jquery.timeago.m..." integrity="sha256-0+5OfvOxkLHqpLPPwy9pDjug8N3cwaqcmleaxnR5VS8=" crossorigin="anonymous"></script> + <script> + jQuery(document).ready(function() { + jQuery("time.timeago").timeago(); + }); + </script> +</body> - </body> </html> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/openSUSE-release-tools-20200130.02d3038b/gocd/dashboard.generator.gocd.yaml new/openSUSE-release-tools-20200131.38632736/gocd/dashboard.generator.gocd.yaml --- old/openSUSE-release-tools-20200130.02d3038b/gocd/dashboard.generator.gocd.yaml 2020-01-30 16:57:27.000000000 +0100 +++ new/openSUSE-release-tools-20200131.38632736/gocd/dashboard.generator.gocd.yaml 2020-01-31 08:53:01.000000000 +0100 @@ -9,7 +9,6 @@ materials: script: git: https://github.com/openSUSE/openSUSE-release-tools.git - destination: scripts timer: spec: 0 */5 * ? * * only_on_changes: false @@ -20,6 +19,6 @@ - staging-bot tasks: - script: |- - set -x - PYTHONPATH=$PWD python3 ./dashboard/generate.py -p openSUSE:Factory > dashboard/output/index.html - rsync -av dashboard/output/ rsync://coolo@195.135.221.140:11873/factory-dashboard.opensuse.org/ + set -e + PYTHONPATH=$PWD python3 ./dashboard/generate.py -p openSUSE:Factory > dashboard/output/index.html + rsync -av dashboard/output/ rsync://coolo@195.135.221.140:11873/factory-dashboard.opensuse.org/ ++++++ openSUSE-release-tools.obsinfo ++++++ --- /var/tmp/diff_new_pack.BboJKU/_old 2020-01-31 23:59:03.167706385 +0100 +++ /var/tmp/diff_new_pack.BboJKU/_new 2020-01-31 23:59:03.167706385 +0100 @@ -1,5 +1,5 @@ name: openSUSE-release-tools -version: 20200130.02d3038b -mtime: 1580399847 -commit: 02d3038bf62c7de96e11b86a56b8a8ec4d1487a4 +version: 20200131.38632736 +mtime: 1580457181 +commit: 3863273695ceff2aed38e4116255bebf0ca66ee7