kr8s-org / kr8s

A batteries-included Python client library for Kubernetes that feels familiar for folks who already know how to use kubectl
https://kr8s.org
BSD 3-Clause "New" or "Revised" License
799 stars 43 forks source link

Improve NotFound exception message to include namespace #479

Closed jacobtomlinson closed 1 month ago

jacobtomlinson commented 1 month ago

While investigating https://github.com/dask/dask-kubernetes/issues/903 it felt useful to know which namespace kr8s is looking in for a resource, but the NotFound exception doesn't show this. This PR improves the error message to include the namespace.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 50.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.08%. Comparing base (87063fc) to head (4c63e24). Report is 102 commits behind head on main.

Files Patch % Lines
kr8s/_objects.py 50.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #479 +/- ## ========================================== + Coverage 94.61% 95.08% +0.46% ========================================== Files 29 30 +1 Lines 3141 3889 +748 ========================================== + Hits 2972 3698 +726 - Misses 169 191 +22 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.