Hello community,
here is the log from the commit of package prometheus-hanadb_exporter for
openSUSE:Leap:15.2 checked in at 2020-05-21 12:59:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/prometheus-hanadb_exporter (Old)
and /work/SRC/openSUSE:Leap:15.2/.prometheus-hanadb_exporter.new.2738
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "prometheus-hanadb_exporter"
Thu May 21 12:59:58 2020 rev:2 rq:807830 version:0.7.1+git.1589791930.dbf0d1a
Changes:
--------
---
/work/SRC/openSUSE:Leap:15.2/prometheus-hanadb_exporter/prometheus-hanadb_exporter.changes
2020-02-21 10:53:17.147411335 +0100
+++
/work/SRC/openSUSE:Leap:15.2/.prometheus-hanadb_exporter.new.2738/prometheus-hanadb_exporter.changes
2020-05-21 13:00:07.790898333 +0200
@@ -1,0 +2,13 @@
+Tue May 5 11:18:53 UTC 2020 - Xabier Arbulu <[email protected]>
+
+- Version 0.7.1 Fix the case where HELP and TYPE entries are exported
+even though there is not any record for that metric (bsc#1170717)
+
+(jsc#SLE-10902, jsc#SLE-10903, jsc#ECO-817, jsc#ECO-818)
+
+-------------------------------------------------------------------
+Wed Apr 29 15:00:34 UTC 2020 - Julien ADAMEK <[email protected]>
+
+- Fix and improve the README file (bsc#1170843)
+
+-------------------------------------------------------------------
Old:
----
prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55.tar.gz
New:
----
prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ prometheus-hanadb_exporter.spec ++++++
--- /var/tmp/diff_new_pack.3hMmqP/_old 2020-05-21 13:00:08.242899317 +0200
+++ /var/tmp/diff_new_pack.3hMmqP/_new 2020-05-21 13:00:08.246899326 +0200
@@ -1,7 +1,7 @@
#
# spec file for package prometheus-hanadb_exporter
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2019-2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
%define _sysconfdir %{_prefix}/etc
Name: prometheus-hanadb_exporter
-Version: 0.7.0+git.1581952699.a346b55
+Version: 0.7.1+git.1589791930.dbf0d1a
Release: 0
Summary: SAP HANA database metrics exporter
License: Apache-2.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.3hMmqP/_old 2020-05-21 13:00:08.274899387 +0200
+++ /var/tmp/diff_new_pack.3hMmqP/_new 2020-05-21 13:00:08.278899395 +0200
@@ -4,8 +4,8 @@
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="filename">prometheus-hanadb_exporter</param>
- <param name="versionformat">0.7.0+git.%ct.%h</param>
- <param name="revision">master</param>
+ <param name="versionformat">@PARENT_TAG@+git.%ct.%h</param>
+ <param name="revision">dbf0d1af94514ddc9a3f0694bdfd32757a9a0258</param>
</service>
<service name="recompress" mode="disabled">
++++++ prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55.tar.gz ->
prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/.travis.yml
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/.travis.yml
--- old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/.travis.yml
2020-02-17 16:18:19.000000000 +0100
+++ new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/.travis.yml
2020-05-18 10:52:10.000000000 +0200
@@ -35,9 +35,8 @@
- ./cc-test-reporter after-build -t coverage.py --exit-code
$TRAVIS_TEST_RESULT tests/coverage.xml
- stage: delivery
- if: type != pull_request
+ if: (type != pull_request AND (branch = master or
env(DELIVER_BRANCHES))) or tag IS present
env:
- - FOLDER=/package
- PACKAGE_NAME=prometheus-hanadb_exporter
- TAR_NAME=hanadb_exporter
@@ -46,31 +45,23 @@
script:
- |
- docker run -t -v "$(pwd):/package" \
- -e OBS_USER=$OBS_USER \
- -e OBS_PASS=$OBS_PASS \
- -e FOLDER=$FOLDER \
- -e OBS_PROJECT=$OBS_PROJECT \
- -e PACKAGE_NAME=$PACKAGE_NAME \
- -e TAR_NAME=$TAR_NAME \
- shap/continuous_deliver \
- /bin/bash -c "cd /package;/scripts/upload.sh"
+ docker run -t -v "$(pwd):/package" -w /package \
+ -e OBS_USER -e OBS_PASS -e FOLDER -e OBS_PROJECT -e PACKAGE_NAME -e
TAR_NAME shap/continuous_deliver \
+ /bin/bash -c "sed -i 's~%%VERSION%%~$TRAVIS_COMMIT~' _service && \
+ sed -i 's~%%REPOSITORY%%~$TRAVIS_REPO_SLUG~' _service && \
+ /scripts/upload.sh"
- stage: submit
- if: type != pull_request AND branch = master
+ if: tag IS present
env:
- PACKAGE_NAME=prometheus-hanadb_exporter
+ - TAR_NAME=hanadb_exporter
before_install:
- docker pull shap/continuous_deliver:latest
script:
- |
- docker run -t -v "$(pwd):/package" \
- -e OBS_USER=$OBS_USER \
- -e OBS_PASS=$OBS_PASS \
- -e OBS_PROJECT=$OBS_PROJECT \
- -e PACKAGE_NAME=$PACKAGE_NAME \
- -e TARGET_PROJECT=$TARGET_PROJECT \
- shap/continuous_deliver \
- /bin/bash -c "cd /package;/scripts/submit.sh"
+ docker run -t -v "$(pwd):/package" -w /package \
+ -e OBS_USER -e OBS_PASS -e OBS_PROJECT -e PACKAGE_NAME -e
TARGET_PROJECT shap/continuous_deliver \
+ /scripts/submit.sh
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/CONTRIBUTING.md
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/CONTRIBUTING.md
--- old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/CONTRIBUTING.md
2020-02-17 16:18:19.000000000 +0100
+++ new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/CONTRIBUTING.md
2020-05-18 10:52:10.000000000 +0200
@@ -1,5 +1,14 @@
# How to contribute
-Add here all the information related how to contribute to this project. You
should
-consider adding the branching model, the code quality policies, the review
process,
-etc.
+## OBS Releases
+
+The CI will automatically interact with SUSE's [Open Build
Service](https://build.opensuse.org): the master branch will be kept in sync
with the `server:monitoring` project (the development upstream), while a new
Submit Request against the `openSUSE:Factory` project (the stable downstream)
can be triggered by publishing a new GitHub release or pushing a new Git tag.
+
+When releasing to `openSUSE:Factory`, please ensure that tags always follow
the [SemVer](https://semver.org/) scheme, and that [the
changelog](prometheus-hanadb_exporter.changes) contains a new entry, otherwise
the request submission might fail.
+
+#### Note to maintainers
+
+The OBS projects can be changed via various environment variables like
`OBS_PROJECT` and `TARGET_PROJECT` in the Travis settings.
+You can enable the OBS delivery for feature branches in your own fork by
setting the variable `DELIVER_BRANCHES` to a non-empty value.
+
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/LICENSE
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/LICENSE
--- old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/LICENSE
2020-02-17 16:18:19.000000000 +0100
+++ new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/LICENSE
2020-05-18 10:52:10.000000000 +0200
@@ -176,7 +176,7 @@
END OF TERMS AND CONDITIONS
- Copyright 2013-2018 Docker, Inc.
+ Copyright 2019-2020 SUSE LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/README.md
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/README.md
--- old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/README.md
2020-02-17 16:18:19.000000000 +0100
+++ new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/README.md
2020-05-18 10:52:10.000000000 +0200
@@ -24,6 +24,9 @@
The installation of the connector is covered in the `Installation` section.
+3. Some metrics are collected on the HANA monitoring views by the [SAP Host
agent](https://help.sap.com/saphelp_nwpi711/helpdata/en/21/98c443122744efae67c0352033691d/frameset.htm).
Make sure to have it installed and running to have access to all the
monitoring metrics.
+
+
## Metrics file
The exporter uses an additional file to know the metrics that are going to be
exported. Here more information about the [metrics file](./docs/METRICS.md).
@@ -138,9 +141,11 @@
Now, the exporter can be started as a daemon. As we can have multiple
`hanadb_exporter` instances running in one machine, the service is created
using a template file, so an extra information must be given to `systemd` (this
is done adding the `@` keyword after the service name together with the name of
the configuration file created previously in
`/etc/hanadb_exporter/{name}.json`):
```
# All the command must be executed as root user
-systemctl start hanadb_exporter@my-exporter
+systemctl start prometheus-hanadb_exporter@my-exporter
# Check the status with
-systemctl status hanadb_exporter@my-exporter
+systemctl status prometheus-hanadb_exporter@my-exporter
+# Enable the exporter to be started at boot time
+systemctl enable prometheus-hanadb_exporter@my-exporter
```
## License
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/_service
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/_service
--- old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/_service
2020-02-17 16:18:19.000000000 +0100
+++ new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/_service
2020-05-18 10:52:10.000000000 +0200
@@ -1,11 +1,11 @@
<services>
<service name="tar_scm" mode="disabled">
- <param name="url">https://github.com/SUSE/hanadb_exporter.git</param>
+ <param name="url">https://github.com/%%REPOSITORY%%.git</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
<param name="filename">prometheus-hanadb_exporter</param>
- <param name="versionformat">0.7.0+git.%ct.%h</param>
- <param name="revision">master</param>
+ <param name="versionformat">@PARENT_TAG@+git.%ct.%h</param>
+ <param name="revision">%%VERSION%%</param>
</service>
<service name="recompress" mode="disabled">
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/hanadb_exporter/__init__.py
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/hanadb_exporter/__init__.py
---
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/hanadb_exporter/__init__.py
2020-02-17 16:18:19.000000000 +0100
+++
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/hanadb_exporter/__init__.py
2020-05-18 10:52:10.000000000 +0200
@@ -8,4 +8,4 @@
:since: 2019-05-09
"""
-__version__ = "0.7.0"
+__version__ = "0.7.1"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/hanadb_exporter/prometheus_exporter.py
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/hanadb_exporter/prometheus_exporter.py
---
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/hanadb_exporter/prometheus_exporter.py
2020-02-17 16:18:19.000000000 +0100
+++
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/hanadb_exporter/prometheus_exporter.py
2020-05-18 10:52:10.000000000 +0200
@@ -163,6 +163,10 @@
self._logger.error(str(err))
continue # Moving to the next iteration (query)
formatted_query_result =
utils.format_query_result(query_result)
+ if not formatted_query_result:
+ self._logger.warning(
+ 'Query %s ... has not returned any record',
query.query)
+ continue
for metric in query.metrics:
if metric.type == "gauge":
try:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/prometheus-hanadb_exporter.changes
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/prometheus-hanadb_exporter.changes
---
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/prometheus-hanadb_exporter.changes
2020-02-17 16:18:19.000000000 +0100
+++
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/prometheus-hanadb_exporter.changes
2020-05-18 10:52:10.000000000 +0200
@@ -1,4 +1,17 @@
-------------------------------------------------------------------
+Tue May 5 11:18:53 UTC 2020 - Xabier Arbulu <[email protected]>
+
+- Version 0.7.1 Fix the case where HELP and TYPE entries are exported
+even though there is not any record for that metric (bsc#1170717)
+
+(jsc#SLE-10902, jsc#SLE-10903, jsc#ECO-817, jsc#ECO-818)
+
+-------------------------------------------------------------------
+Wed Apr 29 15:00:34 UTC 2020 - Julien ADAMEK <[email protected]>
+
+- Fix and improve the README file (bsc#1170843)
+
+-------------------------------------------------------------------
Tue Feb 11 13:31:52 UTC 2020 - Xabier Arbulu <[email protected]>
- Version 0.7.0 created
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/prometheus-hanadb_exporter.spec
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/prometheus-hanadb_exporter.spec
---
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/prometheus-hanadb_exporter.spec
2020-02-17 16:18:19.000000000 +0100
+++
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/prometheus-hanadb_exporter.spec
2020-05-18 10:52:10.000000000 +0200
@@ -1,7 +1,7 @@
#
# spec file for package prometheus-hanadb_exporter
#
-# Copyright (c) 2019 SUSE LLC
+# Copyright (c) 2019-2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/tests/prometheus_exporter_test.py
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/tests/prometheus_exporter_test.py
---
old/prometheus-hanadb_exporter-0.7.0+git.1581952699.a346b55/tests/prometheus_exporter_test.py
2020-02-17 16:18:19.000000000 +0100
+++
new/prometheus-hanadb_exporter-0.7.1+git.1589791930.dbf0d1a/tests/prometheus_exporter_test.py
2020-05-18 10:52:10.000000000 +0200
@@ -297,18 +297,19 @@
@mock.patch('hanadb_exporter.utils.format_query_result')
@mock.patch('hanadb_exporter.utils.check_hana_range')
+ @mock.patch('logging.Logger.warning')
@mock.patch('logging.Logger.info')
- def test_collect(self, mock_logger, mock_hana_range, mock_format_query):
+ def test_collect(self, mock_logger, mock_logger_warning, mock_hana_range,
mock_format_query):
self._collector.reconnect = mock.Mock()
self._collector._manage_gauge = mock.Mock()
self._mock_connector.query.side_effect = [
- 'result1', 'result2']
+ 'result1', 'result2', '']
mock_format_query.side_effect = [
- 'form_result1', 'form_result2']
+ 'form_result1', 'form_result2', '']
- mock_hana_range.side_effect = [True, True, False]
+ mock_hana_range.side_effect = [True, True, False, True]
self._collector._manage_gauge.side_effect = [
'gauge1', 'gauge2', 'gauge3', 'gauge4', 'gauge5']
@@ -330,9 +331,10 @@
metrics4_2 = mock.Mock(type='gauge')
metrics4 = [metrics2_1, metrics2_2]
query4 = mock.Mock(enabled=True, query='query4', metrics=metrics4,
hana_version_range=['1.0.0', '2.0.0'])
+ query5 = mock.Mock(enabled=True, query='query5', metrics=[],
hana_version_range=['4.0'])
self._collector._metrics_config.queries = [
- query1, query2, query3, query4
+ query1, query2, query3, query4, query5
]
for index, element in enumerate(self._collector.collect()):
@@ -341,17 +343,20 @@
self._collector.reconnect.assert_called_once_with()
self._mock_connector.query.assert_has_calls([
mock.call('query1'),
- mock.call('query3')])
+ mock.call('query3'),
+ mock.call('query5')])
mock_format_query.assert_has_calls([
mock.call('result1'),
- mock.call('result2')
+ mock.call('result2'),
+ mock.call('')
])
mock_hana_range.assert_has_calls([
mock.call('2.0', ['1.0']),
mock.call('2.0', ['3.0']),
- mock.call('2.0', ['1.0.0', '2.0.0'])
+ mock.call('2.0', ['1.0.0', '2.0.0']),
+ mock.call('2.0', ['4.0'])
])
self._collector._manage_gauge.assert_has_calls([
@@ -368,6 +373,9 @@
'query4', ['1.0.0', '2.0.0'])
])
+ mock_logger_warning.assert_called_once_with(
+ 'Query %s ... has not returned any record', 'query5')
+
@mock.patch('hanadb_exporter.utils.format_query_result')
@mock.patch('hanadb_exporter.utils.check_hana_range')
def test_collect_incorrect_type(self, mock_hana_range, mock_format_query):