diff --git a/0001-Add-default-port-to-Elasticsearch-connection-url.patch b/0001-Add-default-port-to-Elasticsearch-connection-url.patch new file mode 100644 index 0000000..deba306 --- /dev/null +++ b/0001-Add-default-port-to-Elasticsearch-connection-url.patch @@ -0,0 +1,42 @@ +From 5833d9519a31665447250e9c734ca64c065dab64 Mon Sep 17 00:00:00 2001 +From: Daniel Garcia Moreno +Date: Wed, 5 Oct 2022 14:42:54 +0200 +Subject: [PATCH] Add default port to Elasticsearch connection url + +This change makes it compatible with modern versions of elasticsearch. + +Change-Id: I10b8b57432894e28d5da87eb6d886a053be776f0 +--- + osprofiler/drivers/elasticsearch_driver.py | 2 +- + test-requirements.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/osprofiler/drivers/elasticsearch_driver.py b/osprofiler/drivers/elasticsearch_driver.py +index da9be17..deb42a3 100644 +--- a/osprofiler/drivers/elasticsearch_driver.py ++++ b/osprofiler/drivers/elasticsearch_driver.py +@@ -44,7 +44,7 @@ class ElasticsearchDriver(base.Driver): + client_url = parser.urlunparse(parser.urlparse(self.connection_str) + ._replace(scheme="http")) + self.conf = conf +- self.client = Elasticsearch(client_url) ++ self.client = Elasticsearch(client_url + ":9200") + self.index_name = index_name + self.index_name_error = "osprofiler-notifications-error" + +diff --git a/test-requirements.txt b/test-requirements.txt +index 3e1bbd8..52c1446 100644 +--- a/test-requirements.txt ++++ b/test-requirements.txt +@@ -13,7 +13,7 @@ bandit>=1.6.0,<1.7.0 # Apache-2.0 + pymongo!=3.1,>=3.0.2 # Apache-2.0 + + # Elasticsearch python client +-elasticsearch>=2.0.0,<3.0.0 # Apache-2.0 ++elasticsearch>=2.0.0,<9.0.0 # Apache-2.0 + + # Redis python client + redis>=2.10.0 # MIT +-- +2.37.3 + diff --git a/_service b/_service index adc86f7..5ff958e 100644 --- a/_service +++ b/_service @@ -1,12 +1,12 @@ - + https://opendev.org/openstack/rpm-packaging/raw/master/openstack/osprofiler/osprofiler.spec.j2 python-osprofiler.spec https://opendev.org/openstack/osprofiler/raw/master/requirements.txt cloud-devel@suse.de gh,openstack,osprofiler - + - + diff --git a/osprofiler-3.4.3.tar.gz b/osprofiler-3.4.3.tar.gz deleted file mode 100644 index 522b00c..0000000 --- a/osprofiler-3.4.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cea450598a873e4e11d353ff9f0d16e9f3a72e9e2007e7f056b90379dcd54e1 -size 90967 diff --git a/osprofiler-4.1.0.tar.gz b/osprofiler-4.1.0.tar.gz new file mode 100644 index 0000000..9c22ac1 --- /dev/null +++ b/osprofiler-4.1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:57837b620581b13444a2e20564775d4fc73eff67c7888af99947ed582fe514b0 +size 96068 diff --git a/python-osprofiler.changes b/python-osprofiler.changes index 1b863af..58ad2d1 100644 --- a/python-osprofiler.changes +++ b/python-osprofiler.changes @@ -1,3 +1,28 @@ +------------------------------------------------------------------- +Mon Apr 1 17:37:16 UTC 2024 - Christian Boltz + +- %check: delete test_jaeger.py (already excluded via + --exclude-regex, but still causes import error) +- add missing BuildRequires: python3-opentelemetry-exporter-otlp + +------------------------------------------------------------------- +Thu Jan 4 09:08:04 UTC 2024 - cloud-devel@suse.de + +- added 0001-Add-default-port-to-Elasticsearch-connection-url.patch +- update to version 4.1.0 + - tox: Add functional-py38, functional-py39 envs + - add support of otlp exporter + - jaeger: introduce process tags' option for tracer + - Fix formattiing of release list + - [profiler] hmac_key should be secret + - setup.cfg: Replace dashes with underscores + - jaeger: introduce service name prefix + - remove unicode prefix from code + - jaeger: fix driver initialization for tests + - devstack: remove jaeger container on unstack + - profiler: add python requests profile + - Change StrictRedis usage to Redis + ------------------------------------------------------------------- Wed Jun 8 20:10:52 UTC 2022 - Dirk Müller diff --git a/python-osprofiler.spec b/python-osprofiler.spec index 0851f8f..78cfdf2 100644 --- a/python-osprofiler.spec +++ b/python-osprofiler.spec @@ -1,7 +1,7 @@ # # spec file for package python-osprofiler # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,13 +17,15 @@ Name: python-osprofiler -Version: 3.4.3 +Version: 4.1.0 Release: 0 Summary: OpenStack Profiler Library License: Apache-2.0 Group: Development/Languages/Python URL: https://docs.openstack.org/osprofiler -Source0: https://files.pythonhosted.org/packages/source/o/osprofiler/osprofiler-3.4.3.tar.gz +Source0: https://files.pythonhosted.org/packages/source/o/osprofiler/osprofiler-4.1.0.tar.gz +# https://review.opendev.org/c/openstack/osprofiler/+/860412 +Patch0: 0001-Add-default-port-to-Elasticsearch-connection-url.patch BuildRequires: openstack-macros BuildRequires: python3-PrettyTable >= 0.7.2 BuildRequires: python3-WebOb >= 1.7.1 @@ -31,8 +33,9 @@ BuildRequires: python3-ddt BuildRequires: python3-docutils BuildRequires: python3-elasticsearch BuildRequires: python3-importlib-metadata +BuildRequires: python3-opentelemetry-exporter-otlp BuildRequires: python3-oslo.concurrency >= 3.26.0 -BuildRequires: python3-oslo.config +BuildRequires: python3-oslo.config >= 5.2.0 BuildRequires: python3-oslo.log BuildRequires: python3-oslo.utils >= 3.33.0 BuildRequires: python3-pymongo @@ -56,7 +59,7 @@ Requires: python3-PrettyTable >= 0.7.2 Requires: python3-WebOb >= 1.7.1 Requires: python3-importlib-metadata Requires: python3-oslo.concurrency >= 3.26.0 -Requires: python3-oslo.config +Requires: python3-oslo.config >= 5.2.0 Requires: python3-oslo.log Requires: python3-oslo.utils >= 3.33.0 %if 0%{?suse_version} @@ -83,7 +86,7 @@ BuildRequires: python3-sphinxcontrib-apidoc Documentation for OSProfiler. %prep -%autosetup -p1 -n osprofiler-3.4.3 +%autosetup -p1 -n osprofiler-4.1.0 %py_req_cleanup %build @@ -98,7 +101,8 @@ PBR_VERSION=%{version} %sphinx_build -b html doc/source doc/build/html rm -rf doc/build/html/.{doctrees,buildinfo} %check -python3 -m stestr.cli run --black-regex '(^osprofiler.tests.unit.drivers.test_jaeger.JaegerTestCase.*$)' +rm osprofiler/tests/unit/drivers/test_jaeger.py # causes import error, --exclude-regex in the next line isn't enough +%{openstack_stestr_run} --exclude-regex '(^osprofiler.tests.unit.drivers.test_jaeger.JaegerTestCase.*$)' %files -n python3-osprofiler %license LICENSE