Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2018-04-27 16:09:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Fri Apr 27 16:09:21 2018 rev:87 rq:601643 version:20180426.2282f15

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2018-04-26 13:38:38.626733390 +0200
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes
       2018-04-27 16:09:26.550026327 +0200
@@ -1,0 +2,42 @@
+Thu Apr 26 16:01:14 UTC 2018 - [email protected]
+
+- Update to version 20180426.2282f15:
+  * metrics/grafana/dashboard: remove y-axis max from "Weekly Revisions".
+
+-------------------------------------------------------------------
+Thu Apr 26 11:19:15 UTC 2018 - [email protected]
+
+- Update to version 20180426.2aba87c:
+  * freeze_command: rebase staging project do not erase users data
+
+-------------------------------------------------------------------
+Thu Apr 26 03:06:20 UTC 2018 - [email protected]
+
+- Update to version 20180425.abd03b3:
+  * metrics: ingest_dashboard_config: rename seen to previous.
+  * metrics: ingest_dashboard_config: initialize seen with last record keys.
+  * metrics: ingest_dashboard_config: only fill missing values once.
+
+-------------------------------------------------------------------
+Thu Apr 26 02:58:28 UTC 2018 - [email protected]
+
+- Update to version 20180425.94fefaf:
+  * metrics/grafana/dashboard: add release schedule annotation.
+  * metrics/grafana/dashboard: include dashboard description.
+  * metrics/grafana/dashboard: change all selectors to last.
+
+-------------------------------------------------------------------
+Thu Apr 26 02:46:51 UTC 2018 - [email protected]
+
+- Update to version 20180425.ade9313:
+  * metrics: dashboard: drop dashboard measurement in favor of 
dashboard_revision.
+  * metrics: dashboard: include revisions graph.
+
+-------------------------------------------------------------------
+Thu Apr 26 02:11:24 UTC 2018 - [email protected]
+
+- Update to version 20180425.adab26c:
+  * repo_checker: provide whitelist_clean subcommand.
+  * osclib/core: correct BINARY_REGEX by making it greedy.
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20180425.8bb627d.obscpio

New:
----
  openSUSE-release-tools-20180426.2282f15.obscpio

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.j0WO9C/_old  2018-04-27 16:09:28.521954004 +0200
+++ /var/tmp/diff_new_pack.j0WO9C/_new  2018-04-27 16:09:28.525953857 +0200
@@ -20,7 +20,7 @@
 %define source_dir openSUSE-release-tools
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20180425.8bb627d
+Version:        20180426.2282f15
 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.j0WO9C/_old  2018-04-27 16:09:28.577951951 +0200
+++ /var/tmp/diff_new_pack.j0WO9C/_new  2018-04-27 16:09:28.577951951 +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">8bb627d9bfe07dc22af6910b73564eef7cb0f53d</param>
+    <param 
name="changesrevision">2282f15cf32167d4eddadce3a87205e44e5e0a59</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20180425.8bb627d.obscpio -> 
openSUSE-release-tools-20180426.2282f15.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180425.8bb627d/metrics/grafana/dashboard.json 
new/openSUSE-release-tools-20180426.2282f15/metrics/grafana/dashboard.json
--- old/openSUSE-release-tools-20180425.8bb627d/metrics/grafana/dashboard.json  
2018-04-25 11:44:55.000000000 +0200
+++ new/openSUSE-release-tools-20180426.2282f15/metrics/grafana/dashboard.json  
2018-04-26 17:55:07.000000000 +0200
@@ -24,9 +24,19 @@
         "iconColor": "rgba(0, 211, 255, 1)",
         "name": "Annotations & Alerts",
         "type": "dashboard"
+      },
+      {
+        "datasource": "$project",
+        "enable": false,
+        "hide": false,
+        "iconColor": "rgba(255, 96, 96, 1)",
+        "name": "Release Schedule",
+        "query": "select description from release_schedule where $timeFilter",
+        "showIn": 0
       }
     ]
   },
+  "description": "Metrics pertaining to data extracted from the dashboard 
container.",
   "editable": true,
   "gnetId": null,
   "graphTooltip": 0,
