]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/osd_perf_query: fix ivalid escape sequence
authorKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Tue, 23 Jul 2024 17:40:23 +0000 (19:40 +0200)
committerKyr Shatskyy <kyrylo.shatskyy@clyso.com>
Tue, 23 Jul 2024 18:09:42 +0000 (20:09 +0200)
Get rid of warning which, according [1], is going to become an error:

osd_perf_query/module.py:61
  /home/jenkins-build/build/workspace/ceph-pull-requests/src/pybind/mgr/osd_perf_query/module.py:61: DeprecationWarning: invalid escape sequence '\.'
    'regex': '^(?:rbd|journal)_data\.(?:([0-9]+)\.)?([^.]+)\.'},

1. https://docs.python.org/3/library/re.html

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
src/pybind/mgr/osd_perf_query/module.py

index 6f87c1d907a9c4e10b415367512031cd0e5a9d99..ac32f80428226b95de1b5c47253d6be3cf789431 100644 (file)
@@ -58,7 +58,7 @@ class OSDPerfQuery(MgrModule):
         'key_descriptor': [
             {'type': 'pool_id', 'regex': '^(.+)$'},
             {'type': 'object_name',
-             'regex': '^(?:rbd|journal)_data\.(?:([0-9]+)\.)?([^.]+)\.'},
+             'regex': r'^(?:rbd|journal)_data\.(?:([0-9]+)\.)?([^.]+)\.'},
         ],
         'performance_counter_descriptors': [
             'bytes', 'write_ops', 'read_ops', 'write_bytes', 'read_bytes',