Skip to content

wip: [model server] ISVC and data connection with the same name#261

Closed
rnetser wants to merge 2 commits intoopendatahub-io:mainfrom
rnetser:same-name
Closed

wip: [model server] ISVC and data connection with the same name#261
rnetser wants to merge 2 commits intoopendatahub-io:mainfrom
rnetser:same-name

Conversation

@rnetser
Copy link
Copy Markdown
Contributor

@rnetser rnetser commented Apr 21, 2025

will verify https://issues.redhat.com/browse/RHOAIENG-23607 once fixed

Summary by CodeRabbit

  • New Features
    • Introduced a new test to verify serverless model serving when multiple resources share the same name.
  • Tests
    • Enhanced test fixtures to support dynamic secret names and serverless inference service configuration.
    • Added comprehensive testing for serverless inference services with overlapping resource names.

@rnetser rnetser requested a review from a team as a code owner April 21, 2025 08:25
@rnetser
Copy link
Copy Markdown
Contributor Author

rnetser commented Apr 21, 2025

/wip

@github-actions
Copy link
Copy Markdown

The following are automatically added/executed:

  • PR size label.
  • Run pre-commit
  • Run tox
  • Add PR author as the PR assignee

Available user actions:

  • To mark a PR as WIP, add /wip in a comment. To remove it from the PR comment /wip cancel to the PR.
  • To block merging of a PR, add /hold in a comment. To un-block merging of PR comment /hold cancel.
  • To mark a PR as approved, add /lgtm in a comment. To remove, add /lgtm cancel.
    lgtm label removed on each new commit push.
  • To mark PR as verified comment /verified to the PR, to un-verify comment /verified cancel to the PR.
    verified label removed on each new commit push.
  • To Cherry-pick a merged PR /cherry-pick <target_branch_name> to the PR. If <target_branch_name> is valid,
    and the current PR is merged, a cherry-picked PR would be created and linked to the current PR.
Supported labels

{'/hold', '/lgtm', '/wip', '/verified'}

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 21, 2025

Walkthrough

The changes introduce a new serverless model serving test that checks system behavior when multiple resources share the same name. Supporting fixtures are updated and added to allow dynamic parameterization of secret names and inference service configuration, enabling the new test scenario for serverless deployments using OpenVINO IR models.

Changes

File(s) Change Summary
tests/model_serving/model_server/conftest.py Modified ci_endpoint_s3_secret fixture to accept dynamic secret names via the request parameter.
tests/model_serving/model_server/serverless/conftest.py Added ovms_kserve_serverless_inference_service fixture for parameterized serverless inference service creation.
tests/model_serving/model_server/serverless/test_resources_with_same_name.py Introduced new test module and test class for validating serverless serving with overlapping resource names.

Sequence Diagram(s)

sequenceDiagram
    participant Test as Test Case
    participant Fixture as ovms_kserve_serverless_inference_service
    participant Helper as create_isvc
    participant Runtime as ServingRuntime
    participant Secret as ci_endpoint_s3_secret

    Test->>Fixture: Request inference service (with resource names)
    Fixture->>Secret: Obtain S3 secret (with dynamic name)
    Fixture->>Runtime: Use serving runtime info
    Fixture->>Helper: Create InferenceService (serverless, OpenVINO IR)
    Helper->>Fixture: Return InferenceService
    Fixture-->>Test: Yield InferenceService
    Test->>Fixture: Query inference service and validate response
Loading

Suggested labels

size/l

Suggested reviewers

  • mwaykole
  • dbasunag

Poem

A test hops in where names all match,
Serverless bunnies, a clever batch!
Dynamic secrets, runtime in tow,
OpenVINO models ready to go.
With fixtures that flex and tests that delight,
The code now ensures all names work right!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between defdcca and dc4b4e9.

📒 Files selected for processing (3)
  • tests/model_serving/model_server/conftest.py (2 hunks)
  • tests/model_serving/model_server/serverless/conftest.py (2 hunks)
  • tests/model_serving/model_server/serverless/test_resources_with_same_name.py (1 hunks)
🧰 Additional context used
🪛 Pylint (3.3.7)
tests/model_serving/model_server/serverless/test_resources_with_same_name.py

[refactor] 43-43: Too few public methods (1/2)

(R0903)

🔇 Additional comments (5)
tests/model_serving/model_server/conftest.py (1)

312-329: LGTM! Well-implemented fixture parameterization.

The changes correctly enable dynamic secret naming while maintaining backward compatibility. The conditional logic properly handles cases where request parameters are not provided, defaulting to the original behavior.

tests/model_serving/model_server/serverless/test_resources_with_same_name.py (2)

1-53: LGTM! Well-structured test for the name collision scenario.

The test correctly implements the scenario described in the PR objectives, where multiple resources (namespace, secret, runtime, and inference service) share the same name. The parameterization structure is appropriate and the test logic properly verifies that inference works despite the name collision.


43-43: Static analysis false positive - ignore the "too few public methods" warning.

The pylint warning about having too few public methods is a false positive for test classes. Test classes don't need multiple public methods and often contain just one test method per class when using parameterized fixtures.

tests/model_serving/model_server/serverless/conftest.py (2)

14-14: LGTM! Correct import addition.

The ModelAndFormat import is appropriately added to support the new fixture implementation.


104-124: I couldn’t find any matches with the previous pattern. Let’s list all create_isvc invocations to see how they handle namespaces:

#!/bin/bash
# List all usages of create_isvc and show context around each
rg -A3 -B3 "create_isvc" --type py
✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions Bot removed the Stale label Jun 22, 2025
@github-actions github-actions Bot added the Stale label Aug 22, 2025
@github-actions github-actions Bot closed this Aug 30, 2025
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