redisbench-admin 0.11.42__py3-none-any.whl → 0.11.43__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -148,14 +148,7 @@ def create_run_remote_arguments(parser):
148
148
  "--spin-test",
149
149
  default=False,
150
150
  action="store_true",
151
- help="Setup standalone Redis server, run INFO SERVER, print output as markdown and exit",
152
- )
153
- parser.add_argument(
154
- "--spin-test-config",
155
- required=False,
156
- default=None,
157
- type=str,
158
- help="Optional benchmark configuration file for spin-test mode (to execute install_steps)",
151
+ help="Setup standalone Redis server, run INFO SERVER, print output as markdown and exit (reads install_steps from defaults.yml)",
159
152
  )
160
153
 
161
154
  return parser
@@ -4,6 +4,7 @@
4
4
  # All rights reserved.
5
5
  #
6
6
  import logging
7
+ import os
7
8
  import random
8
9
  import string
9
10
  import sys
@@ -270,17 +271,30 @@ def run_remote_command_logic(args, project_name, project_version):
270
271
  logging.error("❌ --spin-test requires server_public_ip in --inventory")
271
272
  exit(1)
272
273
 
273
- # Load benchmark config if provided
274
+ # Load benchmark config from defaults.yml
274
275
  benchmark_config = None
275
- if args.spin_test_config:
276
+
277
+ # Try to load defaults.yml
278
+ defaults_file = (
279
+ args.defaults_filename
280
+ if hasattr(args, "defaults_filename")
281
+ else "defaults.yml"
282
+ )
283
+ if os.path.exists(defaults_file):
276
284
  try:
277
285
  import yaml
278
- with open(args.spin_test_config, 'r') as config_file:
279
- benchmark_config = yaml.safe_load(config_file)
280
- logging.info(f"📋 Loaded benchmark config from {args.spin_test_config}")
286
+
287
+ with open(defaults_file, "r") as config_file:
288
+ defaults_config = yaml.safe_load(config_file)
289
+ if defaults_config:
290
+ benchmark_config = defaults_config
291
+ logging.info(f"📋 Loaded configuration from {defaults_file}")
281
292
  except Exception as e:
282
- logging.error(f" Failed to load benchmark config: {e}")
283
- exit(1)
293
+ logging.warning(f"⚠️ Failed to load defaults config: {e}")
294
+ else:
295
+ logging.info(
296
+ f"📋 No {defaults_file} found - proceeding without install_steps"
297
+ )
284
298
 
285
299
  # Run spin test
