Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
[
pytest.param(
{"default-deployment-mode": KServeDeploymentType.SERVERLESS},
{"name": "dsc-serverless"},
{"name": "test-dsc-serverless"},
RUNTIME_PARAMS,
{
**{"name": f"{ModelFormat.OPENVINO}-{KServeDeploymentType.SERVERLESS.lower()}"},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"http_s3_openvino_model_mesh_inference_service",
[
pytest.param(
{"name": "serverless-model-mesh-openvino", "modelmesh-enabled": True},
{"name": "test-mm-openvino", "modelmesh-enabled": True},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Avoid namespace collision: use distinct names for the two scenarios

Both parameterizations now target the same namespace ("test-mm-openvino"). This can cause cross-test interference or failures under parallel execution (xdist) and may mask bugs due to resource bleed-over between classes.

Recommend keeping standardized prefixes while preserving uniqueness per scenario.

Apply one of these diffs to restore isolation:

Option A (suffix with scenario order):

-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-serverless-first", "modelmesh-enabled": True},
-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-modelmesh-first", "modelmesh-enabled": True},

Option B (simple numeric suffixes):

-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-1", "modelmesh-enabled": True},
-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-2", "modelmesh-enabled": True},

To check for unintended reuse of "test-mm-openvino" across the repo:

Also applies to: 64-64


🏁 Script executed:

#!/bin/bash
rg -n --hidden --glob '!**/.git/**' $'{"name": "test-mm-openvino"\\s*,'

Length of output: 178


🏁 Script executed:

#!/bin/bash
# Search for any occurrences of the literal string "test-mm-openvino" across the repository
rg -n --hidden --glob '!**/.git/**' '"test-mm-openvino"' .

Length of output: 440


Ensure unique namespaces for parallel test scenarios

Both parameterizations in
tests/model_serving/model_server/components/model_mesh_kserve_co_exist/test_model_mesh_kserve_inference_co_exist.py
use the identical namespace "test-mm-openvino" (lines 25 and 64), risking resource collisions under xdist or delayed cleanup. Assign distinct names per scenario to preserve isolation.

Files & locations:

  • Line 25: first scenario
  • Line 64: second scenario

Suggested fix (numeric suffixes):

--- a/tests/model_serving/model_server/components/model_mesh_kserve_co_exist/test_model_mesh_kserve_inference_co_exist.py
@@ -22,7 +22,7 @@ @pytest.mark.parametrize(
-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-1", "modelmesh-enabled": True},
@@ -61,7 +61,7 @@ @pytest.mark.parametrize(
-            {"name": "test-mm-openvino", "modelmesh-enabled": True},
+            {"name": "test-mm-openvino-2", "modelmesh-enabled": True},

This maintains your naming convention while guaranteeing test-level isolation.

🤖 Prompt for AI Agents
In
tests/model_serving/model_server/components/model_mesh_kserve_co_exist/test_model_mesh_kserve_inference_co_exist.py
at lines 25 and 64, the namespace "test-mm-openvino" is used in both
parameterizations, which can cause resource collisions during parallel test
runs. To fix this, rename the namespaces to be unique by adding numeric suffixes
or other distinct identifiers for each scenario, ensuring test isolation and
preventing conflicts.

KSERVE_RUNTIME_PARAMS,
SERVERLESS_ISVC_PARAMS,
MODELMESH_ISVC_PARAMS,
Expand Down Expand Up @@ -61,7 +61,7 @@ def test_model_mesh_openvino_created_after_serverless_in_namespace_rest_inferenc
"ovms_kserve_inference_service, ",
[
pytest.param(
{"name": "model-mesh-serverless-openvino", "modelmesh-enabled": True},
{"name": "test-mm-openvino", "modelmesh-enabled": True},
MODELMESH_ISVC_PARAMS,
KSERVE_RUNTIME_PARAMS,
SERVERLESS_ISVC_PARAMS,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def wait_for_isvc_model_status(isvc: InferenceService, target_model_state: str,
"unprivileged_model_namespace, serving_runtime_from_template, invalid_s3_models_inference_service",
[
pytest.param(
{"name": "non-existing-models-storage-path"},
{"name": "test-non-existing-models-path"},
{
"name": f"{Protocols.HTTP}-{ModelInferenceRuntime.CAIKIT_TGIS_RUNTIME}",
"template-name": RuntimeTemplates.CAIKIT_TGIS_SERVING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@
"unprivileged_model_namespace, ovms_kserve_serving_runtime, ovms_kserve_inference_service",
[
pytest.param(
{"name": "raw-env-update"},
{"name": "test-raw-update"},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
RAW_DEPLOYMENT_ISVC_CONFIG,
),
pytest.param(
{"name": "raw-multi-env-update"},
{"name": "test-raw-multi-update"},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
{
**RAW_DEPLOYMENT_ISVC_CONFIG,
Expand All @@ -62,12 +62,12 @@ def test_raw_remove_isvc_env_vars(self, removed_isvc_env_vars):
"unprivileged_model_namespace, ovms_kserve_serving_runtime, ovms_kserve_inference_service",
[
pytest.param(
{"name": "serverless-env-update"},
{"name": "test-serverless-update"},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
SERVERLESS_DEPLOYMENT_ISVC_CONFIG,
),
pytest.param(
{"name": "serverless-multi-env-update"},
{"name": "test-adv-multi-update"},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
{
**SERVERLESS_DEPLOYMENT_ISVC_CONFIG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
ORIGINAL_PULL_SECRET,
UPDATED_PULL_SECRET,
)
from utilities.constants import ModelFormat, ModelName, RuntimeTemplates
from utilities.constants import ModelName, RuntimeTemplates


@pytest.mark.parametrize(
"unprivileged_model_namespace, serving_runtime_from_template, model_car_raw_inference_service_with_pull_secret",
[
pytest.param(
{"name": f"{ModelFormat.OPENVINO}-model-car"},
{"name": "test-pull-secret-modelcar"},
{
"name": f"{ModelName.MNIST}-runtime",
"template-name": RuntimeTemplates.OVMS_KSERVE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"unprivileged_model_namespace, ovms_kserve_serving_runtime, ovms_kserve_inference_service",
[
pytest.param(
{"name": "raw-isvc-replicas"},
{"name": "test-raw-isvc-replicas"},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
{
**BASE_ISVC_CONFIG,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
INITIAL_POD_COUNT = 1
FINAL_POD_COUNT = 5

OVMS_MODEL_NAMESPACE = "ovms-keda"
OVMS_MODEL_NAMESPACE = "test-ovms-keda"
OVMS_MODEL_NAME = "onnx-raw"
OVMS_METRICS_QUERY = (
f'sum(sum_over_time(ovms_requests_success{{namespace="{OVMS_MODEL_NAMESPACE}", name="{OVMS_MODEL_NAME}"}}[5m]))'
Expand All @@ -39,7 +39,7 @@
"unprivileged_model_namespace, ovms_kserve_serving_runtime, stressed_ovms_keda_inference_service",
[
pytest.param(
{"name": "ovms-keda"},
{"name": OVMS_MODEL_NAMESPACE},
RunTimeConfigs.ONNX_OPSET13_RUNTIME_CONFIG,
{
"name": ModelFormat.ONNX,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
pytest.mark.smoke,
]

NAMESPACE_NAME = "kueue-isvc-raw-test"
NAMESPACE_NAME = "test-kueue-isvc-raw"
LOCAL_QUEUE_NAME = "local-queue-raw"
CLUSTER_QUEUE_NAME = "cluster-queue-raw"
RESOURCE_FLAVOR_NAME = "default-flavor-raw"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
pytest.mark.smoke,
]

NAMESPACE_NAME = "kueue-isvc-serverless-test"
NAMESPACE_NAME = "test-kueue-isvc-serverless"
LOCAL_QUEUE_NAME = "local-queue-serverless"
CLUSTER_QUEUE_NAME = "cluster-queue-serverless"
RESOURCE_FLAVOR_NAME = "default-flavor-serverless"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"unprivileged_model_namespace, serving_runtime_from_template, s3_models_inference_service",
[
pytest.param(
{"name": "kserve-tgis-metrics"},
{"name": "test-kserve-tgis-metrics"},
{
"name": f"{Protocols.HTTP}-{ModelInferenceRuntime.CAIKIT_TGIS_RUNTIME}",
"template-name": RuntimeTemplates.CAIKIT_TGIS_SERVING,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"unprivileged_model_namespace, unprivileged_s3_caikit_serverless_inference_service",
[
pytest.param(
{"name": "non-admin-serverless"},
{"name": "test-non-admin-serverless"},
{"model-dir": ModelStoragePath.FLAN_T5_SMALL_CAIKIT},
)
],
Expand All @@ -40,7 +40,7 @@ def test_non_admin_deploy_serverless_and_query_metrics(self, unprivileged_s3_cai
"unprivileged_model_namespace, unprivileged_s3_caikit_raw_inference_service",
[
pytest.param(
{"name": "non-admin-metrics"},
{"name": "test-non-admin-metrics"},
{"model-dir": ModelStoragePath.FLAN_T5_SMALL_HF},
)
],
Expand Down