Matt Gilman created NIFI-16488:
----------------------------------
Summary: Add component creation and deletion to connector
troubleshooting canvas
Key: NIFI-16488
URL: https://issues.apache.org/jira/browse/NIFI-16488
Project: Apache NiFi
Issue Type: Task
Components: Core UI
Reporter: Matt Gilman
h2. Background
The connector troubleshooting canvas supports connection creation and several
component mutations, but it does not yet support general canvas component
creation and deletion.
NIFI-16449 establishes reusable, output-driven Create/Edit dialogs. The
connector canvas needs to consume those shared dialogs through connector-owned
actions, effects, services, permissions, and error handling.
Optimistic reconciliation must also handle create-then-delete sequences safely.
A component identifier can otherwise remain in both the added and removed
caches, allowing an older server snapshot to resurrect a deleted component.
h2. Goals
* Allow supported canvas components to be created during connector
troubleshooting.
* Allow supported selected components to be deleted during connector
troubleshooting.
* Reuse shared output-driven dialogs without coupling them to connector state.
* Keep connector-scoped persistence and error handling in connector effects.
* Prevent stale snapshots from removing new components or resurrecting deleted
components.
* Preserve read-only behavior outside troubleshooting mode.
h2. Scope
h3. Component Creation
Support creation of applicable canvas component types using the shared dialogs
introduced by NIFI-16449:
* Processor.
* Input Port.
* Output Port.
* Process Group.
* Remote Process Group.
* Funnel.
* Label.
* Connection.
For each supported component:
* Open the shared dialog from connector-canvas effects.
* Translate dialog output into typed connector actions.
* Use connector-scoped service endpoints.
* Use the local revision client identifier.
* Add successful responses to the appropriate typed collection.
* Track the created identifier until a server snapshot acknowledges it.
* Surface failures through the connector canvas error context.
h3. Component Deletion
* Add deletion actions for supported canvas selections.
* Require active troubleshooting and applicable write permissions.
* Use typed snippet or component deletion requests.
* Remove successfully deleted entities and related connections from local state.
* Track deleted identifiers until a server snapshot confirms their absence.
* Restore or reload state after failure.
* Preserve existing dependency and confirmation behavior where applicable.
h3. Snapshot Reconciliation
* Prevent stale snapshots from removing locally created entities.
* Prevent stale snapshots from restoring locally deleted entities.
* Handle create-then-delete sequences for the same identifier.
* Ensure acknowledgement of one operation cannot invalidate a newer operation
for the same identifier.
* Suppress stale connections whose source or destination has been removed.
* Keep operation tracking bounded and clear it on navigation or canvas reset.
h3. Tests
Add coverage for:
* Creation of every supported component type.
* Deletion of single and multiple selected components.
* Troubleshooting-state and permission gating.
* Successful and failed create/delete requests.
* Repeated stale snapshots.
* Snapshot acknowledgement of creation and deletion.
* Create followed by delete before polling catches up.
* Out-of-order snapshots that must not resurrect deleted entities.
* Connections attached to deleted components.
* Navigation and reset cleanup.
* Continued read-only behavior outside troubleshooting.
h2. Dependencies
* NIFI-16447
* NIFI-16449
h2. Out of Scope
* General component configuration editing.
* Component run-status operations.
* Controller Service management.
* Changes to backend creation or deletion semantics.
* Migration of the legacy flow-designer canvas.
h2. Acceptance Criteria
* Supported components can be created only during troubleshooting and with the
required permissions.
* Supported selections can be deleted only during troubleshooting and with the
required permissions.
* Shared dialogs emit intent and do not dispatch connector-specific actions.
* Connector actions, effects, and services own persistence and error handling.
* Successful mutations update the correct typed collections.
* Failed mutations restore or reload consistent canvas state.
* Repeated stale snapshots cannot remove a new component.
* Repeated stale snapshots cannot restore a deleted component.
* A create-then-delete sequence cannot resurrect the deleted entity.
* Stale attached connections are not restored.
* Frontend lint, strict type-check, unit tests, and production build pass.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)