-
Notifications
You must be signed in to change notification settings - Fork 194
[backend/frontend] feat: delete connector instance and connector (#4642) #4654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: release/current
Are you sure you want to change the base?
Conversation
Signed-off-by: Marine LM <[email protected]>
Signed-off-by: Marine LM <[email protected]>
Signed-off-by: Marine LM <[email protected]>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/current #4654 +/- ##
=====================================================
+ Coverage 51.68% 51.74% +0.06%
- Complexity 3979 3995 +16
=====================================================
Files 942 943 +1
Lines 28363 28410 +47
Branches 2129 2135 +6
=====================================================
+ Hits 14659 14702 +43
Misses 12819 12819
- Partials 885 889 +4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements the ability to delete connector instances and their associated connectors (injectors, collectors, or executors). The deletion is orchestrated through XtmComposer, with safeguards to prevent deletion of instances that don't support it.
Key changes:
- Added a new
deletingrequested status type for connector instances - Implemented backend logic to delete connector instances and their associated connectors
- Added frontend UI to display deletion status and disable interactions during deletion
- Introduced
enableDeletionflag to control which instances can be deleted
Reviewed changes
Copilot reviewed 37 out of 38 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| openaev-model/src/main/java/io/openaev/database/model/ConnectorInstance.java | Added deleting status and enableDeletion flag to ConnectorInstance model |
| openaev-model/src/main/java/io/openaev/database/repository/ConnectorInstanceRepository.java | Updated query to exclude instances with deleting status |
| openaev-model/src/main/java/io/openaev/database/audit/BaseEvent.java | Refactored class hierarchy detection logic with new helper method |
| openaev-api/src/main/java/io/openaev/migration/V4_59__Add_deleting_requested_connector_status.java | Database migration to add deleting status type and enableDeletion column |
| openaev-api/src/main/java/io/openaev/api/xtm_composer/XtmComposerApi.java | Added DELETE endpoint for connector instance deletion |
| openaev-api/src/main/java/io/openaev/service/connectors/ConnectorOrchestrationService.java | Implemented deletion orchestration logic for instances and connectors |
| openaev-api/src/main/java/io/openaev/service/connector_instances/ConnectorInstanceService.java | Added validation for deletion requests and enableDeletion flag initialization |
| openaev-api/src/main/java/io/openaev/service/connectors/AbstractConnectorService.java | Made getConnectorIdFromInstance public and updated mapper signature |
| openaev-api/src/main/java/io/openaev/service/InjectorService.java | Added deleteById method |
| openaev-api/src/main/java/io/openaev/executors/ExecutorService.java | Added deleteById method |
| openaev-api/src/main/java/io/openaev/rest/collector/service/CollectorService.java | Added deleteById method |
| openaev-api/src/main/java/io/openaev/rest/connector_instance/ConnectorInstanceApi.java | Removed direct DELETE endpoint (deletion now via XtmComposer) |
| openaev-api/src/main/java/io/openaev/utils/mapper/*.java | Updated mappers to include ConnectorInstance in outputs |
| openaev-api/src/main/java/io/openaev/rest/*/form/*Output.java | Added connectorInstance field to output DTOs |
| openaev-front/src/utils/lang/*.json | Added translation for "Deletion is being processed" |
| openaev-front/src/components/common/ButtonPopover.tsx | Added style property to PopoverEntry interface |
| openaev-front/src/admin/components/integrations/common/ConnectorPopover.tsx | Implemented delete functionality with navigation after deletion |
| openaev-front/src/admin/components/integrations/common/ConnectorTitle.tsx | Added disabled state handling for deletion in progress |
| openaev-front/src/admin/components/integrations/common/ConnectorPage.tsx | Added logic to disable UI elements during deletion |
| openaev-front/src/admin/components/integrations/common/ConnectorList.tsx | Added disabled state for cards with deleting status |
| openaev-front/src/admin/components/integrations/common/ConnectorCard.tsx | Visual feedback for disabled state during deletion |
| openaev-front/src/admin/components/integrations/common/ConnectorContext.ts | Added instance field to ConnectorOutput interface |
| openaev-front/src/actions/connector_instances/connector-instance-actions.ts | Removed deleteConnectorInstance action |
| openaev-api/src/test/java/io/openaev/rest/ConnectorInstanceApiTest.java | Added test for deletion validation |
| openaev-api/src/test/java/io/openaev/api/xtm_composer/XtmComposerApiTest.java | Added tests for deletion endpoint |
| + "AND instance.catalogConnector.isManagerSupported = TRUE") | ||
| List<ConnectorInstance> findAllManagedByXtmComposerAndConfiguration(); | ||
| + "AND instance.catalogConnector.isManagerSupported = TRUE " | ||
| + "AND instance.requestedStatus != 'deleting'") |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra space before '!=' operator. Should be single space for consistent formatting.
| + "AND instance.requestedStatus != 'deleting'") | |
| + "AND instance.requestedStatus != 'deleting'") |
| connectorInstance -> { | ||
| connectorInstance.setEnableDeletion(true); | ||
| }); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lambda body can be simplified to method reference: connectorInstance -> connectorInstance.setEnableDeletion(true) can use a more concise approach or avoid the intermediate variable in the forEach.
| connectorInstance -> { | |
| connectorInstance.setEnableDeletion(true); | |
| }); | |
| connectorInstance -> connectorInstance.setEnableDeletion(true)); |
| dispatch(updateRequestedStatus(connectorInstanceId, { connector_instance_requested_status: 'deleting' })).then(() => { | ||
| const parentPath = location.pathname.split('/').slice(0, -1).join('/'); | ||
| navigate(parentPath); |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The location.pathname is accessed without imports. Ensure that location is available in scope, typically from useLocation hook in react-router.
| name = "includeNext", | ||
| description = "Include collectors pending deployment", | ||
| required = false) | ||
| @Parameter(name = "includeNext", description = "Include collectors pending deployment") |
Copilot
AI
Jan 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The removal of required = false from the @parameter annotation is unnecessary since the corresponding @RequestParam already specifies required = false. This change doesn't add value and differs from the original explicit declaration.
| @Parameter(name = "includeNext", description = "Include collectors pending deployment") | |
| @Parameter( | |
| name = "includeNext", | |
| description = "Include collectors pending deployment", | |
| required = false) |
Proposed changes
Related issues
Related issue