Migrates private endpoint tests to use OVMS runtime#1194
Migrates private endpoint tests to use OVMS runtime#1194mwaykole merged 5 commits intoopendatahub-io:mainfrom
Conversation
Signed-off-by: Milind waykole <mwaykole@redhat.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughMigrates KServe private-endpoint tests from CAIKIT/TGIS to OVMS (OpenVINO Model Server) using RAW_DEPLOYMENT; updates fixtures, test cases, and utilities to use OVMS health endpoint (v2/health/ready), curl pod helpers, and port-aware URL parsing. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
tests/model_serving/model_server/kserve/private_endpoint/utils.py (1)
47-47: Potential double-slash in URL ifendpointstarts with/.If
endpointis passed as/v2/health/readyinstead ofv2/health/ready, the URL becomeshttp://host:port//v2/health/ready. Consider stripping leading slashes:Proposed fix
- url = f"{parsed.geturl()}/{endpoint}" + url = f"{parsed.geturl()}/{endpoint.lstrip('/')}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/model_serving/model_server/kserve/private_endpoint/utils.py` at line 47, The URL concatenation can produce a double slash when endpoint starts with a leading slash; update the construction of url in utils.py to normalize parts (e.g., ensure parsed.geturl() has no trailing slash and endpoint has no leading slash) before joining—refer to the variables parsed and endpoint and the assignment to url and change the join logic to strip the trailing/leading slashes (or use a safe join like urllib.parse.urljoin) so the resulting url is always well-formed.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tests/model_serving/model_server/kserve/private_endpoint/conftest.py`:
- Line 42: The fixture in conftest.py reads
serving_runtime_from_template.instance.spec.supportedModelFormats[0].name
without validating the list; modify the code to first extract supported_formats
= serving_runtime_from_template.instance.spec.supportedModelFormats, validate
that supported_formats is truthy and non-empty, and then use
supported_formats[0].name, otherwise raise a clear ValueError (or return a
sensible fallback) with a descriptive message so tests that exercise empty
supportedModelFormats do not raise IndexError.
- Line 45: Add the pytest ordering marker to ensure ISVC readiness is verified
before other tests when running in parallel: annotate the test function named
test_deploy_model_state_loaded with `@pytest.mark.order`(1) so that, given
wait_for_predictor_pods=False, the readiness assertion runs first and prevents
curl/other tests from starting before the predictor is confirmed ready; place
the decorator immediately above the test_deploy_model_state_loaded definition in
the same test module.
---
Nitpick comments:
In `@tests/model_serving/model_server/kserve/private_endpoint/utils.py`:
- Line 47: The URL concatenation can produce a double slash when endpoint starts
with a leading slash; update the construction of url in utils.py to normalize
parts (e.g., ensure parsed.geturl() has no trailing slash and endpoint has no
leading slash) before joining—refer to the variables parsed and endpoint and the
assignment to url and change the join logic to strip the trailing/leading
slashes (or use a safe join like urllib.parse.urljoin) so the resulting url is
always well-formed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 338d406c-7110-4a0a-9e3d-153c7c79264f
📒 Files selected for processing (3)
tests/model_serving/model_server/kserve/private_endpoint/conftest.pytests/model_serving/model_server/kserve/private_endpoint/test_kserve_private_endpoint.pytests/model_serving/model_server/kserve/private_endpoint/utils.py
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/wip', '/verified', '/hold', '/build-push-pr-image', '/lgtm', '/cherry-pick'} |
|
Status of building tag latest: success. |
Summary
instead of Caikit-TGIS runtime which is no longer available on test clusters
to verify same-namespace and cross-namespace internal endpoint connectivity
/v2/health/ready) instead of Caikit's/healthSummary by CodeRabbit
Tests
Refactor