Skip to content

Trim response to just needed body (#7190) - #7212

Merged
openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:stable-2.xfrom
nananosirova:trim-response-2.25
Apr 13, 2026
Merged

Trim response to just needed body (#7190)#7212
openshift-merge-bot[bot] merged 1 commit into
opendatahub-io:stable-2.xfrom
nananosirova:trim-response-2.25

Conversation

@nananosirova

Copy link
Copy Markdown
Contributor

https://redhat.atlassian.net/browse/RHOAIENG-57752

Description

Trim the k8 api response in NIM serving route to return only the body field instead of the whole response object.

How Has This Been Tested?

While logged into the dashboard, navigate to <base-url>/api/nim-serving/apiKeySecret.
With no NIM Account CR on the cluster, the endpoint returns 404 response object.
After applying a test Account CR and linked Secret:

apiVersion: nim.opendatahub.io/v1
kind: Account
metadata:
  name: example
  namespace: redhat-ods-applications
spec:
  apiKeySecret:
    name: foo-bar
---
apiVersion: v1
kind: Secret
metadata:
  name: foo-bar
  namespace: redhat-ods-applications
type: Opaque
data:
  foo: YmFy

Going back to the endpoint, it should return the response body only.

Test Impact

Request review criteria:

Self checklist (all need to be checked):

  • The developer has manually tested the changes and verified that the changes work
  • Testing instructions have been added in the PR body (for PRs involving changes that are not immediately obvious).
  • The developer has added tests or explained why testing cannot be added (unit or cypress tests for related changes)
  • The code follows our Best Practices (React coding standards, PatternFly usage, performance considerations)

If you have UI changes:

  • Included any necessary screenshots or gifs if it was a UI change.
  • Included tags to the UX team if it was a UI/UX change.

After the PR is posted & before it merges:

  • The developer has tested their solution on a cluster by using the image produced by the PR to main

Signed-off-by: Nana Nosirova <10577112+nananosirova@users.noreply.github.com>
(cherry picked from commit 1044662)
@coderabbitai

coderabbitai Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e1a0f5b0-e340-41b8-a3b7-9497df7f3ea9

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@openshift-ci

openshift-ci Bot commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-bot
openshift-merge-bot Bot merged commit dff9bea into opendatahub-io:stable-2.x Apr 13, 2026
70 of 74 checks passed
@codecov

codecov Bot commented Apr 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 67.91%. Comparing base (1f9f805) to head (edecbf4).
⚠️ Report is 21 commits behind head on stable-2.x.

Files with missing lines Patch % Lines
backend/src/routes/api/nim-serving/index.ts 0.00% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff               @@
##           stable-2.x    #7212      +/-   ##
==============================================
+ Coverage       67.87%   67.91%   +0.04%     
==============================================
  Files            2235     2238       +3     
  Lines           50768    50847      +79     
  Branches        14222    14252      +30     
==============================================
+ Hits            34461    34535      +74     
- Misses          16307    16312       +5     
Files with missing lines Coverage Δ
backend/src/routes/api/nim-serving/index.ts 0.00% <0.00%> (ø)

... and 48 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1f9f805...edecbf4. Read the comment docs.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants