Conversation
Signed-off-by: Milind waykole <mwaykole@redhat.com>
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/verified', '/cherry-pick', '/build-push-pr-image', '/lgtm', '/wip', '/hold'} |
📝 WalkthroughWalkthroughThis pull request adds descriptive docstrings to 24 test classes and several test methods across the KServe test suite. All changes are documentation-only; no functional logic, assertions, control flow, or test behavior was modified. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✏️ 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: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
tests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_replicas_update.py (1)
55-55:⚠️ Potential issue | 🟡 MinorFix malformed assertion error message.
The assertion message is missing the
fprefix, so it will print the literal string{pod.name for pod in isvc_pods}instead of evaluating the set comprehension when the assertion fails.🐛 Proposed fix
- assert len(isvc_pods) == 2, "Expected 2 inference pods, existing pods: {pod.name for pod in isvc_pods}" + assert len(isvc_pods) == 2, f"Expected 2 inference pods, existing pods: {[pod.name for pod in isvc_pods]}"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_replicas_update.py` at line 55, The assertion message is a normal string so the set comprehension is not evaluated; update the assertion in the test (the line asserting len(isvc_pods) == 2) to use an f-string (or format) so the expression {pod.name for pod in isvc_pods} is interpolated into the message (e.g., add the leading f to the string) to show the actual pod names when the assertion fails.
🤖 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/inference_service_lifecycle/test_isvc_replicas_update.py`:
- Around line 42-50: The docstring and test name claim an increase operation but
the code only verifies initial 2 replicas then scales down to 1; update the
documentation and test name to match behavior: change the module/class docstring
to describe "deploy with 2 min-replicas, verify 2 pods, run inference, patch
ISVC to scale down to 1 and verify 1 pod and inference" and rename the test
function test_raw_increase_isvc_replicas to test_raw_decrease_isvc_replicas (or
similar) so the name reflects the actual assertion; locate references to
TestRawISVCReplicasUpdates and test_raw_increase_isvc_replicas in the file to
update them consistently.
---
Outside diff comments:
In
`@tests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_replicas_update.py`:
- Line 55: The assertion message is a normal string so the set comprehension is
not evaluated; update the assertion in the test (the line asserting
len(isvc_pods) == 2) to use an f-string (or format) so the expression {pod.name
for pod in isvc_pods} is interpolated into the message (e.g., add the leading f
to the string) to show the actual pod names when the assertion fails.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 8291715a-d1d0-40e3-9aec-38ec150727f9
📒 Files selected for processing (21)
tests/model_serving/model_server/kserve/authentication/test_kserve_token_authentication_raw.pytests/model_serving/model_server/kserve/authentication/test_non_admin_users.pytests/model_serving/model_server/kserve/inference_graph/test_inference_graph_raw.pytests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_env_vars_updates.pytests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_pull_secret_updates.pytests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_replicas_update.pytests/model_serving/model_server/kserve/inference_service_lifecycle/test_raw_stop_resume_model.pytests/model_serving/model_server/kserve/ingress/test_route_reconciliation.pytests/model_serving/model_server/kserve/ingress/test_route_visibility.pytests/model_serving/model_server/kserve/multi_node/test_nvidia_multi_node.pytests/model_serving/model_server/kserve/multi_node/test_oci_multi_node.pytests/model_serving/model_server/kserve/observability/test_model_metrics.pytests/model_serving/model_server/kserve/observability/test_non_admin_users.pytests/model_serving/model_server/kserve/platform/dsc_deployment_mode/test_kserve_dsc_default_deployment_mode.pytests/model_serving/model_server/kserve/platform/test_custom_resources.pytests/model_serving/model_server/kserve/platform/test_model_serving_components.pytests/model_serving/model_server/kserve/storage/oci/test_oci_image.pytests/model_serving/model_server/kserve/storage/pvc/test_kserve_pvc_rwx.pytests/model_serving/model_server/kserve/storage/pvc/test_kserve_pvc_write_access.pytests/model_serving/model_server/kserve/storage/s3/test_s3_raw_deployment.pytests/model_serving/model_server/upgrade/test_upgrade.py
| """Validate scaling replica count up and down on a KServe raw deployment ISVC. | ||
|
|
||
| Steps: | ||
| 1. Deploy an OVMS inference service with 2 min-replicas and 4 max-replicas. | ||
| 2. Verify that 2 predictor pods are running after deployment. | ||
| 3. Run inference to confirm the model responds correctly with multiple replicas. | ||
| 4. Patch the ISVC to scale down to 1 replica and verify only 1 pod remains. | ||
| 5. Run inference again to confirm the model responds correctly after scale-down. | ||
| """ |
There was a problem hiding this comment.
Docstring inaccurately describes the test flow.
The docstring implies scaling up (2→4) and down (4→1), but the tests only verify the initial deployment of 2 replicas and then scale down to 1. There's no actual scale-up operation tested. The class is named TestRawISVCReplicasUpdates and the first test is named test_raw_increase_isvc_replicas, but it only asserts the initial replica count rather than testing an increase operation.
📝 Proposed correction
- """Validate scaling replica count up and down on a KServe raw deployment ISVC.
+ """Validate replica scaling behavior on a KServe raw deployment ISVC.
Steps:
1. Deploy an OVMS inference service with 2 min-replicas and 4 max-replicas.
2. Verify that 2 predictor pods are running after deployment.
3. Run inference to confirm the model responds correctly with multiple replicas.
4. Patch the ISVC to scale down to 1 replica and verify only 1 pod remains.
5. Run inference again to confirm the model responds correctly after scale-down.
"""🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In
`@tests/model_serving/model_server/kserve/inference_service_lifecycle/test_isvc_replicas_update.py`
around lines 42 - 50, The docstring and test name claim an increase operation
but the code only verifies initial 2 replicas then scales down to 1; update the
documentation and test name to match behavior: change the module/class docstring
to describe "deploy with 2 min-replicas, verify 2 pods, run inference, patch
ISVC to scale down to 1 and verify 1 pod and inference" and rename the test
function test_raw_increase_isvc_replicas to test_raw_decrease_isvc_replicas (or
similar) so the name reflects the actual assertion; locate references to
TestRawISVCReplicasUpdates and test_raw_increase_isvc_replicas in the file to
update them consistently.
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit
Release Notes