benchmark-runner 1.0.822__py3-none-any.whl → 1.0.823__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of benchmark-runner might be problematic. Click here for more details.
- benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py +34 -7
- {benchmark_runner-1.0.822.dist-info → benchmark_runner-1.0.823.dist-info}/METADATA +1 -1
- {benchmark_runner-1.0.822.dist-info → benchmark_runner-1.0.823.dist-info}/RECORD +6 -6
- {benchmark_runner-1.0.822.dist-info → benchmark_runner-1.0.823.dist-info}/WHEEL +0 -0
- {benchmark_runner-1.0.822.dist-info → benchmark_runner-1.0.823.dist-info}/licenses/LICENSE +0 -0
- {benchmark_runner-1.0.822.dist-info → benchmark_runner-1.0.823.dist-info}/top_level.txt +0 -0
|
@@ -26,6 +26,30 @@ class UpdateGrafanaLatestValueMappings:
|
|
|
26
26
|
self.main_libsonnet_path = main_libsonnet_path
|
|
27
27
|
self.value_mappings = self.get_value_mappings()
|
|
28
28
|
|
|
29
|
+
@staticmethod
|
|
30
|
+
def _normalize_version_for_grafana(version: str) -> str:
|
|
31
|
+
"""
|
|
32
|
+
Normalizes a version string for Grafana, then strips all non-digit characters.
|
|
33
|
+
|
|
34
|
+
Examples:
|
|
35
|
+
'4.14.0-ec.2' -> '414002'
|
|
36
|
+
'4.15.0-rc.3' -> '415013'
|
|
37
|
+
'4.15.5' -> '4155'
|
|
38
|
+
|
|
39
|
+
Returns:
|
|
40
|
+
A normalized numeric string, replacing '-ec.' with '0' and '-rc.' with '1' if present;
|
|
41
|
+
otherwise returns the version string with all non-digit characters removed.
|
|
42
|
+
"""
|
|
43
|
+
qualifiers = {'-ec.': '0', '-rc.': '1'}
|
|
44
|
+
for qualifier, replacement in qualifiers.items():
|
|
45
|
+
if qualifier in version:
|
|
46
|
+
replaced = version.replace(qualifier, replacement)
|
|
47
|
+
digits_only = ''.join(c for c in replaced if c.isdigit())
|
|
48
|
+
return digits_only
|
|
49
|
+
|
|
50
|
+
# No qualifier found; return only digits from the original version
|
|
51
|
+
return ''.join(c for c in version if c.isdigit())
|
|
52
|
+
|
|
29
53
|
def get_last_elasticsearch_versions(self, last_es_fetch_days=LAST_ES_FETCH_DAYS):
|
|
30
54
|
"""
|
|
31
55
|
This method fetches new versions from ElasticSearch
|
|
@@ -42,10 +66,11 @@ class UpdateGrafanaLatestValueMappings:
|
|
|
42
66
|
display_versions = ['ocp_version', 'cnv_version', 'kata_version', 'kata_rpm_version', 'odf_version']
|
|
43
67
|
for id in ids:
|
|
44
68
|
data = self.elasticsearch.get_elasticsearch_index_by_id(index='ci-status', id=id)
|
|
45
|
-
for
|
|
46
|
-
if
|
|
47
|
-
#
|
|
48
|
-
|
|
69
|
+
for resource, version in data['_source'].items():
|
|
70
|
+
if resource in display_versions and version not in new_versions.values() and len(version) < self.MAX_VERSION_LEN:
|
|
71
|
+
# Normalize version for Grafana panel if it contains non-digit characters
|
|
72
|
+
normalized = self._normalize_version_for_grafana(version)
|
|
73
|
+
new_versions[normalized] = version
|
|
49
74
|
|
|
50
75
|
return new_versions
|
|
51
76
|
|
|
@@ -88,9 +113,11 @@ class UpdateGrafanaLatestValueMappings:
|
|
|
88
113
|
max_index, max_key = sorted_mapping[-1][1]['index'], sorted_mapping[-1][0]
|
|
89
114
|
|
|
90
115
|
num = 1
|
|
91
|
-
for
|
|
92
|
-
if not self.value_mappings.get(
|
|
93
|
-
|
|
116
|
+
for version_key, version in last_versions.items():
|
|
117
|
+
if not self.value_mappings.get(version_key) or self.value_mappings[version_key]['text'] != version:
|
|
118
|
+
# Normalize version for Grafana panel
|
|
119
|
+
normalized = self._normalize_version_for_grafana(version)
|
|
120
|
+
self.value_mappings[normalized] = {"index": int(max_index) + num, "text": version}
|
|
94
121
|
num += 1
|
|
95
122
|
|
|
96
123
|
def update_main_libsonnet(self):
|
|
@@ -41,7 +41,7 @@ benchmark_runner/common/google_drive/google_drive_exceptions.py,sha256=7he1sGD-v
|
|
|
41
41
|
benchmark_runner/common/google_drive/google_drive_operations.py,sha256=dGf2_aDSU1XoXSEHk5kAJK7ZWWwbd_QATmXV0nulTms,17553
|
|
42
42
|
benchmark_runner/common/grafana/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
benchmark_runner/common/grafana/grafana_operations.py,sha256=Emt-p44OSe_XgVp6c94EVcDEaniyYtUDQMWCGIP0GR8,4877
|
|
44
|
-
benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py,sha256=
|
|
44
|
+
benchmark_runner/common/grafana/update_grafana_latest_value_mappings.py,sha256=xZQpI14J70lTDb7YiZMtlPghXal9_VQ3bv46fO2y7X8,6767
|
|
45
45
|
benchmark_runner/common/logger/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
46
46
|
benchmark_runner/common/logger/init_logger.py,sha256=ERa-gNqrl2pZybj7v3csvmao7Mv1CIeFhpNKx68DSTc,968
|
|
47
47
|
benchmark_runner/common/logger/logger_exceptions.py,sha256=rivdlRm_jIsKQ53rP_-HX8emdtOmQNO4JuIkg8fnBoc,454
|
|
@@ -174,8 +174,8 @@ benchmark_runner/workloads/windows_vm.py,sha256=qFVD3qBFMnVpYXnrpam-7H5-0Yzvx6qt
|
|
|
174
174
|
benchmark_runner/workloads/workloads.py,sha256=F9fnk4h715tq7ANSCbDH0jktB8fpr_u3YG61Kdi5_os,1422
|
|
175
175
|
benchmark_runner/workloads/workloads_exceptions.py,sha256=u7VII95iPRF_YhfpGH1U1RmgiIYESMOtbSF1dz7_ToE,1858
|
|
176
176
|
benchmark_runner/workloads/workloads_operations.py,sha256=DUwvmswAgOXEbrVrV8OTRhrX4K18jnCwedHo9-W5z2s,27068
|
|
177
|
-
benchmark_runner-1.0.
|
|
178
|
-
benchmark_runner-1.0.
|
|
179
|
-
benchmark_runner-1.0.
|
|
180
|
-
benchmark_runner-1.0.
|
|
181
|
-
benchmark_runner-1.0.
|
|
177
|
+
benchmark_runner-1.0.823.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
178
|
+
benchmark_runner-1.0.823.dist-info/METADATA,sha256=CbkQZrvPrz1-00Na6ELQ3D8HszLHJAsjKKlzNX4hdbM,11520
|
|
179
|
+
benchmark_runner-1.0.823.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
180
|
+
benchmark_runner-1.0.823.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
|
|
181
|
+
benchmark_runner-1.0.823.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|