Skip to content

Commit

Permalink
fix: display the relevant number in the error message (#1835)
Browse files Browse the repository at this point in the history
## Description:
Tiny bug when running `kurtosis clean -a`: if your APIC has more than
one service running in it it will print an error, but print the number
of services it found incorrectly:

```
 --- at ~/kurtosis/kurtosis/container-engine-lib/lib/backend_impls/kubernetes/kubernetes_kurtosis_backend/kubernetes_kurtosis_backend_api_container_functions.go:678 (KubernetesKurtosisBackend.getMatchingApiContainerObjectsAndKubernetesResources) ---
Caused by: Expected at most one API container service in namespace 'kt-crumbling-sky' for enclave with ID '39d662eb74784368a78b35ce9a4f09bf' but found '1'
```

Why did I have more than 1 in this case? I'd added one directly via
`kubectl expose` so the only bug here is the error display.


## Is this change user facing?
YES: only in the weeds of error message logging
<!-- If yes, please add the "user facing" label to the PR -->
<!-- If yes, don't forget to include docs changes where relevant -->

## References (if applicable):
<!-- Add relevant Github Issues, Discord threads, or other helpful
information. -->

Co-authored-by: Omar <Omar>
  • Loading branch information
omar711 authored Nov 21, 2023
1 parent 7e7406d commit a8c24bc
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ func (backend *KubernetesKurtosisBackend) getMatchingApiContainerKubernetesResou
"but found '%v'",
namespaceName,
enclaveIdStr,
len(services),
len(servicesForEnclaveId),
)
}
service := servicesForEnclaveId[0]
Expand Down

0 comments on commit a8c24bc

Please sign in to comment.