redisbench-admin 0.11.48__py3-none-any.whl → 0.11.49__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.
@@ -48,3 +48,82 @@ def exists_check(error_message, local_module_file, status):
48
48
  "Confirmed that module artifact: '{}' exists!".format(local_module_file)
49
49
  )
50
50
  return error_message, status
51
+
52
+
53
+ def redis_files_check(redis_server_binary_path, redis_conf_path):
54
+ """
55
+ Check if custom Redis server binary and config file paths exist.
56
+
57
+ Args:
58
+ redis_server_binary_path: Path to custom redis-server binary (can be None)
59
+ redis_conf_path: Path to custom redis.conf file (can be None)
60
+
61
+ Returns:
62
+ tuple: (status, error_message) where status is True if all files exist
63
+ """
64
+ status = True
65
+ error_message = ""
66
+
67
+ if redis_server_binary_path is not None:
68
+ # Convert relative paths to absolute paths
69
+ redis_server_binary_path = os.path.abspath(os.path.expanduser(redis_server_binary_path))
70
+ logging.info(
71
+ "Checking if custom Redis server binary {} exists...".format(redis_server_binary_path)
72
+ )
73
+ if not os.path.exists(redis_server_binary_path):
74
+ error_message = "Specified Redis server binary does not exist: {}".format(
75
+ redis_server_binary_path
76
+ )
77
+ logging.error(error_message)
78
+ status = False
79
+ elif not os.path.isfile(redis_server_binary_path):
80
+ error_message = "Specified Redis server binary path is not a file: {}".format(
81
+ redis_server_binary_path
82
+ )
83
+ logging.error(error_message)
84
+ status = False
85
+ elif not os.access(redis_server_binary_path, os.X_OK):
86
+ error_message = "Specified Redis server binary is not executable: {}".format(
87
+ redis_server_binary_path
88
+ )
89
+ logging.error(error_message)
90
+ status = False
91
+ else:
92
+ logging.info(
93
+ "✅ Confirmed that Redis server binary: '{}' exists and is executable!".format(
94
+ redis_server_binary_path
95
+ )
96
+ )
97
+
98
+ if redis_conf_path is not None:
99
+ # Convert relative paths to absolute paths
100
+ redis_conf_path = os.path.abspath(os.path.expanduser(redis_conf_path))
101
+ logging.info(
102
+ "Checking if custom Redis config file {} exists...".format(redis_conf_path)
103
+ )
104
+ if not os.path.exists(redis_conf_path):
105
+ error_message = "Specified Redis config file does not exist: {}".format(
106
+ redis_conf_path
107
+ )
108
+ logging.error(error_message)
109
+ status = False
110
+ elif not os.path.isfile(redis_conf_path):
111
+ error_message = "Specified Redis config file path is not a file: {}".format(
112
+ redis_conf_path
113
+ )
114
+ logging.error(error_message)
115
+ status = False
116
+ elif not os.access(redis_conf_path, os.R_OK):
117
+ error_message = "Specified Redis config file is not readable: {}".format(
118
+ redis_conf_path
119
+ )
120
+ logging.error(error_message)
121
+ status = False
122
+ else:
123
+ logging.info(
124
+ "✅ Confirmed that Redis config file: '{}' exists and is readable!".format(
125
+ redis_conf_path
126
+ )
127
+ )
128
+
129
+ return status, error_message
@@ -35,7 +35,7 @@ from redisbench_admin.run.common import (
35
35
  )
36
36
  from redisbench_admin.run.git import git_vars_crosscheck
37
37
  from redisbench_admin.run.grafana import generate_artifacts_table_grafana_redis
38
- from redisbench_admin.run.modules import redis_modules_check
38
+ from redisbench_admin.run.modules import redis_modules_check, redis_files_check
39
39
  from redisbench_admin.run.redistimeseries import (
40
40
  timeseries_test_sucess_flow,
41
41
  timeseries_test_failure_flow,
@@ -229,6 +229,25 @@ def run_remote_command_logic(args, project_name, project_version):
229
229
  )
230
230
  )
231
231
 
