Skip to content

Fixed redis-benchmarks-spec-api response_data being used before assignement #48

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 6 commits into from
Dec 7, 2021
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
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This repo aims to provide Redis related benchmark standards and methodologies fo
Current supported benchmark tools:

- [redis-benchmark](https://github.com/redis/redis)
- [SOON][memtier_benchmark](https://github.com/RedisLabs/memtier_benchmark)
- [memtier_benchmark](https://github.com/RedisLabs/memtier_benchmark)
- [SOON][redis-benchmark-go](https://github.com/filipecosta90/redis-benchmark-go)


Expand Down
3 changes: 3 additions & 0 deletions redis_benchmarks_specification/__common__/builder_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def get_commit_dict_from_sha(
commit_dict={},
use_git_timestamp=False,
gh_token=None,
gh_branch=None,
):
commit = None
# using an access token
Expand All @@ -102,6 +103,8 @@ def get_commit_dict_from_sha(
use_git_timestamp = False
commit_dict["use_git_timestamp"] = str(use_git_timestamp)
commit_dict["git_hash"] = git_hash
if gh_branch is not None:
commit_dict["git_branch"] = gh_branch

result, binary_key, binary_value, error_msg = get_archive_zip_from_hash(
gh_org, gh_repo, git_hash, commit_dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def self_contained_coordinator_blocking_read(
if overall_result is True:
ack_reply = conn.xack(
STREAM_KEYNAME_NEW_BUILD_EVENTS,
STREAM_GH_NEW_BUILD_RUNNERS_CG,
get_runners_consumer_group_name(platform_name),
stream_id,
)
if type(ack_reply) == bytes:
Expand Down
11 changes: 11 additions & 0 deletions utils/tests/test_self_contained_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
generate_cpuset_cpus,
self_contained_coordinator_blocking_read,
build_runners_consumer_group_create,
get_runners_consumer_group_name,
prepare_memtier_benchmark_parameters,
)
from redis_benchmarks_specification.__setups__.topologies import get_topologies
Expand Down Expand Up @@ -140,6 +141,14 @@ def test_self_contained_coordinator_blocking_read():
)
assert result == True
assert number_processed_streams == 1
# ensure we're able to aknowledge the consumed message
assert (
conn.xinfo_consumers(
STREAM_KEYNAME_NEW_BUILD_EVENTS,
get_runners_consumer_group_name(running_platform),
)[0]["pending"]
== 0
)
tf_github_org = "redis"
tf_github_repo = "redis"
test_name = "redis-benchmark-full-suite-1Mkeys-100B"
Expand Down Expand Up @@ -239,6 +248,8 @@ def test_self_contained_coordinator_blocking_read():
assert len(rts.redis.smembers(testcases_setname)) == 1
assert len(rts.redis.smembers(project_branches_setname)) == 1
assert len(rts.redis.smembers(project_versions_setname)) == 0
# ensure we don't change state on the rdb
conn.execute_command("DEBUG", "RELOAD", "NOSAVE")

except redis.exceptions.ConnectionError:
pass