MPT-19903: add /integration/extensions/{id}/instances service#283
Conversation
📝 WalkthroughWalkthroughThis PR adds comprehensive support for managing extension instances as a sub-resource within the extensions API. It introduces the ChangesExtension Instances Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
31116ac to
d8a55d6
Compare
|
…ces endpoint Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> � Conflicts: � mpt_api_client/resources/integration/extensions.py
593d89e to
d2e5f68
Compare
…sionId}/instances
d2e5f68 to
ed5bcd7
Compare
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tests/e2e/integration/extension_instances/test_sync_extension_instances.py (1)
10-14: ⚡ Quick winConsider using
xfailinstead of hardskipfor known backend issues.Line 10 uses
skipwhich hides the test completely; usingxfail(strict=False)keeps the test visible and will surface when the backend issue is fixed. Apply the same change in the async counterpart too. Replace the placeholder with an actual issue ticket ID for tracking.Proposed change
-@pytest.mark.skip(reason="returns 500 error") +@pytest.mark.xfail( + reason="Known backend 500 for create extension instance (link issue ID)", + strict=False, +) def test_create_extension_instance(extension_instances_service, instance_data):🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tests/e2e/integration/extension_instances/test_sync_extension_instances.py` around lines 10 - 14, Replace the hard skip on the failing test by marking it xfail so it still runs and will surface when fixed: remove pytest.mark.skip on test_create_extension_instance and use pytest.mark.xfail(reason="BACKEND-<ISSUE_ID>: returns 500 error", strict=False) instead; apply the same change to the async counterpart test (the async test that uses extension_instances_service and instance_data) so both tests remain visible while tracking the backend ticket ID.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tests/e2e/integration/extension_instances/test_sync_extension_instances.py`:
- Around line 10-14: Replace the hard skip on the failing test by marking it
xfail so it still runs and will surface when fixed: remove pytest.mark.skip on
test_create_extension_instance and use
pytest.mark.xfail(reason="BACKEND-<ISSUE_ID>: returns 500 error", strict=False)
instead; apply the same change to the async counterpart test (the async test
that uses extension_instances_service and instance_data) so both tests remain
visible while tracking the backend ticket ID.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Run ID: 58c3f5cf-1438-4178-9434-2f11999ac446
📒 Files selected for processing (8)
e2e_config.test.jsonmpt_api_client/resources/integration/extension_instances.pympt_api_client/resources/integration/extensions.pytests/e2e/integration/extension_instances/__init__.pytests/e2e/integration/extension_instances/conftest.pytests/e2e/integration/extension_instances/test_async_extension_instances.pytests/e2e/integration/extension_instances/test_sync_extension_instances.pytests/unit/resources/integration/test_extension_instances.py



Summary
Implements the
/public/v1/integration/extensions/{extensionId}/instancesendpoint group as part of MPT-13310.Changes
mpt_api_client/resources/integration/extension_instances.py— CreateMixin + GetMixin + CollectionMixinextensions.pyto exposeinstances(extension_id)accessortests/unit/resources/integration/test_extension_instances.pytests/e2e/integration/extension_instances/Depends on
#277 (MPT-19892 — rename extensibility → integration)
Closes MPT-19903
/public/v1/integration/extensions/{extensionId}/instancesendpoint groupExtensionInstancemodel with attributes for identity, relationships, and stateExtensionInstancesServiceandAsyncExtensionInstancesServicewith create, get, and list operationsinstances(extension_id)accessor methods on both synchronous and asynchronous extensions services