232
+ # Validate Redis server binary and config file paths early
233
+ redis_files_check_status, redis_error_message = redis_files_check(
234
+ args.redis_server_binary, args.redis_conf
235
+ )
236
+ if redis_files_check_status is False:
237
+ if webhook_notifications_active:
238
+ failure_reason = redis_error_message
239
+ generate_failure_notification(
240
+ webhook_client_slack,
241
+ ci_job_name,
242
+ ci_job_link,
243
+ failure_reason,
244
+ tf_github_org,
245
+ tf_github_repo,
246
+ tf_github_branch,
247
+ None,
248
+ )
249
+ exit(1)
250
+
232
251
  common_properties_log(
233
252
  tf_bin_path,
234
253
  tf_github_actor,
@@ -58,7 +58,7 @@ def get_git_root(path):
58
58
  def view_bar_simple(a, b):
59
59
  res = a / int(b) * 100
60
60
  # Only update progress every 5% to reduce output frequency
61
- if not hasattr(view_bar_simple, 'last_percent'):
61
+ if not hasattr(view_bar_simple, "last_percent"):
62
62
  view_bar_simple.last_percent = 0
63
63
 
64
64
  if res - view_bar_simple.last_percent >= 5.0 or res >= 100.0:
@@ -83,12 +83,16 @@ class ProgressCallback:
83
83
  def __call__(self, transferred, total):
84
84
  percent = (transferred / total) * 100
85
85
 
86
- if (percent - self.last_percent >= self.update_threshold or
87
- percent >= 100.0 or
88
- self.last_percent == 0):
86
+ if (
87
+ percent - self.last_percent >= self.update_threshold
88
+ or percent >= 100.0
89
+ or self.last_percent == 0
90
+ ):
89
91
 
90
92
  if self.show_bytes:
91
- sys.stdout.write(f"\r Progress: {percent:.1f}% ({transferred}/{total} bytes)")
93
+ sys.stdout.write(
94
+ f"\r Progress: {percent:.1f}% ({transferred}/{total} bytes)"
95
+ )
92
96
  else:
93
97
  sys.stdout.write(f"\r Complete percent: {percent:.2f}%%")
94
98
  sys.stdout.flush()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: redisbench-admin
3
- Version: 0.11.48
3
+ Version: 0.11.49
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
@@ -184,7 +184,7 @@ redisbench_admin/run/grafana.py,sha256=iMDgMyJKinpZMTD43rZ1IcRGkadjFjCxaB48mYWkv
184
184
  redisbench_admin/run/memtier_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
185
185
  redisbench_admin/run/memtier_benchmark/memtier_benchmark.py,sha256=wTd2olovvFBZ98mOSr6DM5BJsdaiuPteEZzBqeSgbkE,4246
186
186
  redisbench_admin/run/metrics.py,sha256=8EQdcZbCiFB_kIR1WtUQNOPV8y74bZ8Dj51Cv0aR4nk,7556
187
- redisbench_admin/run/modules.py,sha256=9To85oDw2tmUNmTDxOgvKls_46oZRcd2cCt6xNjIWiA,1691
187
+ redisbench_admin/run/modules.py,sha256=ZMV8IKJAzkSqxIk8vDQq-sOYn2fE1Que6w7I9D4P9xQ,4773
188
188
  redisbench_admin/run/redis_benchmark/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
189
189
  redisbench_admin/run/redis_benchmark/redis_benchmark.py,sha256=e-Az2uTlt3z2W4uzlUsdxeT8GITpxpGb-Mjb6JxrSWc,6848
190
190
  redisbench_admin/run/redisgraph_benchmark_go/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
@@ -220,7 +220,7 @@ redisbench_admin/run_remote/remote_db.py,sha256=VNsJmJf7803gsCd_lhwCb37V-xd_mC25
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=4IvKwjWRV0vubC-S388_m6W9oy-OtmbApzode7tp1Dw,76602
223
+ redisbench_admin/run_remote/run_remote.py,sha256=c5utaihKGY42nBTPFraIkW0yYRDHzf1LxsBgCJfNJP4,77264
224
224
  redisbench_admin/run_remote/standalone.py,sha256=dEidNJIprjRiFQqAAM-drYsks2ZZLjRKLs0Y4bfKe-w,33338
225
225
  redisbench_admin/run_remote/terraform.py,sha256=vV3eWXNwj7vsnFNqUgCir5ueZS4VYopEyzWiTtoSq0Q,4018
226
226
  redisbench_admin/utils/__init__.py,sha256=DtBXRp0Q01XgCFmY-1OIePMyyYihVNAjZ1Y8zwqSDN0,101
@@ -228,15 +228,15 @@ redisbench_admin/utils/benchmark_config.py,sha256=71n2gm8ObeCBzNWQ0MLO7zRjIvmIzg
228
228
  redisbench_admin/utils/local.py,sha256=zUvyVI9LZMT3qyxs1pO3mXL6Bt_1z9EZUGppaRcWNRA,3890
229
229
  redisbench_admin/utils/redisearch.py,sha256=lchUEzpt0zB1rHwlDlw9LLifAnxFWcLP-PePw7TjL-0,1602
230
230
  redisbench_admin/utils/redisgraph_benchmark_go.py,sha256=os7EJt6kBxsFJLKkSoANbjMT7-cEq4-Ns-49alk2Tf8,2048
231
- redisbench_admin/utils/remote.py,sha256=-spZFP9-sChXd-EjBU_OeDuJsFq4LpyXiDhP--070mM,43487
231
+ redisbench_admin/utils/remote.py,sha256=ewjSUX8xsQYolzVPXfaA7y1PWGWL7emwG4W9jspn14Y,43547
232
232
  redisbench_admin/utils/results.py,sha256=uKk3uNJ--bSXlUj_HGQ2OaV6MVqmXJVM8xTzFV6EOw4,3267
233
233
  redisbench_admin/utils/ssh.py,sha256=QW4AwlocMHJt05QMdN_4f8WeDmxiEwR80ny8VBThq6k,6533
234
234
  redisbench_admin/utils/utils.py,sha256=XVSvo1_DdcYwk2jOxL3VPVPbnDnhGYt8ieYfANo6rTo,15085
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.48.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
- redisbench_admin-0.11.48.dist-info/METADATA,sha256=8wFuMRH-WXIhRr6BxIq3-IwpieN60sShDuKt6OagSR0,5596
240
- redisbench_admin-0.11.48.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
- redisbench_admin-0.11.48.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
- redisbench_admin-0.11.48.dist-info/RECORD,,
238
+ redisbench_admin-0.11.49.dist-info/LICENSE,sha256=AAMtfs82zOOvmG68vILivm6lxi2rcOlGObmA8jzxQvw,10768
239
+ redisbench_admin-0.11.49.dist-info/METADATA,sha256=MvW4DsC1oIANjXhnvv5FF6O0HCL_POECirbx8tRDM14,5596
240
+ redisbench_admin-0.11.49.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
241
+ redisbench_admin-0.11.49.dist-info/entry_points.txt,sha256=UUawXk_AS-PlieKJ1QxPQXGsRLb6OW_F0MtmA1W0KE8,113
242
+ redisbench_admin-0.11.49.dist-info/RECORD,,