Remove grpc as required param in local mr resource#899
Remove grpc as required param in local mr resource#899dbasunag merged 5 commits intoopendatahub-io:mainfrom
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/cherry-pick', '/build-push-pr-image', '/lgtm', '/verified', '/hold', '/wip'} |
📝 WalkthroughWalkthroughReplaces test imports to Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
tests/model_registry/rest_api/conftest.py (1)
143-167: Consider droppinggrpc={}(and possiblyistio=None) hereNow that the local
ModelRegistrywrapper treatsgrpcas optional, you can likely removegrpc={}from this call (andistio=Noneif not used anywhere downstream) for consistency with other creation sites and the “no required gRPC” goal.utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
62-75: ModelRegistry wrapper looks solid; verify behavior ofgrpc=NoneserializationThe wrapper correctly makes
grpcoptional and wireskube_rbac_proxyintokubeRBACProxy, while still enforcingrestas required. One nuance:to_dictalways sets_spec["grpc"] = self.grpc, so callers that omitgrpcwill sendgrpc: nullin the spec. If the CRD expects this field to be truly absent when not used, consider guarding it like the other optional sections:- _spec["grpc"] = self.grpc + if self.grpc is not None: + _spec["grpc"] = self.grpc
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (12)
tests/model_registry/async_job/conftest.py(1 hunks)tests/model_registry/conftest.py(2 hunks)tests/model_registry/negative_tests/test_model_registry_creation_negative.py(1 hunks)tests/model_registry/rbac/conftest.py(1 hunks)tests/model_registry/rbac/test_mr_rbac.py(1 hunks)tests/model_registry/rest_api/conftest.py(1 hunks)tests/model_registry/rest_api/test_model_registry_rest_api.py(1 hunks)tests/model_registry/rest_api/test_model_registry_secure_db.py(1 hunks)tests/model_registry/rest_api/test_multiple_mr.py(1 hunks)tests/model_registry/upgrade/model_registry/test_model_registry_upgrade.py(1 hunks)tests/model_registry/utils.py(1 hunks)utilities/resources/model_registry_modelregistry_opendatahub_io.py(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (10)
tests/model_registry/rbac/test_mr_rbac.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/negative_tests/test_model_registry_creation_negative.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/rest_api/test_model_registry_secure_db.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/rest_api/conftest.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/rbac/conftest.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/rest_api/test_multiple_mr.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/upgrade/model_registry/test_model_registry_upgrade.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/rest_api/test_model_registry_rest_api.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/utils.py (1)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)
tests/model_registry/conftest.py (3)
utilities/resources/model_registry_modelregistry_opendatahub_io.py (1)
ModelRegistry(9-94)utilities/general.py (1)
wait_for_pods_running(438-471)tests/conftest.py (1)
admin_client(78-79)
🔇 Additional comments (14)
tests/model_registry/rbac/conftest.py (1)
10-10: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/rest_api/test_model_registry_rest_api.py (1)
5-5: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/rest_api/test_multiple_mr.py (1)
6-6: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/rest_api/test_model_registry_secure_db.py (1)
8-8: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/rbac/test_mr_rbac.py (1)
36-36: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/negative_tests/test_model_registry_creation_negative.py (2)
6-6: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
53-67: Verify ifgrpc={}is still necessary.Line 62 still passes
grpc={}. According to the PR objectives, grpc is being removed as a required parameter. Consider whether this empty grpc dict is still needed for this negative test, or if it can be omitted.tests/model_registry/upgrade/model_registry/test_model_registry_upgrade.py (1)
10-10: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/async_job/conftest.py (1)
28-28: Import path relocation looks good.The ModelRegistry import has been correctly updated to the new module location.
tests/model_registry/conftest.py (2)
28-28: ModelRegistry import path update looks correctSwitching to the utilities-backed
ModelRegistrykeeps tests decoupled fromocp_resourcesand matches the new local wrapper usage elsewhere.
113-120: Workaround for default DB is safely scopedThe extra
wait_for_pods_runninggated ondb_name == "default"cleanly scopes the RHOAIENG-40875 workaround to the default postgres path without impacting other backends.tests/model_registry/utils.py (2)
15-15: ModelRegistry import migration is consistentUsing
utilities.resources.model_registry_modelregistry_opendatahub_io.ModelRegistryhere keeps this helper aligned with the new local resource wrapper.
538-571: ModelRegistry construction matches new optional-grpc API
get_model_registry_objectsnow instantiatesModelRegistrywithrest={}and nogrpcargument, which is consistent with making gRPC optional while still satisfying the required REST spec.tests/model_registry/rest_api/conftest.py (1)
36-36: Import now targets local ModelRegistry wrapperThis aligns the REST API tests with the utilities-backed
ModelRegistry, consistent with the rest of the suite.
|
Status of building tag latest: success. |
* Add workaround for RHOAIENG-40875 and remove grpc as required param in ocp resources * updates to take our workaround
Add local resource to remove grpc as required param and add kube_rbac_proxy option.
Update test to not pass grpc ={} in MR creation call
Description
How Has This Been Tested?
Merge criteria:
Summary by CodeRabbit
Refactor
Tests
✏️ Tip: You can customize this high-level summary in your review settings.