benchmark-runner 1.0.829__py3-none-any.whl → 1.0.831__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.

Potentially problematic release.


This version of benchmark-runner might be problematic. Click here for more details.

@@ -89,8 +89,9 @@ class OC(SSH):
89
89
  @param upgrade_channel: upgrade channel candidate or stable, default stable
90
90
  @return:
91
91
  """
92
+ # default stable
93
+ upgrade_channel = upgrade_channel or 'stable'
92
94
  ocp_channel = '.'.join(upgrade_ocp_version.split('.')[:2])
93
-
94
95
  # see: https://access.redhat.com/articles/7031404
95
96
  if ocp_channel == "4.16":
96
97
  patch_command = f"{self._cli} -n openshift-config patch cm admin-acks --patch '{{\"data\":{{\"ack-4.15-kube-1.29-api-removals-in-4.16\":\"true\"}}}}' --type=merge"
@@ -101,38 +102,37 @@ class OC(SSH):
101
102
 
102
103
  def upgrade_in_progress(self):
103
104
  """
104
- This method returns True if an upgrade is in progress and False otherwise, with retries on transient failures.
105
- @return: bool
105
+ Checks whether an OpenShift upgrade is in progress by inspecting the 'Progressing' status condition.
106
+ Retries on transient failures.
107
+
108
+ @return: bool - True if upgrade is in progress, False otherwise.
106
109
  """
107
110
  for i in range(1, self.RETRIES + 1):
108
111
  try:
109
- status = self.run(
110
- f"{self._cli} get clusterversion version "
111
- "-o jsonpath='{{.status.conditions[?(@.type==\"Progressing\")].status}}'"
112
- ).strip()
112
+ status = self.run(f"{self._cli} get clusterversion version -o jsonpath='{{.status.conditions[?(@.type==\"Progressing\")].status}}'").strip()
113
113
  return status == 'True'
114
114
  except Exception as e:
115
115
  logger.warning(f"[upgrade_in_progress] attempt {i}/{self.RETRIES} failed: {e}")
116
116
  time.sleep(self.DELAY)
117
- # Final attempt (will bubble if it fails)
118
- return self.run(
119
- f"{self._cli} get clusterversion version "
120
- "-o jsonpath='{{.status.conditions[?(@.type==\"Progressing\")].status}}'"
121
- ).strip() == 'True'
117
+
118
+ return False
122
119
 
123
120
  @logger_time_stamp
124
121
  def wait_for_ocp_upgrade_start(self, upgrade_version: str, timeout: int = SHORT_TIMEOUT):
125
122
  """
126
- This method waits for ocp upgrade to start
127
- :param upgrade_version:
128
- :param timeout:
129
- :return:
123
+ This method waits for the OCP upgrade to start.
124
+ :param upgrade_version: The target OCP version.
125
+ :param timeout: Timeout in seconds (waits indefinitely if <= 0).
126
+ :return: True if upgrade starts within timeout, else raises UpgradeNotStartTimeout.
130
127
  """
131
128
  current_wait_time = 0
132
- while timeout <= 0 or current_wait_time <= timeout and not self.upgrade_in_progress():
133
- # sleep for x seconds
129
+ while timeout <= 0 or current_wait_time <= timeout:
130
+ if self.upgrade_in_progress():
131
+ return True
134
132
  time.sleep(OC.SLEEP_TIME)
135
133
  current_wait_time += OC.SLEEP_TIME
134
+
135
+ # Final check after timeout
136
136
  if self.upgrade_in_progress():
137
137
  return True
138
138
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: benchmark-runner
3
- Version: 1.0.829
3
+ Version: 1.0.831
4
4
  Summary: Benchmark Runner Tool
5
5
  Home-page: https://github.com/redhat-performance/benchmark-runner
6
6
  Author: Red Hat
@@ -47,7 +47,7 @@ benchmark_runner/common/logger/init_logger.py,sha256=ERa-gNqrl2pZybj7v3csvmao7Mv
47
47
  benchmark_runner/common/logger/logger_exceptions.py,sha256=rivdlRm_jIsKQ53rP_-HX8emdtOmQNO4JuIkg8fnBoc,454
48
48
  benchmark_runner/common/logger/logger_time_stamp.py,sha256=2JgugN9LpXF4Ijx0wPRzz3DAGJB8eJpM5g1qPvbWbV8,1479
49
49
  benchmark_runner/common/oc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- benchmark_runner/common/oc/oc.py,sha256=uY4kH2ootoaDUf8JSvWzQI2uAvpgVXNYSBSrHLwkX1E,73524
50
+ benchmark_runner/common/oc/oc.py,sha256=m6O8H-crGSCNaBNnHbVs4svYA9oi-OJ3TuC4BdTYM6g,73592
51
51
  benchmark_runner/common/oc/oc_exceptions.py,sha256=XfKUzeK3Ors_Y2csQEoGqrlsZlYvq6OXLkFh9s_mQRM,6311
52
52
  benchmark_runner/common/oc/singleton_oc_login.py,sha256=OISe7GxN-povQBk1GYVwkdcuEvIbDQP5QImYbNvhX5Y,2395
53
53
  benchmark_runner/common/ocp_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -174,8 +174,8 @@ benchmark_runner/workloads/windows_vm.py,sha256=qFVD3qBFMnVpYXnrpam-7H5-0Yzvx6qt
174
174
  benchmark_runner/workloads/workloads.py,sha256=F9fnk4h715tq7ANSCbDH0jktB8fpr_u3YG61Kdi5_os,1422
175
175
  benchmark_runner/workloads/workloads_exceptions.py,sha256=u7VII95iPRF_YhfpGH1U1RmgiIYESMOtbSF1dz7_ToE,1858
176
176
  benchmark_runner/workloads/workloads_operations.py,sha256=8utD-uU_MNZn5JOC2r5OVq5BfCPkxlUvP3xlUP9oIGk,27160
177
- benchmark_runner-1.0.829.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
178
- benchmark_runner-1.0.829.dist-info/METADATA,sha256=hh9R_sn79bTAF1XymlclWHhyyJyc83kPwPVzoy_ASI8,11520
179
- benchmark_runner-1.0.829.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
180
- benchmark_runner-1.0.829.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
181
- benchmark_runner-1.0.829.dist-info/RECORD,,
177
+ benchmark_runner-1.0.831.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
178
+ benchmark_runner-1.0.831.dist-info/METADATA,sha256=QMxm8DwXIVLqaZHIKcIdyD0ftG672hFL2rOJ5VmFfG4,11520
179
+ benchmark_runner-1.0.831.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
180
+ benchmark_runner-1.0.831.dist-info/top_level.txt,sha256=MP7UbTCzu59D53uKCZl5VsQeM_vheyMc7FmryczJQbk,17
181
+ benchmark_runner-1.0.831.dist-info/RECORD,,