mcgilman opened a new pull request, #11983: URL: https://github.com/apache/nifi/pull/11983
…nd Flow Designer menu parity to the connector canvas Align - Add Align Horizontally/Vertically to the connector canvas context menu while troubleshooting, resolving connection endpoints through the owning group so bends on connections to child and remote process group ports move correctly Remote Process Groups - Add Refresh Remote for Remote Process Groups while troubleshooting, polling until flowRefreshed changes and then reloading the attached connections - End a refresh session when polling stops, the canvas resets, the canvas loads another Connector or Process Group, or the Connector leaves troubleshooting - Offer Enable Transmission and Disable Transmission instead of Start and Stop when every startable or stoppable component is a Remote Process Group - Include Remote Process Groups in a Connector's managed flow when the framework refreshes and reinitializes remote groups, so a Connector's Remote Process Group receives its remote ports without a manual refresh Provenance replay - Hide provenance replay on the connector canvas outside troubleshooting and drop replay requests if the Connector has since left troubleshooting - Check the owning Connector's troubleshooting state before offering or submitting a replay from the provenance event listing Context menu - Add View Status History for processors, connections, process groups, and Remote Process Groups, and for the current group from the canvas background, using the Connector status history endpoints - Add Clear Bulletins for components and the current group while troubleshooting - Add Go To for a Remote Process Group with a target URI - Order the component and canvas menus to match the Flow Designer <!-- Licensed to the Apache Software Foundation (ASF) under one or more --> <!-- contributor license agreements. See the NOTICE file distributed with --> <!-- this work for additional information regarding copyright ownership. --> <!-- The ASF licenses this file to You under the Apache License, Version 2.0 --> <!-- (the "License"); you may not use this file except in compliance with --> <!-- the License. You may obtain a copy of the License at --> <!-- http://www.apache.org/licenses/LICENSE-2.0 --> <!-- Unless required by applicable law or agreed to in writing, software --> <!-- distributed under the License is distributed on an "AS IS" BASIS, --> <!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. --> <!-- See the License for the specific language governing permissions and --> <!-- limitations under the License. --> # Summary [NIFI-16403](https://issues.apache.org/jira/browse/NIFI-16403) Brings the Connector canvas context menu closer to the Flow Designer. While a Connector is in troubleshooting mode, users can align components, refresh Remote Process Groups, clear bulletins, view status history and open a Remote Process Group's target. Provenance replay is limited to troubleshooting mode. On the server, Connector-managed Remote Process Groups now take part in the framework's background refresh. ## Align - Adds Align Horizontally and Align Vertically while troubleshooting. Endpoints of connections to child and Remote Process Group ports resolve through the group that owns them, so bend points on those connections move correctly. - Hidden while a save is in progress. ## Remote Process Groups - Adds Refresh Remote while troubleshooting. It polls the Remote Process Group every 3 seconds until `flowRefreshed` changes, then reloads the connections attached to it. - A refresh session ends when: - polling stops or the canvas resets; - the canvas loads another Connector or Process Group; - the Connector leaves troubleshooting; - the remote has not refreshed after 20 polls, which shows a banner. - When a session ends or is replaced, a Remote Process Group still showing "Refreshing..." gets its original timestamp back. Responses from a replaced session are ignored. - Offers Enable Transmission and Disable Transmission instead of Start and Stop when every startable or stoppable component is a Remote Process Group. - Adds Go To for a readable Remote Process Group with a target URI. - Server: `FlowController` now includes the Remote Process Groups in each Connector's active flow when it refreshes remote groups in the background and when it reinitializes them on a clustering change. A Connector's Remote Process Group now receives its remote ports without a manual refresh. ## Provenance replay - Replay on the Connector canvas is offered only in troubleshooting, from both the event dialog and the graph controls preview. - If the Connector has left troubleshooting by the time Replay is clicked, the user sees "Replay is only available while the connector is in troubleshooting." The replay is not submitted. - The provenance event listing checks the owning Connector's troubleshooting state before offering a replay and again before submitting it. ## Context menu - View Status History: - for processors, connections, Process Groups and Remote Process Groups; - for the current group, from the canvas background; - uses the Connector status history endpoints, so it is available whether or not the Connector is in troubleshooting. - Clear Bulletins, while troubleshooting, matching the Flow Designer: - for a single selected component the user can write; - for the current group, from the canvas background. - Orders the component and canvas menus to match the Flow Designer. ## Testing - Unit tests cover the new menu conditions, commands, effects, reducers and services, including the Remote Process Group refresh session lifecycle and the poll limit. - `nx test nifi`, `nx lint nifi`, `nx build nifi` and Prettier pass. - `FlowControllerTest` passes, as do `checkstyle:check` and `pmd:check` for `nifi-framework-core`. - Manually verified against a Connector containing Remote Process Groups, run in and out of troubleshooting mode. ## Follow-up work (not in this PR) - [NIFI-16651](https://issues.apache.org/jira/browse/NIFI-16651): Flow Designer actions still missing on the Connector canvas for every component type: - Copy and Paste (Ctrl+C and Ctrl+V) - Group, and Move To Parent Group - Bring To Front, Change Color and Change Version - Go To Source and Go To Destination, and View Documentation - Stop Sources, and Enable or Disable All Controller Services - The Ctrl+A and arrow-key shortcuts - The ticket also lists Flow Designer entries to evaluate for Connector-managed flows, including View Backlog, View Connections, Replay Last Event, Access Policies, Parameters and version control. - [NIFI-16642](https://issues.apache.org/jira/browse/NIFI-16642): Manage Remote Ports for Remote Process Groups on the Connector canvas. - Enforce the troubleshooting requirement for provenance replay of Connector-managed components on the server. This PR enforces it only in the UI. # Tracking Please complete the following tracking steps prior to pull request creation. ### Issue Tracking - [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created ### Pull Request Tracking - Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000` - Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000` - Pull request contains [commits signed](https://docs.github.com/en/authentication/signing-commits) with a registered key indicating `Verified` status ### Pull Request Formatting - Pull Request based on current revision of the `main` branch - Pull Request refers to a feature branch with one commit containing changes # Verification Please indicate the verification steps performed prior to pull request creation. ### Build - [ ] Build completed using `./mvnw clean install -P contrib-check` - [ ] JDK 21 - [ ] JDK 25 ### Licensing - [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html) - [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files ### Documentation - [ ] Documentation formatting appears as expected in rendered files -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
