Skip to content

Commit 85f5466

Browse files
committed
Apply review comments
1 parent 5b3dde1 commit 85f5466

File tree

2 files changed

+6
-20
lines changed

2 files changed

+6
-20
lines changed

src/kube_galaxy/pkg/components/_base.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
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
2929
from kube_galaxy.pkg.utils.logging import info
3030
from 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

src/kube_galaxy/pkg/testing/spread.py

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff 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-
178161
def _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

0 commit comments

Comments
 (0)