[
https://issues.apache.org/jira/browse/NIFI-16488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18142126#comment-18142126
]
ASF subversion and git services commented on NIFI-16488:
--------------------------------------------------------
Commit 0e1e7f1c92b69077e25ca12bb96631bb020cdb6c in nifi's branch
refs/heads/main from Matt Gilman
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=0e1e7f1c92b ]
NIFI-16488 Add component creation and deletion to the Connector canvas (#11900)
* NIFI-16488 Add component creation and deletion to the Connector canvas
- create processors, ports, process groups, remote process groups, funnels,
labels, and connections on the Connector canvas while the Connector is in
Troubleshooting and writable
- delete the selection from the context menu or the Delete key, skipping
components that cannot be deleted and removing outgoing connections of deleted
components
- reload the endpoints of a connection after it is created, deleted, or moved
to a new destination
- reconcile created components with any copy a poll already added
- enable canvas editing from the Connector's current Troubleshooting state
- move the new canvas item chip to ui/common so it emits outputs, and update
the flow designer header to use it
- extract the Connector canvas context menu into a service
- keep selection and double-click ahead of drag on funnels, ports, process
groups, remote process groups, and connection labels
- keep a connection label on the same bend point when bend points are added or
removed, and attach the label drag once so it works after the label is selected
- validate dynamic path segments in create and delete requests
* NIFI-16488 Addressing review feedback
This closes #11900
> 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
> Assignee: Matt Gilman
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> 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)