Hello community,
here is the log from the commit of package python-openqa_review for
openSUSE:Factory checked in at 2017-12-21 11:29:01
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-openqa_review (Old)
and /work/SRC/openSUSE:Factory/.python-openqa_review.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-openqa_review"
Thu Dec 21 11:29:01 2017 rev:18 rq:558732 version:1.8.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-openqa_review/python-openqa_review.changes
2017-10-13 14:15:59.900464217 +0200
+++
/work/SRC/openSUSE:Factory/.python-openqa_review.new/python-openqa_review.changes
2017-12-21 11:29:03.936362594 +0100
@@ -1,0 +2,28 @@
+Wed Dec 20 08:13:24 UTC 2017 - [email protected]
+
+- Update to version 1.8.2:
+ * browser: Status code is not always available on error
+ * setup.py: Correct name of tests_require
+ * Project is no production stable
+ * Only require separate configparser for python2
+ * Fix require of configparser for python3
+
+-------------------------------------------------------------------
+Sun Dec 17 13:38:22 UTC 2017 - [email protected]
+
+- Provide singlespec file with update-alternatives including self-test
+ * Better multibuild-evaluation with valid syntax allowing local use of
+ '-M test'
+ * Complete runtime requirements including "python-setuptools"
+ * Complete set of scripts for both python2 and python3
+ * Package self-test for all repositories and python2/python3
+
+-------------------------------------------------------------------
+Sat Dec 16 11:54:53 UTC 2017 - [email protected]
+
+- Update to version 1.8.0:
+ * Provide job references in failed soft-fail parsing
+ * Add review wrapper script for 'functional' group on openqa.suse.de
+ * Handle disconnects by remote end on API get gracefully
+
+-------------------------------------------------------------------
Old:
----
python-openqa_review-1.7.5.tar.gz
New:
----
_multibuild
python-openqa_review-1.8.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-openqa_review.spec ++++++
--- /var/tmp/diff_new_pack.HG50pL/_old 2017-12-21 11:29:04.476336265 +0100
+++ /var/tmp/diff_new_pack.HG50pL/_new 2017-12-21 11:29:04.480336070 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package python-openqa_review
+# spec file for package python
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
@@ -16,52 +16,110 @@
#
+# Define just "test" as a package in _multibuild file to distinguish test
+# instructions here
+%if "@BUILD_FLAVOR@" == ""
+%bcond_with test
+%else
+%bcond_without test
+%endif
+
+%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define short_name openqa_review
-Name: python-%{short_name}
-Version: 1.7.5
+%define binaries openqa-review openqa-review-daily-email
openqa-review-sles-ha tumblesle-release
+%define oldpython python
+Name: python-%{short_name}%{?name_ext}
+Version: 1.8.2
Release: 0
Summary: A review helper script for openQA
License: MIT
Group: Development/Languages/Python
-Source:
https://github.com/okurz/%{short_name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
+Source:
https://github.com/okurz/%{short_name}/archive/%{version}.tar.gz#/python-%{short_name}-%{version}.tar.gz
Url: https://github.com/okurz/%{short_name}
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
-BuildRequires: python-setuptools
-Requires: python-PyYAML
-Requires: python-beautifulsoup4
-Requires: python-certifi
-Requires: python-configparser
+BuildRequires: python-rpm-macros
+%if %{with test}
+BuildRequires: %{oldpython}-%{short_name}
+%else
+BuildRequires: %{python_module setuptools}
+BuildRequires: fdupes
# workaround because of python-configparser not providing the '__init__.py'
# file within site-packages/backports
+%if "%{python_flavor}" == "python2"
Requires: python-backports.ssl_match_hostname
+Requires: python-configparser
+%endif
+Requires: python-PyYAML
+Requires: python-beautifulsoup4
+Requires: python-certifi
Requires: python-future
Requires: python-humanfriendly
Requires: python-pika
Requires: python-requests
Requires: python-setuptools
Requires: python-sortedcontainers
+Requires(post): update-alternatives
+Requires(preun): update-alternatives
+%endif
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
+%ifpython2
+Obsoletes: %{oldpython}-%{short_name} < %{version}
+%endif
+
+%python_subpackages
+
%description
A review helper script for openQA. For more details look into the README file.
%prep
+%if %{with test}
+# workaround to prevent post/install failing assuming this file for whatever
+# reason
+touch %{_sourcedir}/%{short_name}
+%else
%setup -q -n %{short_name}-%{version}
+# delete shebang of files not in executable path
+find %{short_name}/ -name '*.py' -print0 | xargs -0 sed -i '1s/#!.*$//'
+%endif
%build
-python setup.py build
+%if %{with test}
+openqa-review --help
+tumblesle-release --help
+%else
+%python_build
+%endif
+%if %{with test}
+%else
%install
-python setup.py install --prefix=%{_prefix} --root=%{buildroot}
+%python_install
rm %{buildroot}/%{python_sitelib}/version.*
-%files
+for i in %{binaries}; do
+ %python_clone -a %{buildroot}%{_bindir}/$i
+done
+%fdupes %{buildroot}%{_prefix}
+
+%post
+%{python_install_alternative %{binaries}}
+
+%preun
+%python_uninstall_alternative openqa-review
+
+%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.md
%{python_sitelib}
-%attr(755, -, -) %{_bindir}/openqa-review
-%attr(755, -, -) %{_bindir}/openqa-review-sles-ha
-%attr(755, -, -) %{_bindir}/openqa-review-daily-email
-%attr(755, -, -) %{_bindir}/tumblesle-release
+%python_alternative %{_bindir}/openqa-review
+%python_alternative %{_bindir}/openqa-review-sles-ha
+%python_alternative %{_bindir}/openqa-review-daily-email
+%python_alternative %{_bindir}/tumblesle-release
+
+%else
+# disable debug packages in package test to prevent error about missing files
+%define debug_package %{nil}
+%endif
%changelog
++++++ _multibuild ++++++
<multibuild>
<package>test</package>
</multibuild>
++++++ _service ++++++
--- /var/tmp/diff_new_pack.HG50pL/_old 2017-12-21 11:29:04.536333340 +0100
+++ /var/tmp/diff_new_pack.HG50pL/_new 2017-12-21 11:29:04.536333340 +0100
@@ -1,7 +1,7 @@
<services>
<service name="tar_scm" mode="disabled">
<param name="filename">python-openqa_review</param>
- <param name="versionformat">@PARENT_TAG@</param>
+ <param name="versionformat">@PARENT_TAG@+@TAG_OFFSET@.%h</param>
<param name="url">git://github.com/okurz/openqa_review.git</param>
<param name="scm">git</param>
<param name="revision">master</param>
++++++ python-openqa_review-1.7.5.tar.gz -> python-openqa_review-1.8.2.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/openqa_review-1.7.5/bin/openqa-review-functional
new/openqa_review-1.8.2/bin/openqa-review-functional
--- old/openqa_review-1.7.5/bin/openqa-review-functional 1970-01-01
01:00:00.000000000 +0100
+++ new/openqa_review-1.8.2/bin/openqa-review-functional 2017-12-20
08:57:27.000000000 +0100
@@ -0,0 +1,4 @@
+#!/bin/sh -e
+cmd="${cmd:-"openqa-review"}"
+args="--host http://openqa.suse.de --against-reviewed last -vvvv -s -n -T
--bugrefs --no-empty-sections --include-softfails --query-issue-status $@"
+$cmd -j 'SLE.*/ Functional' $args | tee $(date +%F)_functional.md
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/openqa_review-1.7.5/openqa_review/browser.py
new/openqa_review-1.8.2/openqa_review/browser.py
--- old/openqa_review-1.7.5/openqa_review/browser.py 2017-09-19
08:02:36.000000000 +0200
+++ new/openqa_review-1.8.2/openqa_review/browser.py 2017-12-20
08:57:27.000000000 +0100
@@ -99,21 +99,7 @@
content = json.loads(raw) if as_json else raw
else: # pragma: no cover
absolute_url = url if not url.startswith('/') else
urljoin(str(self.root_url), str(url))
- for i in range(1, 7):
- r = requests.get(absolute_url, auth=self.auth)
- if r.status_code == 502:
- log.info("Request to %s failed with status code 502,
retrying try %s" % (absolute_url, i))
- continue
- if r.status_code != 200:
- msg = "Request to %s was not successful, status code: %s"
% (absolute_url, r.status_code)
- log.info(msg)
- raise DownloadError(msg)
- break
- else:
- msg = "Request to %s was not successful after multiple
retries, giving up. Status code: %s" % (absolute_url, r.status_code)
- log.warn(msg)
- raise DownloadError(msg)
- content = r.json() if as_json else r.content.decode('utf8')
+ content = self._get(absolute_url, as_json=as_json)
raw = json.dumps(content) if as_json else content
if self.save:
log.info("Saving content instead from URL %s from filename %s" %
(url, filename))
@@ -121,6 +107,28 @@
self.cache[url] = raw
return content
+ def _get(self, url, as_json=False): # pragma: no cover
+ for i in range(1, 7):
+ try:
+ r = requests.get(url, auth=self.auth)
+ except requests.exceptions.ConnectionError:
+ log.info("Connection error encountered accessing %s, retrying
try %s" % (url, i))
+ continue
+ if r.status_code == 502:
+ log.info("Request to %s failed with status code 502, retrying
try %s" % (url, i))
+ continue
+ if r.status_code != 200:
+ msg = "Request to %s was not successful, status code: %s" %
(url, r.status_code)
+ log.info(msg)
+ raise DownloadError(msg)
+ break
+ else:
+ msg = "Request to %s was not successful after multiple retries,
giving up" % url
+ log.warn(msg)
+ raise DownloadError(msg)
+ content = r.json() if as_json else r.content.decode('utf8')
+ return content
+
def json_rpc_get(self, url, method, params, cache=True):
"""Execute JSON RPC GET request."""
absolute_url = url if not url.startswith('/') else
urljoin('http://dummy/', str(url))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/openqa_review-1.7.5/openqa_review/openqa_review.py
new/openqa_review-1.8.2/openqa_review/openqa_review.py
--- old/openqa_review-1.7.5/openqa_review/openqa_review.py 2017-09-19
08:02:36.000000000 +0200
+++ new/openqa_review-1.8.2/openqa_review/openqa_review.py 2017-12-20
08:57:27.000000000 +0100
@@ -837,11 +837,13 @@
log.debug('Evaluating potential workaround needle \'%s\'' %
field['needle'])
match = re.search('([a-z]{3})#?([0-9]+)-[0-9]+',
field['needle'])
if not match: # pragma: no cover
- log.warn('Found workaround needle without bugref that
could be understood, looking for a better bugref (if any)')
+ log.warn('Found workaround needle without bugref that
could be understood, looking for a better bugref (if any) for \'%s\'' %
+ result_item['href'])
continue
return match.group(1) + '#' + match.group(2)
else: # pragma: no cover
- log.error('Could not find any soft failure reference within
details, workaround needle without bugref that could be understood')
+ log.error('Could not find any soft failure reference within
details of soft-failed job \'%s\'. Could be deleted workaround needle?.' %
+ absolute_url(self.root_url, result_item))
def __str__(self):
"""Return as markdown."""
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/openqa_review-1.7.5/setup.py
new/openqa_review-1.8.2/setup.py
--- old/openqa_review-1.7.5/setup.py 2017-09-19 08:02:36.000000000 +0200
+++ new/openqa_review-1.8.2/setup.py 2017-12-20 08:57:27.000000000 +0100
@@ -1,4 +1,5 @@
import os
+import sys
from subprocess import check_output
from setuptools import setup
@@ -23,22 +24,26 @@
version_msg = "# Do not edit this file, pipeline versioning is governed by git
tags"
open(version_py, 'w').write(version_msg + os.linesep + "__version__ = '" +
str(version_git) + "'\n")
+install_requires = [
+ "beautifulsoup4",
+ "future",
+ "sortedcontainers",
+ "humanfriendly",
+ "requests",
+ "PyYAML",
+ "pika",
+ "certifi",
+]
+
+# there is also a new version 'configparser2' to resolve the name ambuigity
but that package might not be available everywhere
+if sys.version_info < (3, 0):
+ install_requires += ["configparser"]
+
setup(
name="openqa_review",
version="{ver}".format(ver=version_git),
- install_requires=[
- "beautifulsoup4",
- # there is also a new version 'configparser2' to resolve the name
ambuigity but that package might not be available everywhere
- "configparser",
- "future",
- "sortedcontainers",
- "humanfriendly",
- "requests",
- "PyYAML",
- "pika",
- "certifi",
- ],
- test_require=[
+ install_requires=install_requires,
+ tests_require=[
"pytest-mock",
],
author="Oliver kurz",
@@ -51,7 +56,7 @@
py_modules=['version'],
long_description=open(os.path.join(os.path.dirname(__file__),
'README.md')).read(),
classifiers=[
- "Development Status :: 3 - Alpha",
+ "Development Status :: 5 - Production/Stable",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
],