test: assetType for source endpoint#1187
Conversation
|
The following are automatically added/executed:
Available user actions:
Supported labels{'/verified', '/lgtm', '/build-push-pr-image', '/hold', '/cherry-pick', '/wip'} |
dbasunag
left a comment
There was a problem hiding this comment.
Some minor nitpicking. Please feel free to address them later.
📝 WalkthroughWalkthroughFixtures for MCP catalog configuration migrated from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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_registry/conftest.py`:
- Around line 519-528: The teardown only calls
wait_for_model_catalog_pod_ready_after_deletion so tests can still hit a
pod-ready but not-fully-reloaded catalog; after the existing teardown call to
wait_for_model_catalog_pod_ready_after_deletion add the same API-level poll used
in setup by calling wait_for_mcp_catalog_api(url=mcp_catalog_rest_urls[0],
headers=model_registry_rest_headers) so the fixture waits for the MCP catalog
API to be healthy and reflect restored state before returning; locate this in
the ResourceEditor teardown block near ResourceEditor,
wait_for_model_catalog_pod_ready_after_deletion, and
mcp_catalog_rest_urls/model_registry_rest_headers usages.
In `@tests/model_registry/utils.py`:
- Around line 964-975: In wait_for_mcp_catalog_api, the direct call to
response.json() can raise ValueError/JSONDecodeError for partial/invalid JSON
and bypass the retry logic; catch ValueError around response.json() and re-raise
it as ResourceNotFoundError (or wrap with a descriptive message) so the retry
decorator (which handles ResourceNotFoundError and TransientUnauthorizedError)
will retry; update the block that calls execute_get_call and response.json() in
wait_for_mcp_catalog_api to perform this try/except conversion.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 79cc5e0d-756f-4357-a41c-770b18fb571c
📒 Files selected for processing (5)
tests/model_registry/conftest.pytests/model_registry/mcp_servers/conftest.pytests/model_registry/mcp_servers/test_data_integrity.pytests/model_registry/model_catalog/metadata/test_sources_endpoint.pytests/model_registry/utils.py
💤 Files with no reviewable changes (1)
- tests/model_registry/mcp_servers/test_data_integrity.py
|
Status of building tag latest: success. |
Pull Request
Summary
Related Issues
How it has been tested
Additional Requirements
Summary by CodeRabbit