RHOAIENG-5067: Model Serving Metrics: Use real namespace name instead of project display name in queries #2657
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes https://issues.redhat.com/browse/RHOAIENG-5067 (Critical)
Description
As identified by @christianvogt, the
ProjectServerMetricsWrapper
was passing the current project's display name intoModelServingMetricsProvider
instead of the namespace name. This was making its way into the Prometheus query strings in the Model Serving Metrics page, causing 400 Bad Request errors.How Has This Been Tested?
Created a model server in a project whose display name is different from its underlying namespace (e.g. it has capital letters or spaces in it). Tried to view the model server metrics (Projects -> [project] -> Models tab -> Kebab menu -> View model server metrics) and saw that before this change I got 400 errors in the dev tools Network tab and the loading spinners on the page never resolved. After this change the queries resolve correctly.
I also sent some requests to a deployed model with curl and observed that the metrics appear correctly on the page.
Test Impact
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main