Skip to content

Commit

Permalink
Print if 404 else raise
Browse files Browse the repository at this point in the history
  • Loading branch information
smokestacklightnin committed Nov 21, 2024
1 parent d7520ed commit 06960b2
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/_nebari/upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,9 @@ def _version_specific_upgrade(
name=crd,
)
except kubernetes.client.exceptions.ApiException as e:
if e.status != 404:
if e.status == 404:
rich.print(f"CRD [yellow]{crd}[/yellow] not found. Ignoring.")
else:
raise e

namespace = config.get("namespace", "default")
Expand All @@ -689,7 +691,11 @@ def _version_specific_upgrade(
namespace,
)
except kubernetes.client.exceptions.ApiException as e:
if e.status != 404:
if e.status == 404:
rich.print(
f"Service account [yellow]{sa}[/yellow] not found. Ignoring."
)
else:
raise e
else:
kubectl_delete_argo_crds_cmd = " ".join(
Expand Down

0 comments on commit 06960b2

Please sign in to comment.