@@ -103,7 +113,7 @@
               },
               {
                 "params": [],
-                "type": "max"
+                "type": "last"
               },
               {
                 "params": [
@@ -221,7 +231,7 @@
               },
               {
                 "params": [],
-                "type": "mean"
+                "type": "last"
               },
               {
                 "params": [
@@ -239,7 +249,7 @@
               },
               {
                 "params": [],
-                "type": "mean"
+                "type": "last"
               },
               {
                 "params": [
@@ -257,7 +267,7 @@
               },
               {
                 "params": [],
-                "type": "mean"
+                "type": "last"
               },
               {
                 "params": [
@@ -375,7 +385,7 @@
               },
               {
                 "params": [],
-                "type": "max"
+                "type": "last"
               },
               {
                 "params": [
@@ -393,7 +403,7 @@
               },
               {
                 "params": [],
-                "type": "max"
+                "type": "last"
               },
               {
                 "params": [
@@ -411,7 +421,7 @@
               },
               {
                 "params": [],
-                "type": "max"
+                "type": "last"
               },
               {
                 "params": [
@@ -562,6 +572,118 @@
           "min": null,
           "show": true
         },
+        {
+          "format": "short",
+          "label": null,
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        }
+      ]
+    },
+    {
+      "aliasColors": {},
+      "bars": true,
+      "dashLength": 10,
+      "dashes": false,
+      "datasource": "$project",
+      "description": "The number of revisions to dashboard container made 
during a week.",
+      "fill": 1,
+      "gridPos": {
+        "h": 9,
+        "w": 24,
+        "x": 0,
+        "y": 36
+      },
+      "id": 7,
+      "legend": {
+        "avg": false,
+        "current": false,
+        "max": false,
+        "min": false,
+        "show": false,
+        "total": false,
+        "values": false
+      },
+      "lines": false,
+      "linewidth": 1,
+      "links": [],
+      "nullPointMode": "null",
+      "percentage": false,
+      "pointradius": 5,
+      "points": false,
+      "renderer": "flot",
+      "seriesOverrides": [],
+      "spaceLength": 10,
+      "stack": false,
+      "steppedLine": false,
+      "targets": [
+        {
+          "alias": "$col",
+          "groupBy": [
+            {
+              "params": [
+                "1w"
+              ],
+              "type": "time"
+            }
+          ],
+          "measurement": "dashboard_revision",
+          "orderByTime": "ASC",
+          "policy": "default",
+          "refId": "A",
+          "resultFormat": "time_series",
+          "select": [
+            [
+              {
+                "params": [
+                  "revision"
+                ],
+                "type": "field"
+              },
+              {
+                "params": [],
+                "type": "count"
+              },
+              {
+                "params": [
+                  "count"
+                ],
+                "type": "alias"
+              }
+            ]
+          ],
+          "tags": []
+        }
+      ],
+      "thresholds": [],
+      "timeFrom": null,
+      "timeShift": null,
+      "title": "Weekly Revisions",
+      "tooltip": {
+        "shared": true,
+        "sort": 0,
+        "value_type": "individual"
+      },
+      "type": "graph",
+      "xaxis": {
+        "buckets": null,
+        "mode": "time",
+        "name": null,
+        "show": true,
+        "values": []
+      },
+      "yaxes": [
+        {
+          "decimals": null,
+          "format": "short",
+          "label": "",
+          "logBase": 1,
+          "max": null,
+          "min": null,
+          "show": true
+        },
         {
           "format": "short",
           "label": null,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/openSUSE-release-tools-20180425.8bb627d/metrics.py 
new/openSUSE-release-tools-20180426.2282f15/metrics.py
--- old/openSUSE-release-tools-20180425.8bb627d/metrics.py      2018-04-25 
11:44:55.000000000 +0200
+++ new/openSUSE-release-tools-20180426.2282f15/metrics.py      2018-04-26 
17:55:07.000000000 +0200
@@ -410,21 +410,32 @@
     return None
 
 def ingest_dashboard_config(content):
-    if not hasattr(ingest_dashboard_config, 'seen'):
-        ingest_dashboard_config.seen = set()
+    if not hasattr(ingest_dashboard_config, 'previous'):
+        result = client.query('SELECT * FROM dashboard_config ORDER BY time 
DESC LIMIT 1')
+        if result:
+            # Extract last point and remove zero values since no need to fill.
+            point = next(result.get_points())
+            point = {k: v for (k, v) in point.iteritems() if k != 'time' and v 
!= 0}
+            ingest_dashboard_config.previous = set(point.keys())
+        else:
+            ingest_dashboard_config.previous = set()
 
     fields = {}
     for key, value in content.items():
         if key.startswith('repo_checker-binary-whitelist'):
-            ingest_dashboard_config.seen.add(key)
+            ingest_dashboard_config.previous.add(key)
 
             fields[key] = len(value.split())
 
     # Ensure any previously seen key are filled with zeros if no longer present
     # to allow graphs to fill with previous.
-    missing = ingest_dashboard_config.seen - set(fields.keys())
-    for key in missing:
-        fields[key] = 0
+    fields_keys = set(fields.keys())
+    missing = ingest_dashboard_config.previous - fields_keys
+    if len(missing):
+        ingest_dashboard_config.previous = fields_keys
+
+        for key in missing:
+            fields[key] = 0
 
     return fields
 
@@ -446,22 +457,12 @@
     }
 
 def ingest_dashboard_revision_get():
-    result = client.query('SELECT revision FROM dashboard ORDER BY time DESC 
LIMIT 1')
+    result = client.query('SELECT revision FROM dashboard_revision ORDER BY 
time DESC LIMIT 1')
     if result:
         return next(result.get_points())['revision']
 
     return None
 
-def ingest_dashboard_revision_put(revision):
-    client.drop_measurement('dashboard')
-    client.write_points([{
-        'measurement': 'dashboard',
-        'fields': {
-            'revision': revision,
-        },
-        'time': timestamp(datetime.now()),
-    }], 's')
-
 def ingest_dashboard(api):
     index = revision_index(api)
 
@@ -497,6 +498,14 @@
                     'time': time,
                 })
 
+        points.append({
+            'measurement': 'dashboard_revision',
+            'fields': {
+                'revision': revision,
+            },
+            'time': time,
+        })
+
         if len(points) >= 1000:
             client.write_points(points, 's')
             count += len(points)
@@ -506,9 +515,7 @@
         client.write_points(points, 's')
         count += len(points)
 
-    # Keep track of last revision process to start after that next time.
-    print('storing last revision processed: {}'.format(revision))
-    ingest_dashboard_revision_put(revision)
+    print('last revision processed: {}'.format(revision))
 
     return count
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180425.8bb627d/osclib/core.py 
new/openSUSE-release-tools-20180426.2282f15/osclib/core.py
--- old/openSUSE-release-tools-20180425.8bb627d/osclib/core.py  2018-04-25 
11:44:55.000000000 +0200
+++ new/openSUSE-release-tools-20180426.2282f15/osclib/core.py  2018-04-26 
17:55:07.000000000 +0200
@@ -16,7 +16,7 @@
 from osc.core import show_project_meta
 from osclib.memoize import memoize
 
-BINARY_REGEX = 
r'(?:.*::)?(?P<filename>(?P<name>.*?)-(?P<version>[^-]+)-(?P<release>[^-]+)\.(?P<arch>[^-\.]+))'
+BINARY_REGEX = 
r'(?:.*::)?(?P<filename>(?P<name>.*)-(?P<version>[^-]+)-(?P<release>[^-]+)\.(?P<arch>[^-\.]+))'
 RPM_REGEX = BINARY_REGEX + '\.rpm'
 BinaryParsed = namedtuple('BinaryParsed', ('package', 'filename', 'name', 
'arch'))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180425.8bb627d/osclib/freeze_command.py 
new/openSUSE-release-tools-20180426.2282f15/osclib/freeze_command.py
--- old/openSUSE-release-tools-20180425.8bb627d/osclib/freeze_command.py        
2018-04-25 11:44:55.000000000 +0200
+++ new/openSUSE-release-tools-20180426.2282f15/osclib/freeze_command.py        
2018-04-26 17:55:07.000000000 +0200
@@ -43,6 +43,9 @@
         meta = ET.fromstring(self.prj_meta_for_bootstrap_copy(self.prj))
         meta.find('title').text = oldmeta.find('title').text
         meta.find('description').text = oldmeta.find('description').text
+        for person in oldmeta.findall('person'):
+            # the xml has a fixed structure
+            meta.insert(2, ET.Element('person', role=person.get('role'), 
userid=person.get('userid')))
 
         self.api.retried_PUT(url, ET.tostring(meta))
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20180425.8bb627d/repo_checker.py 
new/openSUSE-release-tools-20180426.2282f15/repo_checker.py
--- old/openSUSE-release-tools-20180425.8bb627d/repo_checker.py 2018-04-25 
11:44:55.000000000 +0200
+++ new/openSUSE-release-tools-20180426.2282f15/repo_checker.py 2018-04-26 
17:55:07.000000000 +0200
@@ -1,5 +1,7 @@
 #!/usr/bin/python
 
+from __future__ import print_function
+
 import cmdln
 from collections import namedtuple
 import hashlib
@@ -518,6 +520,77 @@
         self.review_messages['accepted'] = 'delete request is safe'
         return True
 
+    def whitelist_clean(self, project):
+        from copy import copy
+        from difflib import unified_diff
+        from osclib.core import BINARY_REGEX
+
+        api = self.staging_api(project)
+
+        # Determine which binaries are mentioned in repo_checker output.
+        content = api.dashboard_content_load('repo_checker')
+        sections = self.install_check_parse(content)
+        binaries = set()
+        for section in sections:
+            for binary in section.binaries:
+                match = re.match(BINARY_REGEX, binary)
+                if match:
+                    binaries.add(match.group('name'))
+
+        # Find whitelist config entries and filter list to only those 
mentioned.
+        prefix = 'repo_checker-binary-whitelist'
+        binaries_common = None
+        whitelists = {}
+        whitelists_remaining = {}
+        for key, value in self.staging_config[project].items():
+            if not key.startswith(prefix):
+                continue
+
+            whitelists[key] = set(value.split())
+            whitelists_remaining[key] = whitelists[key].intersection(binaries)
+
+            if key != prefix:
+                if binaries_common is None:
+                    binaries_common = whitelists_remaining[key]
+                else:
+                    binaries_common = 
binaries_common.intersection(whitelists_remaining[key])
+
+        if len(binaries_common):
+            # Remove entries common to all archs and place in common whitelist.
+            whitelists_remaining[prefix].update(binaries_common)
+
+            for key, value in whitelists_remaining.items():
+                if key == prefix:
+                    continue
+
+                whitelists_remaining[key] = whitelists_remaining[key] - 
binaries_common
+
+        # Update whitelist entries with new values.
+        config = api.dashboard_content_load('config').splitlines(True)
+        config_new = copy(config)
+        for key, value in whitelists_remaining.items():
+            if value != whitelists[key]:
+                self.whitelist_clean_set(config_new, key, ' '.join(value))
+
+        if config == config_new:
+            print('No changes')
+            return
+
+        # Present diff and prompt to apply.
+        print(''.join(unified_diff(config, config_new, fromfile='config.orig', 
tofile='config.new')))
+        print('Apply config changes? [y/n] (y): ',  end='')
+        response = raw_input().lower()
+        if response == '' or response == 'y':
+            api.dashboard_content_save('config', ''.join(config_new), 
'repo_checker whitelist clean')
+
+    def whitelist_clean_set(self, config, key, value):
+        # Unfortunately even OscConfigParser does not preserve empty lines.
+        for i, line in enumerate(config):
+            if line.startswith(key + ' ='):
+                config[i] = '{} = {}\n'.format(key, value) if value else '{} 
=\n'.format(key)
+
+        return config
+
 
 class CommandLineInterface(ReviewBot.CommandLineInterface):
 
@@ -550,6 +623,10 @@
         self.checker.check_requests() # Needed to properly init ReviewBot.
         self.checker.project_only(project, opts.post_comments)
 
+    def do_whitelist_clean(self, subcmd, opts, project):
+        self.checker.check_requests() # Needed to properly init ReviewBot.
+        self.checker.whitelist_clean(project)
+
 if __name__ == "__main__":
     app = CommandLineInterface()
     sys.exit(app.main())

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.j0WO9C/_old  2018-04-27 16:09:29.281926132 +0200
+++ /var/tmp/diff_new_pack.j0WO9C/_new  2018-04-27 16:09:29.281926132 +0200
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20180425.8bb627d
-mtime: 1524649495
-commit: 8bb627d9bfe07dc22af6910b73564eef7cb0f53d
+version: 20180426.2282f15
+mtime: 1524758107
+commit: 2282f15cf32167d4eddadce3a87205e44e5e0a59
 


Reply via email to