Skip to content

Commit

Permalink
Fetch dynamic CNV/ODF versions for must gather
Browse files Browse the repository at this point in the history
  • Loading branch information
ebattat committed Sep 30, 2024
1 parent 5fe07ce commit 4f0138a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions benchmark_runner/common/oc/oc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ def generate_odf_must_gather(self, destination_path: str = '/tmp', odf_version:
:raises: RuntimeError if the command fails.
"""
if not odf_version:
raise ValueError("ODF version must be provided")
odf_version = ".".join(self.get_odf_version().split(".")[:2])

folder_path = os.path.join(destination_path, f"odf-must-gather-rhel9-v{odf_version}")

Expand Down Expand Up @@ -1415,7 +1415,7 @@ def generate_cnv_must_gather(self, destination_path: str = '/tmp', cnv_version:
:raises: RuntimeError if the command fails.
"""
if not cnv_version:
raise ValueError("CNV version must be provided")
cnv_version = ".".join(self.get_cnv_version().split(".")[:2])

folder_path = os.path.join(destination_path, f"cnv-must-gather-rhel9-v{cnv_version}")

Expand Down
4 changes: 2 additions & 2 deletions benchmark_runner/workloads/bootstorm_vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ def _verify_vm_ssh(self):
if self._wait_for_upgrade_version:
logger.info(f'Cluster is upgraded to: {self._wait_for_upgrade_version}')
if failure:
self._oc.generate_cnv_must_gather(destination_path=self._run_artifacts_path, cnv_version=self._cnv_version)
self._oc.generate_odf_must_gather(destination_path=self._run_artifacts_path, odf_version=self._odf_version)
self._oc.generate_cnv_must_gather(destination_path=self._run_artifacts_path)
self._oc.generate_odf_must_gather(destination_path=self._run_artifacts_path)
# google drive
if self._google_drive_shared_drive_id:
self.upload_run_artifacts_to_google_drive()
Expand Down
2 changes: 0 additions & 2 deletions benchmark_runner/workloads/workloads_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def __init__(self):
self._redis = self._environment_variables_dict.get('redis', '')
self._threads_limit = self._environment_variables_dict.get('threads_limit', '')
self._kata_thread_pool_size = self._environment_variables_dict.get('kata_thread_pool_size', '')
self._cnv_version = self._environment_variables_dict.get('cnv_version', '')
self._odf_version = self._environment_variables_dict.get('odf_version', '')
if self._scale:
self._scale = int(self._scale)
self._scale_nodes = self._environment_variables_dict.get('scale_nodes', '')
Expand Down

0 comments on commit 4f0138a

Please sign in to comment.