Skip to content

Commit 3f2aa88

Browse files
Enabled fail-fast on run-remote (#325)
* Fixed cat of log on error situation * Enabled fail-fast on run-remote
1 parent bae2055 commit 3f2aa88

File tree

3 files changed

+37
-2
lines changed

3 files changed

+37
-2
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "redisbench-admin"
3-
version = "0.7.19"
3+
version = "0.7.20"
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 <[email protected]>","Redis Performance Group <[email protected]>"]
66
readme = "README.md"

redisbench_admin/run_remote/remote_db.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ def db_error_artifacts(
372372
username,
373373
private_key,
374374
[
375-
"zip -r {} {}".format(remote_zipfile, temporary_dir),
375+
"zip -r {} {}/*".format(remote_zipfile, temporary_dir),
376376
],
377377
db_ssh_port,
378378
)

redisbench_admin/run_remote/run_remote.py

+35
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,34 @@ def run_remote_command_logic(args, project_name, project_version):
211211
overall_tables = {}
212212

213213
for benchmark_type, bench_by_dataset_map in benchmark_runs_plan.items():
214+
if return_code != 0 and args.fail_fast:
215+
logging.warning(
216+
"Given you've selected fail fast skipping benchmark_type {}".format(
217+
benchmark_type
218+
)
219+
)
220+
continue
214221
logging.info("Running benchmarks of type {}.".format(benchmark_type))
215222
for (
216223
dataset_name,
217224
bench_by_dataset_and_setup_map,
218225
) in bench_by_dataset_map.items():
226+
if return_code != 0 and args.fail_fast:
227+
logging.warning(
228+
"Given you've selected fail fast skipping dataset {}".format(
229+
dataset_name
230+
)
231+
)
232+
continue
219233
logging.info("Running benchmarks for dataset {}.".format(dataset_name))
220234
for setup_name, setup_details in bench_by_dataset_and_setup_map.items():
235+
if return_code != 0 and args.fail_fast:
236+
logging.warning(
237+
"Given you've selected fail fast skipping setup {}".format(
238+
setup_name
239+
)
240+
)
241+
continue
221242

222243
setup_settings = setup_details["setup_settings"]
223244
benchmarks_map = setup_details["benchmarks"]
@@ -228,13 +249,27 @@ def run_remote_command_logic(args, project_name, project_version):
228249
overall_tables[setup_name] = {}
229250

230251
for test_name, benchmark_config in benchmarks_map.items():
252+
if return_code != 0 and args.fail_fast:
253+
logging.warning(
254+
"Given you've selected fail fast skipping test {}".format(
255+
test_name
256+
)
257+
)
258+
continue
231259
metadata_tags = get_metadata_tags(benchmark_config)
232260
logging.info(
233261
"Including the extra metadata tags into this test generated time-series: {}".format(
234262
metadata_tags
235263
)
236264
)
237265
for repetition in range(1, BENCHMARK_REPETITIONS + 1):
266+
if return_code != 0 and args.fail_fast:
267+
logging.warning(
268+
"Given you've selected fail fast skipping repetition {}".format(
269+
repetition
270+
)
271+
)
272+
continue
238273
remote_perf = None
239274
logging.info(
240275
"Repetition {} of {}. Running test {}".format(

0 commit comments

Comments
 (0)