File tree Expand file tree Collapse file tree 2 files changed +6
-20
lines changed
Expand file tree Collapse file tree 2 files changed +6
-20
lines changed Original file line number Diff line number Diff line change 2525 format_component_pattern ,
2626 install_binary ,
2727)
28- from kube_galaxy .pkg .utils .errors import ComponentError
28+ from kube_galaxy .pkg .utils .errors import ClusterError , ComponentError
2929from kube_galaxy .pkg .utils .logging import info
3030from kube_galaxy .pkg .utils .shell import run
3131
@@ -244,7 +244,10 @@ def bootstrap_hook(self) -> None:
244244 raise ComponentError (
245245 f"{ comp_name } manifest not downloaded. Run download hook first."
246246 )
247- apply_manifest (self .manifest_path )
247+ try :
248+ apply_manifest (self .manifest_path )
249+ except ClusterError as e :
250+ raise ComponentError (f"Failed to apply manifest for { comp_name } " ) from e
248251
249252 pass
250253
Original file line number Diff line number Diff line change @@ -158,23 +158,6 @@ def _create_test_namespace(component_name: str) -> str:
158158 raise
159159
160160
161- def _cleanup_test_namespace (namespace : str , timeout : int = 60 ) -> None :
162- """
163- Delete test namespace and wait for termination.
164-
165- Args:
166- namespace: Namespace to delete
167- timeout: Maximum seconds to wait for deletion
168-
169- Raises:
170- ClusterError: If namespace deletion fails
171- """
172- try :
173- delete_namespace (namespace , timeout )
174- except ClusterError :
175- raise
176-
177-
178161def _generate_orchestration_spread_yaml (
179162 components : list [ComponentConfig ], kubeconfig : Path
180163) -> list [str ]:
@@ -390,7 +373,7 @@ def _run_component_tests(
390373 # Step 4: Cleanup namespace (always executed)
391374 if namespace :
392375 try :
393- _cleanup_test_namespace (namespace )
376+ delete_namespace (namespace )
394377 except Exception as cleanup_exc :
395378 warning (f" Namespace cleanup failed: { cleanup_exc } " )
396379
You can’t perform that action at this time.
0 commit comments