Skip to content

Trim response to just needed body#7205

Closed
nananosirova wants to merge 1 commit intoopendatahub-io:v3.3.0-fixesfrom
nananosirova:trim-response-odh-3.3
Closed

Trim response to just needed body#7205
nananosirova wants to merge 1 commit intoopendatahub-io:v3.3.0-fixesfrom
nananosirova:trim-response-odh-3.3

Conversation

@nananosirova
Copy link
Copy Markdown
Contributor

@nananosirova nananosirova commented Apr 13, 2026

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

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

It returns only the body.

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>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 13, 2026

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: 7d94fec6-6e0f-437c-9b25-57cc3677ce16

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
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented Apr 13, 2026

[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 christianvogt 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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.25%. Comparing base (b3e0bb2) to head (67825d7).
⚠️ Report is 2 commits behind head on v3.3.0-fixes.

Additional details and impacted files

Impacted file tree graph

@@               Coverage Diff                @@
##           v3.3.0-fixes    #7205      +/-   ##
================================================
- Coverage         64.25%   64.25%   -0.01%     
================================================
  Files              2418     2418              
  Lines             72025    72025              
  Branches          18085    18085              
================================================
- Hits              46283    46280       -3     
- Misses            25742    25745       +3     

see 14 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 b3e0bb2...67825d7. 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.

1 participant