Skip to content

Prevent stats to fail on unknown commands #288

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions redis_benchmarks_specification/__cli__/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
benchmark_config = {}
requires_override = False
test_result = True
tested_groups_match_origin = True

with open(test_file, "r") as stream:

try:
Expand Down Expand Up @@ -291,7 +293,7 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
)

if tested_groups != origin_tested_groups:
requires_override = True
tested_groups_match_origin = False
benchmark_config["tested-groups"] = tested_groups
logging.warn(
"there is a difference between specified test-groups in the yaml (name={}) and the ones we've detected {}!={}".format(
Expand All @@ -312,7 +314,15 @@ def generate_stats_cli_command_logic(args, project_name, project_version):
test_result = False
overall_result &= test_result

if requires_override and override_enabled:
if not tested_groups_match_origin:
if len(tested_groups) > 0:
overall_result = False
else:
logging.warn(
"difference between specified and detected test-groups was ignored since command info is not available in this benchmark version"
)

if (requires_override or not tested_groups_match_origin) and override_enabled:
logging.info(
"Saving a new version of the file {} with the overrided data".format(
test_file
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ dbconfig:
requests:
memory: 1g
tested-groups:
- redisearch
tested-commands:
- search
tested-commands:
- hset
- ft.search
redis-topologies:
- oss-standalone-with-redisearch
build-variants:
Expand Down