Skip to content

Commit 59214ab

Browse files
Fixed redis-benchmarks-spec-api response_data being used before assignement (#48)
* [fix] Fixed response_data being used before assignement * [fix] Fixed response_data being used before assignement * [add] further improve cli trigger * [wip] stashing WIP * [fix] Fixed failing tests on merge from main
1 parent 82d8b3c commit 59214ab

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This repo aims to provide Redis related benchmark standards and methodologies fo
4242
Current supported benchmark tools:
4343

4444
- [redis-benchmark](https://github.com/redis/redis)
45-
- [SOON][memtier_benchmark](https://github.com/RedisLabs/memtier_benchmark)
45+
- [memtier_benchmark](https://github.com/RedisLabs/memtier_benchmark)
4646
- [SOON][redis-benchmark-go](https://github.com/filipecosta90/redis-benchmark-go)
4747

4848

redis_benchmarks_specification/__common__/builder_schema.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ def get_commit_dict_from_sha(
8888
commit_dict={},
8989
use_git_timestamp=False,
9090
gh_token=None,
91+
gh_branch=None,
9192
):
9293
commit = None
9394
# using an access token
@@ -102,6 +103,8 @@ def get_commit_dict_from_sha(
102103
use_git_timestamp = False
103104
commit_dict["use_git_timestamp"] = str(use_git_timestamp)
104105
commit_dict["git_hash"] = git_hash
106+
if gh_branch is not None:
107+
commit_dict["git_branch"] = gh_branch
105108

106109
result, binary_key, binary_value, error_msg = get_archive_zip_from_hash(
107110
gh_org, gh_repo, git_hash, commit_dict

redis_benchmarks_specification/__self_contained_coordinator__/self_contained_coordinator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ def self_contained_coordinator_blocking_read(
254254
if overall_result is True:
255255
ack_reply = conn.xack(
256256
STREAM_KEYNAME_NEW_BUILD_EVENTS,
257-
STREAM_GH_NEW_BUILD_RUNNERS_CG,
257+
get_runners_consumer_group_name(platform_name),
258258
stream_id,
259259
)
260260
if type(ack_reply) == bytes:

utils/tests/test_self_contained_coordinator.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
generate_cpuset_cpus,
2222
self_contained_coordinator_blocking_read,
2323
build_runners_consumer_group_create,
24+
get_runners_consumer_group_name,
2425
prepare_memtier_benchmark_parameters,
2526
)
2627
from redis_benchmarks_specification.__setups__.topologies import get_topologies
@@ -140,6 +141,14 @@ def test_self_contained_coordinator_blocking_read():
140141
)
141142
assert result == True
142143
assert number_processed_streams == 1
144+
# ensure we're able to aknowledge the consumed message
145+
assert (
146+
conn.xinfo_consumers(
147+
STREAM_KEYNAME_NEW_BUILD_EVENTS,
148+
get_runners_consumer_group_name(running_platform),
149+
)[0]["pending"]
150+
== 0
151+
)
143152
tf_github_org = "redis"
144153
tf_github_repo = "redis"
145154
test_name = "redis-benchmark-full-suite-1Mkeys-100B"
@@ -239,6 +248,8 @@ def test_self_contained_coordinator_blocking_read():
239248
assert len(rts.redis.smembers(testcases_setname)) == 1
240249
assert len(rts.redis.smembers(project_branches_setname)) == 1
241250
assert len(rts.redis.smembers(project_versions_setname)) == 0
251+
# ensure we don't change state on the rdb
252+
conn.execute_command("DEBUG", "RELOAD", "NOSAVE")
242253

243254
except redis.exceptions.ConnectionError:
244255
pass

0 commit comments

Comments
 (0)