286
300
  success = spin_test_standalone_redis(
@@ -457,7 +457,9 @@ def generate_remote_standalone_redis_cmd(
457
457
  return full_logfile, initial_redis_cmd
458
458
 
459
459
 
460
- def execute_install_steps(benchmark_config, server_public_ip, username, private_key, db_ssh_port):
460
+ def execute_install_steps(
461
+ benchmark_config, server_public_ip, username, private_key, db_ssh_port
462
+ ):
461
463
  """
462
464
  Execute install_steps from dbconfig and clientconfig sections.
463
465
 
@@ -496,7 +498,9 @@ def execute_install_steps(benchmark_config, server_public_ip, username, private_
496
498
  steps = config_item["install_steps"]
497
499
  if isinstance(steps, list):
498
500
  install_commands.extend(steps)
499
- logging.info(f"📦 Found {len(steps)} install steps in clientconfig")
501
+ logging.info(
502
+ f"📦 Found {len(steps)} install steps in clientconfig"
503
+ )
500
504
  elif isinstance(clientconfig, dict):
501
505
  if "install_steps" in clientconfig:
502
506
  steps = clientconfig["install_steps"]
@@ -592,6 +596,11 @@ def spin_test_standalone_redis(
592
596
  remote_redis_server_path = None
593
597
 
594
598
  if custom_redis_conf_path:
599
+ # Convert relative paths to absolute paths
600
+ custom_redis_conf_path = os.path.abspath(
601
+ os.path.expanduser(custom_redis_conf_path)
602
+ )
603
+
595
604
  if not os.path.exists(custom_redis_conf_path):
596
605
  logging.error(
597
606
  f"❌ Custom redis.conf file not found: {custom_redis_conf_path}"
@@ -599,7 +608,9 @@ def spin_test_standalone_redis(
599
608
  return False
600
609
 
601
610
  remote_redis_conf_path = f"{temporary_dir}/redis.conf"
602
- logging.info(f"📁 Copying custom redis.conf to remote host...")
611
+ logging.info(
612
+ f"📁 Copying custom redis.conf from {custom_redis_conf_path} to {remote_redis_conf_path}"
613
+ )
603
614
 
604
615
  copy_result = copy_file_to_remote_setup(
605
616
  server_public_ip,
@@ -615,8 +626,17 @@ def spin_test_standalone_redis(
615
626
  if not copy_result:
616
627
  logging.error("❌ Failed to copy redis.conf to remote host")
617
628
  return False
629
+ else:
630
+ logging.info(
631
+ f"✅ Successfully copied redis.conf to {remote_redis_conf_path}"
632
+ )
618
633
 
619
634
  if custom_redis_server_path:
635
+ # Convert relative paths to absolute paths
636
+ custom_redis_server_path = os.path.abspath(
637
+ os.path.expanduser(custom_redis_server_path)
638
+ )
639
+
620
640
  if not os.path.exists(custom_redis_server_path):
621
641
  logging.error(
622
642
  f"❌ Custom redis-server binary not found: {custom_redis_server_path}"
@@ -624,7 +644,9 @@ def spin_test_standalone_redis(
624
644
  return False
625
645
 
626
646
  remote_redis_server_path = f"{temporary_dir}/redis-server"
627
- logging.info(f"📁 Copying custom redis-server binary to remote host...")
647
+ logging.info(
648
+ f"📁 Copying custom redis-server binary from {custom_redis_server_path} to {remote_redis_server_path}"
649
+ )
628
650
 
629
651
  copy_result = copy_file_to_remote_setup(
630
652
  server_public_ip,
@@ -653,7 +675,9 @@ def spin_test_standalone_redis(
653
675
  f"⚠️ Failed to make redis-server binary executable: {stderr}"
654
676
  )
655
677
  else:
656
- logging.info("✅ Redis-server binary made executable")
678
+ logging.info(
679
+ f"✅ Successfully copied and made executable: {remote_redis_server_path}"
680
+ )
657
681
 
658
682
  # Copy modules if provided
659
683
  remote_module_files = None
@@ -680,6 +704,13 @@ def spin_test_standalone_redis(
680
704
 
681
705
  # Generate Redis startup command
682
706
  logfile = "redis-spin-test.log"
707
+
708
+ # Log what paths we're using
709
+ logging.info(f"🔧 Redis command generation:")
710
+ logging.info(f" - Custom server path: {remote_redis_server_path}")
711
+ logging.info(f" - Custom config path: {remote_redis_conf_path}")
712
+ logging.info(f" - Module files: {remote_module_files}")
713
+
683
714
  _, redis_cmd = generate_remote_standalone_redis_cmd(
684
715
  logfile,
685
716
  redis_configuration_parameters,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redisbench-admin
3
- Version: 0.11.42
3
+ Version: 0.11.43
4
4
  Summary: Redis benchmark run helper. A wrapper around Redis and Redis Modules benchmark tools ( ftsb_redisearch, memtier_benchmark, redis-benchmark, aibench, etc... ).
5
5
  Author: filipecosta90
6
6
  Author-email: filipecosta.90@gmail.com
@@ -211,7 +211,7 @@ redisbench_admin/run_local/local_db.py,sha256=9vINqKOs-wDMFEuEHT0I8KO9YnEo_h4NWN
211
211
  redisbench_admin/run_local/local_helpers.py,sha256=JyqLW2-Sbm35BXjxxfOB1yK7ADdLfcVrq08NLNdIwac,7026
212
212
  redisbench_admin/run_local/run_local.py,sha256=QHnGfVAaVuct7t0WrWyQpbirC3MWX7fQF5-kXU_pJBs,34834
213
213
  redisbench_admin/run_remote/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
214
- redisbench_admin/run_remote/args.py,sha256=gJux_1udR6d5BUMMnIewl62hS0b2WnQ_7WQF4hElX7c,5051
214
+ redisbench_admin/run_remote/args.py,sha256=P7azI3m5jJJBovD9rLCvFWjVNveMcu7FVZbEUjdDn0c,4866
215
215
  redisbench_admin/run_remote/consts.py,sha256=bCMkwyeBD-EmOpoHKni7LjWy5WuaxGJhGhqpi4AL0RQ,386
216
216
  redisbench_admin/run_remote/log.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
217
217
  redisbench_admin/run_remote/notifications.py,sha256=-W9fLaftEFNfplBl2clHk37jbYxliDbHftQ62khN31k,2157
@@ -220,8 +220,8 @@ redisbench_admin/run_remote/remote_db.py,sha256=EEDeiOZk-godr5EINscEkOJLGWUN3gFf
220
220
  redisbench_admin/run_remote/remote_env.py,sha256=Ux_0QT1unNRlKl3cakzjG5Px1uuxOOfBoF_pnalx_T8,4936
221
221
  redisbench_admin/run_remote/remote_failures.py,sha256=IOo6DyxarcwwMPCeN4gWB2JrhuC9iBLwq0nCROqr5ak,1567
222
222
  redisbench_admin/run_remote/remote_helpers.py,sha256=skWeGyDJBmyx_UwUekT3N3_nOJvF2-Hvu-E7vKlO9gg,10598
223
- redisbench_admin/run_remote/run_remote.py,sha256=7B-x-AI1pVon8ccfRio8q6EXTXaqPPMj_PxytpiICUs,76045
224
- redisbench_admin/run_remote/standalone.py,sha256=Or2GaSccxEyIl0z833RWi-fylSQ71Z6E1R2vbN0rHMM,31593
223
+ redisbench_admin/run_remote/run_remote.py,sha256=VSKPAh-ky8ihwtlx8k2ZTIkF-bV3h40LmZ7A9LvrTsE,76460
224
+ redisbench_admin/run_remote/standalone.py,sha256=TY9kcie3cZEC72ApnZGzHpRu-2oYwnqvvHvpiIQbyMk,32703
225
225
  redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
226
226
  redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
227
227
  redisbench_admin/utils/benchmark_config.py,sha256=bC2C6rnj89wkkSlOXyyfe0N15unn_M1t1zfskfVkb98,21387
@@ -235,8 +235,8 @@ redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6r
235
235
  redisbench_admin/watchdog/__init__.py,sha256=cD7zfXt0VEmy0b7452HvcAxX_9kVj6Vm213yNdUHP20,95
236
236
  redisbench_admin/watchdog/args.py,sha256=nKsG1G6ATOZlAMHMtT9u3kXxduKCbejSZ5x8oB_ynZ8,1312
237
237
  redisbench_admin/watchdog/watchdog.py,sha256=0wWYge3x_OMxWrzazNhJif2NK4tKsI963HVZqjczRag,6189
238
- redisbench_admin-0.11.42.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.11.42.dist-info/METADATA,sha256=s_waYOA4L1z-YQOS-p7DPaW8QWK2zzr2rsMSEAIVD7Y,5596
240
- redisbench_admin-0.11.42.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
- redisbench_admin-0.11.42.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
- redisbench_admin-0.11.42.dist-info/RECORD,,
238
+ redisbench_admin-0.11.43.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.11.43.dist-info/METADATA,sha256=UNlX9IOVDskYPuGhnpCSglVyoBBj5PZksnch-G-r5O4,5596
240
+ redisbench_admin-0.11.43.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
+ redisbench_admin-0.11.43.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
+ redisbench_admin-0.11.43.dist-info/RECORD,,