Skip to content

Commit

Permalink
Fetch dynamic CNV/ODF versions for must gather (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebattat authored Oct 7, 2024
1 parent 7248a94 commit 0d81bdb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 6 additions & 2 deletions benchmark_runner/common/oc/oc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,9 @@ 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])
if not odf_version:
raise ValueError("ODF version must be provided")

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

Expand Down Expand Up @@ -1415,7 +1417,9 @@ 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])
if not cnv_version:
raise ValueError("CNV version must be provided")

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 @@ -209,8 +209,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 0d81bdb

Please sign in to comment.