Add tests for model_artifact update validations#284
Add tests for model_artifact update validations#284dbasunag merged 6 commits intoopendatahub-io:mainfrom
Conversation
|
""" WalkthroughThis update introduces a comprehensive suite of test infrastructure for a model registry REST API. It adds custom exception classes, constants for test data, REST API utility functions, pytest fixtures, and a test class with methods to validate model registry creation and update operations. The new modules provide structured data, error handling, and reusable fixtures to facilitate robust testing of model registration, versioning, and artifact management through HTTP requests. The changes collectively establish a foundation for automated testing of model registry REST endpoints. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Test Method
participant Fixture as Pytest Fixture
participant Utils as REST API Utils
participant API as Model Registry REST API
Test->>Fixture: Request registered_model_rest_api
Fixture->>Utils: register_model_rest_api(...)
Utils->>API: POST /registered_model
API-->>Utils: Registered Model Response
Utils->>API: POST /model_version (with registered_model_id)
API-->>Utils: Model Version Response
Utils->>API: POST /model_artifact (with model_version_id)
API-->>Utils: Model Artifact Response
Utils-->>Fixture: Combined Response
Fixture-->>Test: Registered Model, Version, Artifact
Test->>Fixture: Request updated_model_artifact
Fixture->>Utils: execute_model_registry_patch_command(...)
Utils->>API: PATCH /model_artifact/{id}
API-->>Utils: Updated Artifact Response
Utils-->>Fixture: Updated Artifact
Fixture-->>Test: Updated Artifact
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (5)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/verified', '/hold', '/wip', '/lgtm'} |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (10)
tests/model_registry/exceptions.py (1)
11-11: Add a trailing newline at the end of the file.The file is missing a trailing newline at the end, which is recommended by PEP 8 and prevents warnings from many linters.
class ModelRegistryResourceNotUpdated(Exception): pass - +tests/model_registry/rest_api/constants.py (1)
31-32: Add a trailing newline at the end of the file.The file is missing a trailing newline at the end, which is recommended by PEP 8 and prevents warnings from many linters.
MODEL_REGISTRY_BASE_URI = "/api/model_registry/v1alpha3/" - +tests/model_registry/rest_api/test_model_registry_rest_api.py (5)
61-61: Fix the type annotation for errors list.The type annotation for the errors list is incorrect. It should be
list[dict[str, Any]]since you're creating a list of dictionaries in the comprehension.- errors: list[str:Any] + errors: list[dict[str, Any]]
97-97: Fix the type annotation for errors list in the update test.The type annotation for the errors list should include the nested type structure.
- errors: list[dict[str, list[Any]]] + errors: list[dict[str, list[Any]]]
55-69: Consider extracting the validation logic to a helper method.Both test methods use similar validation logic with list comprehensions to check if expected values match actual values. Consider extracting this to a helper method to avoid duplication.
+ def _validate_expected_values( + self, + actual_data: dict[str, Any], + expected_params: dict[str, Any], + resource_name: str + ) -> None: + errors: list[dict[str, list[Any]]] = [ + {key: [expected_params[key], actual_data.get(key)]} + for key in expected_params.keys() + if not actual_data.get(key) or actual_data[key] != expected_params[key] + ] + if errors: + pytest.fail(f"{resource_name} did not get created/updated with expected values: {errors}") + LOGGER.info(f"Successfully validated: {actual_data['name']}") + def test_validate_model_registry_resource( self: Self, registered_model_rest_api: dict[str, Any], expected_params: dict[str, str], data_key: str, ): - errors: list[str:Any] created_resource_data = registered_model_rest_api[data_key] - if errors := [ - {key: [expected_params[key], registered_model_rest_api.get(key)]} - for key in expected_params.keys() - if not created_resource_data.get(key) or created_resource_data[key] != expected_params[key] - ]: - pytest.fail(f"Model did not get created with expected values: {errors}") - LOGGER.info(f"Successfully validated: {created_resource_data['name']}") + self._validate_expected_values( + actual_data=created_resource_data, + expected_params=expected_params, + resource_name="Model" + )
92-104: Reuse validation logic in second test method.The same validation logic from the first test method is duplicated here. Update this method to use the suggested helper method.
def test_create_update_model_artifact( self, updated_model_artifact: dict[str, Any], expected_param: dict[str, Any], ): - errors: list[dict[str, list[Any]]] - if errors := [ - {key: [expected_param[key], updated_model_artifact.get(key)]} - for key in expected_param.keys() - if not updated_model_artifact.get(key) or updated_model_artifact[key] != expected_param[key] - ]: - pytest.fail(f"Model did not get updated with expected values: {errors}") - LOGGER.info(f"Successfully validated: {updated_model_artifact['name']}") + self._validate_expected_values( + actual_data=updated_model_artifact, + expected_params=expected_param, + resource_name="Model artifact" + )
105-105: Add a trailing newline at the end of the file.The file is missing a trailing newline at the end, which is recommended by PEP 8 and prevents warnings from many linters.
LOGGER.info(f"Successfully validated: {updated_model_artifact['name']}") - +tests/model_registry/rest_api/conftest.py (1)
50-50: Add a trailing newline at the end of the file.The file is missing a trailing newline at the end, which is recommended by PEP 8 and prevents warnings from many linters.
) - +tests/model_registry/rest_api/utils.py (2)
62-89: Add input validation and optimize return structure.The function assumes the correct structure of
data_dictwithout validating it. Consider adding validation for required keys before using them. Also, the return structure could be improved for more consistent access.def register_model_rest_api( model_registry_rest_url: str, model_registry_rest_headers: dict[str, str], data_dict: dict[str, Any] ) -> dict[str, Any]: + # Validate required keys in data_dict + required_keys = ["register_model_data", "model_version_data", "model_artifact_data"] + for key in required_keys: + if key not in data_dict: + raise ValueError(f"Missing required key in data_dict: {key}") + # register a model register_model = execute_model_registry_post_command( url=f"{model_registry_rest_url}{MODEL_REGISTRY_BASE_URI}registered_models", headers=model_registry_rest_headers, data_json=data_dict["register_model_data"], ) # create associated model version: model_data = data_dict["model_version_data"] model_data["registeredModelId"] = register_model["id"] model_version = execute_model_registry_post_command( url=f"{model_registry_rest_url}{MODEL_REGISTRY_BASE_URI}model_versions", headers=model_registry_rest_headers, data_json=model_data, ) # create associated model artifact model_artifact = execute_model_registry_post_command( url=f"{model_registry_rest_url}{MODEL_REGISTRY_BASE_URI}model_versions/{model_version['id']}/artifacts", headers=model_registry_rest_headers, data_json=data_dict["model_artifact_data"], ) LOGGER.info( f"Successfully registered model: {register_model}, with version: {model_version} and " f"associated artifact: {model_artifact}" ) - return {"register_model": register_model, "model_version": model_version, "model_artifact": model_artifact} + return { + "register_model": register_model, + "model_version": model_version, + "model_artifact": model_artifact + }
1-90: Consider refactoring HTTP request functions to reduce duplication.There's significant code duplication among the three HTTP request functions. Consider refactoring to extract common logic into a shared helper function.
def _execute_model_registry_request( method: str, url: str, headers: dict[str, str], data_json: dict[str, Any] = None, expected_status_codes: list[int] = None ) -> dict[Any, Any]: """ Helper function to execute HTTP requests against the model registry API. Args: method: HTTP method (get, post, patch) url: Request URL headers: Request headers data_json: JSON data for POST/PATCH requests expected_status_codes: Status codes considered as successful Returns: Parsed JSON response Raises: ModelRegistryResourceNotCreated: For POST failures ModelRegistryResourceNotUpdated: For PATCH failures ModelRegistryResourceNotFoundError: For GET failures """ if expected_status_codes is None: expected_status_codes = [200] request_fn = getattr(requests, method.lower()) kwargs = {"url": url, "headers": headers, "verify": False, "timeout": 30} if method.lower() in ["post", "patch"] and data_json is not None: kwargs["json"] = data_json resp = request_fn(**kwargs) LOGGER.info(f"url: {url}, status code: {resp.status_code}, rep: {resp.text}") if resp.status_code not in expected_status_codes: if method.lower() == "post": raise ModelRegistryResourceNotCreated( f"Failed to create ModelRegistry resource: {url}, {resp.status_code}: {resp.text}" ) elif method.lower() == "patch": raise ModelRegistryResourceNotUpdated( f"Failed to update ModelRegistry resource: {url}, {resp.status_code}: {resp.text}" ) else: # get raise ModelRegistryResourceNotFoundError( f"Failed to get ModelRegistry resource: {url}, {resp.status_code}: {resp.text}" ) try: return json.loads(resp.text) except json.JSONDecodeError: LOGGER.error(f"Unable to parse {resp.text}") raiseThen the individual functions would become much simpler:
def execute_model_registry_patch_command( url: str, headers: dict[str, str], data_json: dict[str, Any] ) -> dict[Any, Any]: return _execute_model_registry_request("patch", url, headers, data_json) def execute_model_registry_post_command( url: str, headers: dict[str, str], data_json: dict[str, Any] ) -> dict[Any, Any]: return _execute_model_registry_request("post", url, headers, data_json, [200, 201]) def execute_model_registry_get_command(url: str, headers: dict[str, str]) -> dict[Any, Any]: return _execute_model_registry_request("get", url, headers)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
tests/model_registry/exceptions.py(1 hunks)tests/model_registry/rest_api/conftest.py(1 hunks)tests/model_registry/rest_api/constants.py(1 hunks)tests/model_registry/rest_api/test_model_registry_rest_api.py(1 hunks)tests/model_registry/rest_api/utils.py(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
tests/model_registry/rest_api/constants.py (1)
utilities/constants.py (1)
ModelFormat(12-19)
tests/model_registry/rest_api/conftest.py (4)
tests/model_registry/rest_api/utils.py (2)
register_model_rest_api(62-89)execute_model_registry_patch_command(15-29)utilities/constants.py (1)
Protocols(87-94)tests/model_registry/conftest.py (1)
model_registry_instance_rest_endpoint(188-191)tests/conftest.py (1)
current_client_token(81-82)
tests/model_registry/rest_api/test_model_registry_rest_api.py (2)
utilities/constants.py (2)
DscComponents(146-164)ManagementState(151-153)tests/model_registry/rest_api/conftest.py (2)
registered_model_rest_api(26-33)updated_model_artifact(37-49)
tests/model_registry/rest_api/utils.py (2)
tests/model_registry/exceptions.py (3)
ModelRegistryResourceNotCreated(1-2)ModelRegistryResourceNotFoundError(5-6)ModelRegistryResourceNotUpdated(9-10)tests/model_registry/rest_api/conftest.py (2)
model_registry_rest_url(11-13)model_registry_rest_headers(17-22)
🔇 Additional comments (13)
tests/model_registry/exceptions.py (1)
1-10: Clean exception hierarchy for model registry operations.These custom exception classes provide clear error signaling for different failure scenarios in the model registry operations. They will help distinguish between creation, lookup, and update failures during testing.
tests/model_registry/rest_api/constants.py (4)
5-9: LGTM: Clear and descriptive model registration data.The model registration data dictionary has appropriate fields with descriptive values.
10-15: LGTM: Well-structured model version data.The model version data is properly structured with appropriate state and metadata fields.
17-25: LGTM: Comprehensive model artifact test data.The model artifact data contains all necessary fields including URI, format details, and state. Using the ModelFormat enum from utilities.constants ensures consistency with the rest of the codebase.
26-31: LGTM: Convenient aggregation of test data.Aggregating the different data dictionaries into MODEL_REGISTER_DATA provides a convenient way to pass all the data to the test fixtures at once.
tests/model_registry/rest_api/test_model_registry_rest_api.py (4)
11-28: LGTM: Well-structured test parametrization for model registry configuration.The parametrization correctly sets up the test environment with the model registry component configured as "Managed" with a specific namespace.
29-33: LGTM: Clear test class docstring.The docstring clearly explains the purpose of the test class and its behavior regarding component state management.
35-54: LGTM: Comprehensive test parametrization for model registry resources.The parametrization covers all three resource types (model register, version, and artifact) with expected parameter values for validation.
71-91: LGTM: Well-structured test parameters for model artifact updates.The parametrization covers multiple update scenarios for the model artifact with different fields (description, format name, format version).
tests/model_registry/rest_api/conftest.py (4)
10-14: LGTM: Well-structured fixture for model registry REST URL.The fixture correctly builds the REST URL using the HTTPS protocol and the model registry endpoint.
16-23: LGTM: Comprehensive REST headers fixture.The headers fixture includes all necessary fields for API authentication and content negotiation.
25-34: LGTM: Clear model registration fixture.The fixture correctly utilizes the utility function to register a model via the REST API and passes through the test parameters.
36-49: LGTM: Well-implemented model artifact update fixture.The fixture properly extracts the model artifact ID, validates its existence, and executes the PATCH command to update the artifact. The assertion on line 44 provides good error handling.
|
Why did you decide to use the API directly rather than the Python client? |
Python client has a few restrictions. |
|
/verified |
|
Status of building tag latest: success. |
* Add tests for model_artifact update validations * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add tests for model_artifact update validations * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* updates to test_registering_model() based on previous review comments * [do-not-review]must-gather collection at failure point updates! 1176505 updates! 12d9c08 updates! 12d9c08 updates! 65e0213 * [ModelRegistry] ensure RunAsUser and RunAsGroup are not set explicitly (#226) updates! 4813f2b updates! 20cd457 updates! b126825 updates! 809cca7 * Lock file maintenance (#241) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * RHOAIENG-22058: chore(workbenches): add test_create_simple_notebook to smoke (#238) * Remove uv cache from dockerfile to support running in envs like openshift-ci (#239) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: remove uv cache from dockerfile * `is_managed_cluster` fix condition (#243) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: replace iter with list * fix: add logger info * RHOAIENG-22057: fix(workbenches): correct the check for spawned workbench (#242) There can only ever be a single workbench pod started. Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> * RHOAIENG-22057: fix(workbenches): check for internal image registry and adjust the image path accordingly (#244) * now yielding TimeoutSampler get_pods_by_isvc_label func output and handling raised ResourceNotFoundError (#237) Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [model server] add auth test to upgrade (#245) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: add auth test to upgrade * feat: add auth test to upgrade feat: add auth test to upgrade * fix: dsci name in func * [pre-commit.ci] pre-commit autoupdate (#246) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](astral-sh/ruff-pre-commit@v0.11.4...v0.11.5) - [github.com/gitleaks/gitleaks: v8.24.2 → v8.24.3](gitleaks/gitleaks@v8.24.2...v8.24.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix add-remove-labels workflow (#249) * Add Cluster sanity checks before test execution (#235) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity add readme * fix: tix str typo * fix: address comments * fix: address review comments * fix: address comment * fix: use dsci from global config * fix: remove duplicate fixture * add labeler to add labels to prs based on areas impacted (#248) * on rebase clean commented-by- labels (#251) * [model registry] update namespace code and rearrange tests (#247) * updates to test_registering_model() based on previous review comments * update namespace code and rearrange tests * remove unnecessary argument from function call (#255) * on rebase clean commented-by- labels * remove unnecessary argument from function call * feat: add ocp_interop marker (#260) * Lock file maintenance (#259) * Lock file maintenance * fix: add marshmallow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * [pre-commit.ci] pre-commit autoupdate (#263) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.5 → v0.11.6](astral-sh/ruff-pre-commit@v0.11.5...v0.11.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * feat: add upgrade tests (#258) * Remove flake8 ignore list (#265) * fix: remove flake8 ignore * fix: remove flake8 ignore * [model server] Remove pod pre-checks for image pull and fix `TestServerlessScaleToZero` (#256) * fix: update tests * fix: update tests * fix: update tests * fix: save test dep name * fix: minio mm external route * fix: address comemnt * fix: address comemnt * fix: address comemnt * Update python-dependencies (major) (#267) * Update python-dependencies * fix: marshmellow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * Adding Test For InferenceService Zero Initial Scale (#262) * adding test for zero initial scale Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing precommit error Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * using label_selectors when getting deployment Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adding argument names to func call and running pre-commit on all files Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * fixing bug in ovms_kserve_inference_service function that was preventing isvcs from being created with 0 min-replicas Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: move interop marker (#268) * feat: Add upgrade tests for TrustyAIService (#250) * feat: Add upgrade tests for TrustyAIService * Move upgrade README.md to docs/UPGRADE.md * fix: reuse kwargs in TrustyAIService fixture * fix: address comments, reuse kwargs, add docstrings --------- Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix ns deletion logic (#272) * fix: fix resource deletion fixture logic * fix: fix resource deletion fixture logic * feat: fail on missing operators (#257) * fix: update tests * fix: update tests * feat: fail on missing operators * fix: rename to dependent * fix: address comment * fix: add log on failure * fix: type in raise * fix: remove MR check * fix: remove MR check * fix: use package scope * Add basic InferenceGraph deployment check (#233) * Add basic InferenceGraph deployment check This adds a test that deploys an InferenceGraph (IG), sends an inference request to the IG and verifies that the request succeeds. The deployed InferenceGraph is based on the example on the KServe documentation available in the following URL: https://kserve.github.io/website/0.15/modelserving/inference_graph/image_pipeline/. The example was adapted to run in openvino (which is a supported server in ODH), rather than TorchServe. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use cloud storage in InferenceGraph test Use cloud storage for the models, instead of OCI * Feedback: Ruth * Feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply Ruth suggestions Acknowledgement to @rnester for these changes. * More feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * fix: address 503 (#274) * [model server] Move to using unprivileged_client in tests (#273) * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * fix: unpri selection * Update MinIo pod privileges to run on ocp 4.19 (#277) * fix: add securityContext for minio pod * fix: minio on 4.19 * [model server] add multi node args check (#276) * feat: add multi node args * feat: add multi node args * fix: add wait on delete * fix: update new test * [pre-commit.ci] pre-commit autoupdate (#279) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.6 → v0.11.7](astral-sh/ruff-pre-commit@v0.11.6...v0.11.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * `verify_no_failed_pods` - exclude container failures when model mesh deployment (#278) * fix: mm container * fix: update condition * feat: add test for incorrect DB TLS config in Trusty AI (#221) * feat: add test for incorrect DB TLS config in Trusty AI * refactor: remove unused method from utils * feat: move TrustyAI test to own file * refactor: change name of db fixtures and deduplicate code * TrustyAI Service creation code refactor into own method * Move db secret setter to utils * Remove test from test_fairness as test moved to own file * docs: add description to TrustyAI invalid DB TLS config test * fix: check TrustyAIService container for Terminated status in lastStatus * fix: change name of terminal_state getter function * fix: change to a valid certificate and check for service failure * fix: address PR 221 reviewer feedback * revert wait_for_pods to wait_for_mariadb_pods * improve error checking logic * remove un-necessary wrapper function * docs: add docstring to create_trustyai_service method * docs: add docstring to trustyai_service_with_invalid_db_cert * fix: fix invalid return type for trustyai_db_ca_secret * feat: use retry decorator in validate trustyai_service_db_conn_failure method * fix: remove unnecessary return from validate db_conn_failure method * docs: add spacing between lines of docstring * refactor: create constants trustyai metrics and db storage config * refactor: address reviewer feedback - change docstring to correct formatting - remove len(0) check - no templating for error text * fix: use regex instead of in operator to check for error condition * docs: add correct formatting to docstrings * fix: use namespace.name instead of namespace in Pod.get * fix: remove \s from regex to check for spaces * refactor: add Raises section in docstring and use single string for pytest.fail * feat: use raise instead of pytest.fail - create new exception TooManyPodsError - create new exception UnexpectedFailureError - replace pytest.fail with raise and handle exceptions in retry - * fix: change default of teardown to True in TrustyAIService * docs: correct typo in trustyai docstring * docs: fix raises in docs and fix formatting * fix: fix create_trustyai_service namespace args issue * docs: add default for name arg in create tai svc func * [model server] Fix runtime request.param name to use external route (#280) * fix: fix param name * fix: fix param name * feat: add certs when sending requests to TrustyAIService (#266) * Wait for pods to be in running state before attempting to create ModelRegistry (#270) * on rebase clean commented-by- labels * Wait for pods to be in running state before attempting to create ModelRegistry * Address Exception in thread Thread-1 (_monitor) error (#286) * chore(deps): lock file maintenance (#287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (#292) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.7 → v0.11.8](astral-sh/ruff-pre-commit@v0.11.7...v0.11.8) - [github.com/gitleaks/gitleaks: v8.24.3 → v8.25.1](gitleaks/gitleaks@v8.24.3...v8.25.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Wait for dsc and dsci ready state in cluster_sanity check (#293) * fix(workbenches): implement get_username for OpenShift <=4.14 (#275) Turns out SelfSubjectReview is only available starting OpenShift 4.15. fixup incorporate User resource * RedHatQE/openshift-python-wrapper#2387 fixup incorporate SelfSubjectReview resource * RedHatQE/openshift-python-wrapper#2389 Co-authored-by: Debarati Basu-Nag <dbasunag@redhat.com> * replace the bot account with one owned by testdevops (#291) * Fix for post upgarde operator check (#297) Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> * Add test for Model Registry RBAC for SA token (#296) * feat: add RBAC test for SA token Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: address review comments Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: incorporate coderabbit suggestions Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove unneeded variable Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove excessive logs Signed-off-by: lugi0 <lgiorgi@redhat.com> --------- Signed-off-by: lugi0 <lgiorgi@redhat.com> * Support /build-push-pr-image comment to push image to quay for testing via jenkins (#290) updates! 678b389 * Add tests for model_artifact update validations (#284) * Add tests for model_artifact update validations * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updates fixing pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update package * minor updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * address review comments updates! 50ec24b updates! f3a6c3e updates! 792156f updates! 399aa10 updates! 5080e3b updates! c34f4e7 updates! a1d7baa --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Signed-off-by: lugi0 <lgiorgi@redhat.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jiri Daněk <jdanek@redhat.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> Co-authored-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adolfo Aguirrezabal <aaguirre@redhat.com> Co-authored-by: Edgar Hernández <ehernand@redhat.com> Co-authored-by: Shelton Cyril <sheltoncyril@gmail.com> Co-authored-by: Milind Waykole <mwaykole@redhat.com> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb>
* updates to test_registering_model() based on previous review comments * [do-not-review]must-gather collection at failure point updates! 1176505 updates! 12d9c08 updates! 12d9c08 updates! 65e0213 * [ModelRegistry] ensure RunAsUser and RunAsGroup are not set explicitly (#226) updates! 4813f2b updates! 20cd457 updates! b126825 updates! 809cca7 * Lock file maintenance (#241) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * RHOAIENG-22058: chore(workbenches): add test_create_simple_notebook to smoke (#238) * Remove uv cache from dockerfile to support running in envs like openshift-ci (#239) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: remove uv cache from dockerfile * `is_managed_cluster` fix condition (#243) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: replace iter with list * fix: add logger info * RHOAIENG-22057: fix(workbenches): correct the check for spawned workbench (#242) There can only ever be a single workbench pod started. Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> * RHOAIENG-22057: fix(workbenches): check for internal image registry and adjust the image path accordingly (#244) * now yielding TimeoutSampler get_pods_by_isvc_label func output and handling raised ResourceNotFoundError (#237) Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [model server] add auth test to upgrade (#245) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: add auth test to upgrade * feat: add auth test to upgrade feat: add auth test to upgrade * fix: dsci name in func * [pre-commit.ci] pre-commit autoupdate (#246) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](astral-sh/ruff-pre-commit@v0.11.4...v0.11.5) - [github.com/gitleaks/gitleaks: v8.24.2 → v8.24.3](gitleaks/gitleaks@v8.24.2...v8.24.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix add-remove-labels workflow (#249) * Add Cluster sanity checks before test execution (#235) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity add readme * fix: tix str typo * fix: address comments * fix: address review comments * fix: address comment * fix: use dsci from global config * fix: remove duplicate fixture * add labeler to add labels to prs based on areas impacted (#248) * on rebase clean commented-by- labels (#251) * [model registry] update namespace code and rearrange tests (#247) * updates to test_registering_model() based on previous review comments * update namespace code and rearrange tests * remove unnecessary argument from function call (#255) * on rebase clean commented-by- labels * remove unnecessary argument from function call * feat: add ocp_interop marker (#260) * Lock file maintenance (#259) * Lock file maintenance * fix: add marshmallow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * [pre-commit.ci] pre-commit autoupdate (#263) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.5 → v0.11.6](astral-sh/ruff-pre-commit@v0.11.5...v0.11.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * feat: add upgrade tests (#258) * Remove flake8 ignore list (#265) * fix: remove flake8 ignore * fix: remove flake8 ignore * [model server] Remove pod pre-checks for image pull and fix `TestServerlessScaleToZero` (#256) * fix: update tests * fix: update tests * fix: update tests * fix: save test dep name * fix: minio mm external route * fix: address comemnt * fix: address comemnt * fix: address comemnt * Update python-dependencies (major) (#267) * Update python-dependencies * fix: marshmellow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * Adding Test For InferenceService Zero Initial Scale (#262) * adding test for zero initial scale Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing precommit error Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * using label_selectors when getting deployment Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adding argument names to func call and running pre-commit on all files Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * fixing bug in ovms_kserve_inference_service function that was preventing isvcs from being created with 0 min-replicas Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: move interop marker (#268) * feat: Add upgrade tests for TrustyAIService (#250) * feat: Add upgrade tests for TrustyAIService * Move upgrade README.md to docs/UPGRADE.md * fix: reuse kwargs in TrustyAIService fixture * fix: address comments, reuse kwargs, add docstrings --------- Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix ns deletion logic (#272) * fix: fix resource deletion fixture logic * fix: fix resource deletion fixture logic * feat: fail on missing operators (#257) * fix: update tests * fix: update tests * feat: fail on missing operators * fix: rename to dependent * fix: address comment * fix: add log on failure * fix: type in raise * fix: remove MR check * fix: remove MR check * fix: use package scope * Add basic InferenceGraph deployment check (#233) * Add basic InferenceGraph deployment check This adds a test that deploys an InferenceGraph (IG), sends an inference request to the IG and verifies that the request succeeds. The deployed InferenceGraph is based on the example on the KServe documentation available in the following URL: https://kserve.github.io/website/0.15/modelserving/inference_graph/image_pipeline/. The example was adapted to run in openvino (which is a supported server in ODH), rather than TorchServe. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use cloud storage in InferenceGraph test Use cloud storage for the models, instead of OCI * Feedback: Ruth * Feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply Ruth suggestions Acknowledgement to @rnester for these changes. * More feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * fix: address 503 (#274) * [model server] Move to using unprivileged_client in tests (#273) * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * fix: unpri selection * Update MinIo pod privileges to run on ocp 4.19 (#277) * fix: add securityContext for minio pod * fix: minio on 4.19 * [model server] add multi node args check (#276) * feat: add multi node args * feat: add multi node args * fix: add wait on delete * fix: update new test * [pre-commit.ci] pre-commit autoupdate (#279) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.6 → v0.11.7](astral-sh/ruff-pre-commit@v0.11.6...v0.11.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * `verify_no_failed_pods` - exclude container failures when model mesh deployment (#278) * fix: mm container * fix: update condition * feat: add test for incorrect DB TLS config in Trusty AI (#221) * feat: add test for incorrect DB TLS config in Trusty AI * refactor: remove unused method from utils * feat: move TrustyAI test to own file * refactor: change name of db fixtures and deduplicate code * TrustyAI Service creation code refactor into own method * Move db secret setter to utils * Remove test from test_fairness as test moved to own file * docs: add description to TrustyAI invalid DB TLS config test * fix: check TrustyAIService container for Terminated status in lastStatus * fix: change name of terminal_state getter function * fix: change to a valid certificate and check for service failure * fix: address PR 221 reviewer feedback * revert wait_for_pods to wait_for_mariadb_pods * improve error checking logic * remove un-necessary wrapper function * docs: add docstring to create_trustyai_service method * docs: add docstring to trustyai_service_with_invalid_db_cert * fix: fix invalid return type for trustyai_db_ca_secret * feat: use retry decorator in validate trustyai_service_db_conn_failure method * fix: remove unnecessary return from validate db_conn_failure method * docs: add spacing between lines of docstring * refactor: create constants trustyai metrics and db storage config * refactor: address reviewer feedback - change docstring to correct formatting - remove len(0) check - no templating for error text * fix: use regex instead of in operator to check for error condition * docs: add correct formatting to docstrings * fix: use namespace.name instead of namespace in Pod.get * fix: remove \s from regex to check for spaces * refactor: add Raises section in docstring and use single string for pytest.fail * feat: use raise instead of pytest.fail - create new exception TooManyPodsError - create new exception UnexpectedFailureError - replace pytest.fail with raise and handle exceptions in retry - * fix: change default of teardown to True in TrustyAIService * docs: correct typo in trustyai docstring * docs: fix raises in docs and fix formatting * fix: fix create_trustyai_service namespace args issue * docs: add default for name arg in create tai svc func * [model server] Fix runtime request.param name to use external route (#280) * fix: fix param name * fix: fix param name * feat: add certs when sending requests to TrustyAIService (#266) * Wait for pods to be in running state before attempting to create ModelRegistry (#270) * on rebase clean commented-by- labels * Wait for pods to be in running state before attempting to create ModelRegistry * Address Exception in thread Thread-1 (_monitor) error (opendatahub-io#286) * chore(deps): lock file maintenance (opendatahub-io#287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (opendatahub-io#292) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.7 → v0.11.8](astral-sh/ruff-pre-commit@v0.11.7...v0.11.8) - [github.com/gitleaks/gitleaks: v8.24.3 → v8.25.1](gitleaks/gitleaks@v8.24.3...v8.25.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Wait for dsc and dsci ready state in cluster_sanity check (opendatahub-io#293) * fix(workbenches): implement get_username for OpenShift <=4.14 (#275) Turns out SelfSubjectReview is only available starting OpenShift 4.15. fixup incorporate User resource * RedHatQE/openshift-python-wrapper#2387 fixup incorporate SelfSubjectReview resource * RedHatQE/openshift-python-wrapper#2389 Co-authored-by: Debarati Basu-Nag <dbasunag@redhat.com> * replace the bot account with one owned by testdevops (opendatahub-io#291) * Fix for post upgarde operator check (opendatahub-io#297) Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> * Add test for Model Registry RBAC for SA token (opendatahub-io#296) * feat: add RBAC test for SA token Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: address review comments Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: incorporate coderabbit suggestions Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove unneeded variable Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove excessive logs Signed-off-by: lugi0 <lgiorgi@redhat.com> --------- Signed-off-by: lugi0 <lgiorgi@redhat.com> * Support /build-push-pr-image comment to push image to quay for testing via jenkins (opendatahub-io#290) updates! 678b389 * Add tests for model_artifact update validations (#284) * Add tests for model_artifact update validations * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updates fixing pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update package * minor updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * address review comments updates! 50ec24b updates! f3a6c3e updates! 792156f updates! 399aa10 updates! 5080e3b updates! c34f4e7 updates! a1d7baa --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Signed-off-by: lugi0 <lgiorgi@redhat.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jiri Daněk <jdanek@redhat.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> Co-authored-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adolfo Aguirrezabal <aaguirre@redhat.com> Co-authored-by: Edgar Hernández <ehernand@redhat.com> Co-authored-by: Shelton Cyril <sheltoncyril@gmail.com> Co-authored-by: Milind Waykole <mwaykole@redhat.com> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb>
* updates to test_registering_model() based on previous review comments * [do-not-review]must-gather collection at failure point updates! 1176505 updates! 12d9c08 updates! 12d9c08 updates! 65e0213 * [ModelRegistry] ensure RunAsUser and RunAsGroup are not set explicitly (opendatahub-io#226) updates! 4813f2b updates! 20cd457 updates! b126825 updates! 809cca7 * Lock file maintenance (opendatahub-io#241) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * RHOAIENG-22058: chore(workbenches): add test_create_simple_notebook to smoke (opendatahub-io#238) * Remove uv cache from dockerfile to support running in envs like openshift-ci (opendatahub-io#239) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: remove uv cache from dockerfile * `is_managed_cluster` fix condition (opendatahub-io#243) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * fix: replace iter with list * fix: add logger info * RHOAIENG-22057: fix(workbenches): correct the check for spawned workbench (opendatahub-io#242) There can only ever be a single workbench pod started. Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> * RHOAIENG-22057: fix(workbenches): check for internal image registry and adjust the image path accordingly (opendatahub-io#244) * now yielding TimeoutSampler get_pods_by_isvc_label func output and handling raised ResourceNotFoundError (opendatahub-io#237) Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [model server] add auth test to upgrade (opendatahub-io#245) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: add auth test to upgrade * feat: add auth test to upgrade feat: add auth test to upgrade * fix: dsci name in func * [pre-commit.ci] pre-commit autoupdate (opendatahub-io#246) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.4 → v0.11.5](astral-sh/ruff-pre-commit@v0.11.4...v0.11.5) - [github.com/gitleaks/gitleaks: v8.24.2 → v8.24.3](gitleaks/gitleaks@v8.24.2...v8.24.3) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix add-remove-labels workflow (opendatahub-io#249) * Add Cluster sanity checks before test execution (opendatahub-io#235) * Create size-labeler.yml * Delete .github/workflows/size-labeler.yml * model mesh - add auth tests * xx * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity * feat: cluster sanity add readme * fix: tix str typo * fix: address comments * fix: address review comments * fix: address comment * fix: use dsci from global config * fix: remove duplicate fixture * add labeler to add labels to prs based on areas impacted (opendatahub-io#248) * on rebase clean commented-by- labels (opendatahub-io#251) * [model registry] update namespace code and rearrange tests (opendatahub-io#247) * updates to test_registering_model() based on previous review comments * update namespace code and rearrange tests * remove unnecessary argument from function call (opendatahub-io#255) * on rebase clean commented-by- labels * remove unnecessary argument from function call * feat: add ocp_interop marker (opendatahub-io#260) * Lock file maintenance (opendatahub-io#259) * Lock file maintenance * fix: add marshmallow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * [pre-commit.ci] pre-commit autoupdate (opendatahub-io#263) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.5 → v0.11.6](astral-sh/ruff-pre-commit@v0.11.5...v0.11.6) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * feat: add upgrade tests (opendatahub-io#258) * Remove flake8 ignore list (opendatahub-io#265) * fix: remove flake8 ignore * fix: remove flake8 ignore * [model server] Remove pod pre-checks for image pull and fix `TestServerlessScaleToZero` (opendatahub-io#256) * fix: update tests * fix: update tests * fix: update tests * fix: save test dep name * fix: minio mm external route * fix: address comemnt * fix: address comemnt * fix: address comemnt * Update python-dependencies (major) (opendatahub-io#267) * Update python-dependencies * fix: marshmellow version --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: rnetser <rnetser@redhat.com> * Adding Test For InferenceService Zero Initial Scale (opendatahub-io#262) * adding test for zero initial scale Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixing precommit error Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * using label_selectors when getting deployment Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * adding argument names to func call and running pre-commit on all files Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> * fixing bug in ovms_kserve_inference_service function that was preventing isvcs from being created with 0 min-replicas Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * feat: move interop marker (opendatahub-io#268) * feat: Add upgrade tests for TrustyAIService (opendatahub-io#250) * feat: Add upgrade tests for TrustyAIService * Move upgrade README.md to docs/UPGRADE.md * fix: reuse kwargs in TrustyAIService fixture * fix: address comments, reuse kwargs, add docstrings --------- Co-authored-by: Ruth Netser <rnetser@redhat.com> * Fix ns deletion logic (opendatahub-io#272) * fix: fix resource deletion fixture logic * fix: fix resource deletion fixture logic * feat: fail on missing operators (opendatahub-io#257) * fix: update tests * fix: update tests * feat: fail on missing operators * fix: rename to dependent * fix: address comment * fix: add log on failure * fix: type in raise * fix: remove MR check * fix: remove MR check * fix: use package scope * Add basic InferenceGraph deployment check (opendatahub-io#233) * Add basic InferenceGraph deployment check This adds a test that deploys an InferenceGraph (IG), sends an inference request to the IG and verifies that the request succeeds. The deployed InferenceGraph is based on the example on the KServe documentation available in the following URL: https://kserve.github.io/website/0.15/modelserving/inference_graph/image_pipeline/. The example was adapted to run in openvino (which is a supported server in ODH), rather than TorchServe. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Use cloud storage in InferenceGraph test Use cloud storage for the models, instead of OCI * Feedback: Ruth * Feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply Ruth suggestions Acknowledgement to @rnester for these changes. * More feedback: Ruth * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * fix: address 503 (opendatahub-io#274) * [model server] Move to using unprivileged_client in tests (opendatahub-io#273) * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * feat: use unprivileged_client * fix: unpri selection * Update MinIo pod privileges to run on ocp 4.19 (opendatahub-io#277) * fix: add securityContext for minio pod * fix: minio on 4.19 * [model server] add multi node args check (opendatahub-io#276) * feat: add multi node args * feat: add multi node args * fix: add wait on delete * fix: update new test * [pre-commit.ci] pre-commit autoupdate (opendatahub-io#279) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.6 → v0.11.7](astral-sh/ruff-pre-commit@v0.11.6...v0.11.7) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> * `verify_no_failed_pods` - exclude container failures when model mesh deployment (opendatahub-io#278) * fix: mm container * fix: update condition * feat: add test for incorrect DB TLS config in Trusty AI (opendatahub-io#221) * feat: add test for incorrect DB TLS config in Trusty AI * refactor: remove unused method from utils * feat: move TrustyAI test to own file * refactor: change name of db fixtures and deduplicate code * TrustyAI Service creation code refactor into own method * Move db secret setter to utils * Remove test from test_fairness as test moved to own file * docs: add description to TrustyAI invalid DB TLS config test * fix: check TrustyAIService container for Terminated status in lastStatus * fix: change name of terminal_state getter function * fix: change to a valid certificate and check for service failure * fix: address PR 221 reviewer feedback * revert wait_for_pods to wait_for_mariadb_pods * improve error checking logic * remove un-necessary wrapper function * docs: add docstring to create_trustyai_service method * docs: add docstring to trustyai_service_with_invalid_db_cert * fix: fix invalid return type for trustyai_db_ca_secret * feat: use retry decorator in validate trustyai_service_db_conn_failure method * fix: remove unnecessary return from validate db_conn_failure method * docs: add spacing between lines of docstring * refactor: create constants trustyai metrics and db storage config * refactor: address reviewer feedback - change docstring to correct formatting - remove len(0) check - no templating for error text * fix: use regex instead of in operator to check for error condition * docs: add correct formatting to docstrings * fix: use namespace.name instead of namespace in Pod.get * fix: remove \s from regex to check for spaces * refactor: add Raises section in docstring and use single string for pytest.fail * feat: use raise instead of pytest.fail - create new exception TooManyPodsError - create new exception UnexpectedFailureError - replace pytest.fail with raise and handle exceptions in retry - * fix: change default of teardown to True in TrustyAIService * docs: correct typo in trustyai docstring * docs: fix raises in docs and fix formatting * fix: fix create_trustyai_service namespace args issue * docs: add default for name arg in create tai svc func * [model server] Fix runtime request.param name to use external route (opendatahub-io#280) * fix: fix param name * fix: fix param name * feat: add certs when sending requests to TrustyAIService (opendatahub-io#266) * Wait for pods to be in running state before attempting to create ModelRegistry (opendatahub-io#270) * on rebase clean commented-by- labels * Wait for pods to be in running state before attempting to create ModelRegistry * Address Exception in thread Thread-1 (_monitor) error (opendatahub-io#286) * chore(deps): lock file maintenance (opendatahub-io#287) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> * [pre-commit.ci] pre-commit autoupdate (opendatahub-io#292) updates: - [github.com/astral-sh/ruff-pre-commit: v0.11.7 → v0.11.8](astral-sh/ruff-pre-commit@v0.11.7...v0.11.8) - [github.com/gitleaks/gitleaks: v8.24.3 → v8.25.1](gitleaks/gitleaks@v8.24.3...v8.25.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * Wait for dsc and dsci ready state in cluster_sanity check (opendatahub-io#293) * fix(workbenches): implement get_username for OpenShift <=4.14 (opendatahub-io#275) Turns out SelfSubjectReview is only available starting OpenShift 4.15. fixup incorporate User resource * RedHatQE/openshift-python-wrapper#2387 fixup incorporate SelfSubjectReview resource * RedHatQE/openshift-python-wrapper#2389 Co-authored-by: Debarati Basu-Nag <dbasunag@redhat.com> * replace the bot account with one owned by testdevops (opendatahub-io#291) * Fix for post upgarde operator check (opendatahub-io#297) Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> * Add test for Model Registry RBAC for SA token (opendatahub-io#296) * feat: add RBAC test for SA token Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: address review comments Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: incorporate coderabbit suggestions Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove unneeded variable Signed-off-by: lugi0 <lgiorgi@redhat.com> * fix: remove excessive logs Signed-off-by: lugi0 <lgiorgi@redhat.com> --------- Signed-off-by: lugi0 <lgiorgi@redhat.com> * Support /build-push-pr-image comment to push image to quay for testing via jenkins (opendatahub-io#290) updates! 678b389 * Add tests for model_artifact update validations (opendatahub-io#284) * Add tests for model_artifact update validations * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * updates fixing pre-commit * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * update package * minor updates * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * address review comments updates! 50ec24b updates! f3a6c3e updates! 792156f updates! 399aa10 updates! 5080e3b updates! c34f4e7 updates! a1d7baa --------- Signed-off-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Signed-off-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb> Signed-off-by: lugi0 <lgiorgi@redhat.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Jiri Daněk <jdanek@redhat.com> Co-authored-by: Ruth Netser <rnetser@redhat.com> Co-authored-by: Luca Giorgi <lgiorgi@redhat.com> Co-authored-by: Brett Thompson <196701379+brettmthompson@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Adolfo Aguirrezabal <aaguirre@redhat.com> Co-authored-by: Edgar Hernández <ehernand@redhat.com> Co-authored-by: Shelton Cyril <sheltoncyril@gmail.com> Co-authored-by: Milind Waykole <mwaykole@redhat.com> Co-authored-by: Milind Waykole <mwaykole@mwaykole-thinkpadp1gen4i.bengluru.csb>
Description
How Has This Been Tested?
Merge criteria:
Summary by CodeRabbit
New Features
Bug Fixes
Chores