Skip to content

Commit 46a5107

Browse files
committed
Added architecture to fetch_remote_setup_from_config
1 parent 6fdb31b commit 46a5107

File tree

7 files changed

+36
-2
lines changed

7 files changed

+36
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.11.23"
3+
version = "0.11.24"
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 <filipecosta.90@gmail.com>","Redis Performance Group <performance@redis.com>"]
66
readme = "README.md"

redisbench_admin/run_remote/remote_db.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ def remote_db_spin(
103103
flushall_on_every_test_start=False,
104104
ignore_keyspace_errors=False,
105105
continue_on_module_check_error=False,
106+
keyspace_check_timeout=60,
106107
):
107108
(
108109
_,

redisbench_admin/run_remote/remote_env.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def remote_env_setup(
4040
db_ssh_port = args.db_ssh_port
4141
client_ssh_port = args.client_ssh_port
4242
username = args.user
43+
logging.info(f"specified arch for deployment {architecture}")
4344
if architecture != ARCH_X86 and tf_folder_path is not None:
4445
logging.info(
4546
f"Checking if the architecture info is specified on the terraform path {tf_folder_path}"
@@ -51,6 +52,9 @@ def remote_env_setup(
5152
logging.info(f"'-{ARCH_ARM}' suffix already in {tf_folder_path}")
5253

5354
if args.inventory is not None:
55+
logging.info(
56+
f"inventory info passed. avoiding to deploy using terraform {args.inventory}"
57+
)
5458
(
5559
status,
5660
client_public_ip,

redisbench_admin/run_remote/run_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ def run_remote_command_logic(args, project_name, project_version):
307307
)
308308
exit(1)
309309
else:
310-
logging.info("Running benchmark for architecture {architecture}")
310+
logging.info(f"Running benchmark for architecture {architecture}")
311311

312312
# contains the overall target-tables ( if any target is defined )
313313
overall_tables = {}

redisbench_admin/run_remote/terraform.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ def terraform_spin_or_reuse_env(
3030
tf_timeout_secs=7200,
3131
tf_override_name=None,
3232
tf_folder_path=None,
33+
architecture="x86_64",
3334
):
3435
(
3536
remote_setup,
@@ -40,6 +41,7 @@ def terraform_spin_or_reuse_env(
4041
"https://github.com/redis-performance/testing-infrastructure.git",
4142
"master",
4243
tf_folder_path,
44+
architecture,
4345
)
4446
logging.info(
4547
"Repetition {} of {}. Deploying test {} on AWS using {}".format(

redisbench_admin/utils/remote.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def fetch_remote_setup_from_config(
579579
repo="https://github.com/redis-performance/testing-infrastructure.git",
580580
branch="master",
581581
path=None,
582+
architecture=ARCH_X86,
582583
):
583584
setup_type = "oss-standalone"
584585
setup = None
@@ -590,7 +591,17 @@ def fetch_remote_setup_from_config(
590591
setup = remote_setup_property["setup"]
591592
# fetch terraform folder
592593
path = "/terraform/{}-{}".format(setup_type, setup)
594+
if architecture != ARCH_X86:
595+
logging.info(
596+
f"Checking if the architecture info is specified on the terraform path {path}"
597+
)
598+
if architecture is ARCH_ARM and ARCH_ARM not in path:
599+
logging.info(f"adding suffix '-{ARCH_ARM}' to {path}")
600+
path = f"{path}-{ARCH_ARM}"
601+
else:
602+
logging.info(f"'-{ARCH_ARM}' suffix already in {path}")
593603
terraform_working_dir = common_tf(branch, path, repo)
604+
594605
return terraform_working_dir, setup_type, setup
595606

596607

tests/test_remote.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,22 @@ def test_fetch_remote_setup_from_config():
106106
assert type == "oss-standalone"
107107

108108

109+
def test_fetch_remote_setup_from_config_aarch64():
110+
architecture = "aarch64"
111+
path = None
112+
branch = "master"
113+
repo = "https://github.com/redis-performance/testing-infrastructure.git"
114+
terraform_working_dir, type, _ = fetch_remote_setup_from_config(
115+
[{"type": "oss-standalone"}, {"setup": "redisearch-m5"}],
116+
repo,
117+
branch,
118+
path,
119+
architecture,
120+
)
121+
assert type == "oss-standalone"
122+
assert terraform_working_dir.endswith("/oss-standalone-redisearch-m5-aarch64")
123+
124+
109125
def test_push_data_to_redistimeseries():
110126
time_series_dict = {}
111127
try:

0 commit comments

Comments
 (0)