Skip to content

Commit d1f837b

Browse files
Improved fetchRemoteSetupFromConfig to follow remote naming standards (#36)
* [add] improved fetchRemoteSetupFromConfig to follow remote naming standards * Bumping version from 0.1.35 to 0.1.36
1 parent ab07c36 commit d1f837b

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
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.1.35"
3+
version = "0.1.36"
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>"]
66
readme = "README.md"

redisbench_admin/utils/remote.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -283,29 +283,25 @@ def get_run_full_filename(
283283
return benchmark_output_filename
284284

285285

286-
def fetchRemoteSetupFromConfig(remote_setup_config):
287-
branch = "master"
288-
repo = None
289-
path = None
286+
def fetchRemoteSetupFromConfig(remote_setup_config, repo="https://github.com/RedisLabsModules/testing-infrastructure.git",branch="master"):
287+
type = None
288+
setup = None
290289
for remote_setup_property in remote_setup_config:
291-
if "repo" in remote_setup_property:
292-
repo = remote_setup_property["repo"]
293-
if "branch" in remote_setup_property:
294-
branch = remote_setup_property["branch"]
295-
if "path" in remote_setup_property:
296-
path = remote_setup_property["path"]
290+
if "type" in remote_setup_property:
291+
type = remote_setup_property["type"]
292+
if "setup" in remote_setup_property:
293+
setup = remote_setup_property["setup"]
297294
# fetch terraform folder
295+
path = "/terraform/{}-{}".format(type,setup)
298296
temporary_dir = tempfile.mkdtemp()
299297
logging.info(
300298
"Fetching infrastructure definition from git repo {}/{} (branch={})".format(
301299
repo, path, branch
302300
)
303301
)
304302
git.Repo.clone_from(repo, temporary_dir, branch=branch, depth=1)
305-
terraform_working_dir = temporary_dir
306-
if path is not None:
307-
terraform_working_dir += path
308-
return terraform_working_dir
303+
terraform_working_dir = temporary_dir + path
304+
return terraform_working_dir, type
309305

310306

311307
def pushDataToRedisTimeSeries(rts: Client, branch_time_series_dict: dict):

0 commit comments

Comments
 (0)