Skip to content

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

Closed
nananosirova wants to merge 1 commit into
opendatahub-io:v2.38.0-fixesfrom
nananosirova:trim-response-2.25
Closed

Trim response to just needed body (#7190)#7209
nananosirova wants to merge 1 commit into
opendatahub-io:v2.38.0-fixesfrom
nananosirova:trim-response-2.25

Conversation

@nananosirova

@nananosirova nananosirova commented Apr 13, 2026

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: ca7ca2ce-b622-4d6b-8a6d-c22459950a86

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 NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign bobbravo2 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

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.

1 participant