Skip to content

Commit f22b767

Browse files
Fixed metadata tags parsing for old format (#309)
1 parent 968767a commit f22b767

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.7.8"
3+
version = "0.7.9"
44
description = "Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... )."
55
authors = ["filipecosta90 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "README.md"

redisbench_admin/utils/benchmark_config.py

+3
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,9 @@ def get_metadata_tags(benchmark_config):
296296
metadata_tags = {}
297297
if "metadata" in benchmark_config:
298298
metadata_tags = benchmark_config["metadata"]
299+
if "labels" in metadata_tags:
300+
if type(metadata_tags["labels"]) == dict:
301+
metadata_tags = metadata_tags["labels"]
299302
return metadata_tags
300303

301304

tests/test_benchmark_config.py

+7
Original file line numberDiff line numberDiff line change
@@ -145,3 +145,10 @@ def test_get_metadata_tags():
145145
benchmark_config = yaml.safe_load(yml_file)
146146
metadata_tags = get_metadata_tags(benchmark_config)
147147
assert metadata_tags == {}
148+
149+
with open(
150+
"./tests/test_data/[email protected]", "r"
151+
) as yml_file:
152+
benchmark_config = yaml.safe_load(yml_file)
153+
metadata_tags = get_metadata_tags(benchmark_config)
154+
assert metadata_tags == {"includes_targets": "true", "test_type": "query"}

0 commit comments

Comments
 (0)