You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Matt Gilman (Jira)" <ji...@apache.org> on 2026/09/28 16:35:00 UTC

[jira] [Created] (NIFI-16400) Add troubleshooting route guards, banners, and live state synchronization

Matt Gilman created NIFI-16400:
----------------------------------

             Summary: Add troubleshooting route guards, banners, and live state synchronization
                 Key: NIFI-16400
                 URL: https://issues.apache.org/jira/browse/NIFI-16400
             Project: Apache NiFi
          Issue Type: Task
          Components: Core UI
            Reporter: Matt Gilman


h2. Background

Advanced connector pages and canvas editing are valid only while a connector is in TROUBLESHOOTING. The frontend must enforce that requirement for direct navigation, clearly identify the active mode, and react when the connector state changes during an open session.

Without synchronized connector-state polling and route protection, users can remain on an editing page after troubleshooting ends or access an advanced route through a stale deep link.

h2. Goals

* Guard troubleshooting-only routes.
* Display a persistent troubleshooting banner on affected pages.
* Keep the current connector entity synchronized with backend state.
* Enable or disable canvas editing when troubleshooting starts or ends.
* Refresh affected data after troubleshooting ends.
* Fail closed when connector state cannot be confirmed.

h2. Scope

h3. Troubleshooting Route Guard

* Add a functional route guard for troubleshooting-only connector routes.
* Read the connector identifier and process-group identifier from inherited route parameters.
* Use a matching connector entity from state when available.
* Fetch the connector entity when state is missing or belongs to another connector.
* Allow activation only when the connector is in TROUBLESHOOTING.
* Return a UrlTree redirect instead of cancelling navigation.
* Support contextual redirect destinations for canvas and Controller Service routes.
* Redirect safely when route parameters are missing or the connector request fails.
* Store a successfully fetched connector entity for downstream resolvers and components.

h3. Guarded Routes

Apply the guard to advanced editing routes, including:

* Processor advanced UI.
* Controller Service advanced UI.
* Future per-component editing routes that require troubleshooting mode.

Each guarded route must declare the appropriate in-context redirect destination.

h3. Troubleshooting Banners

* Display a non-dismissible caution banner on the connector canvas while troubleshooting is active.
* Display the same troubleshooting context on the connector-scoped Controller Services page.
* Explain that changes are limited to the troubleshooting session and may be reverted when the session ends.
* Hide the banner outside troubleshooting mode.
* Preserve existing error-banner behavior.

h3. Connector Entity Synchronization

* Load the connector entity when the connector canvas initializes.
* Refresh the connector entity alongside connector flow polling.
* Start connector-entity polling on sibling advanced pages where the canvas is not mounted.
* Stop polling when the page is destroyed.
* Avoid duplicate polling loops and stale cross-connector state.

h3. State Transition Handling

React to connector state edges for the same connector:

* Initial load: configure canvas editing from the current connector state.
* Enter troubleshooting: enable editing without unnecessarily reloading the flow.
* End troubleshooting: disable editing, reload the current flow, and show confirmation.
* Steady state: avoid redundant state updates while correcting any canvas configuration drift.
* Connector change: treat the new connector as an initial load instead of a troubleshooting transition.

User-driven refresh after ending troubleshooting must not be dropped by polling throttles.

h3. Tests

Add coverage for:

* Warm-state guard activation.
* Cold deep-link connector loading.
* Redirects for non-troubleshooting connectors.
* Context-specific redirect destinations.
* Missing route parameters.
* Connector loading failures.
* Banner visibility.
* Initial editing configuration.
* Enter and end transition edges.
* Flow reload after ending troubleshooting.
* Cross-connector navigation.
* Polling startup, refresh, and teardown.
* Avoidance of redundant steady-state updates.

h2. Out of Scope

* Component run-status operations.
* Processor advanced UI implementation.
* Controller Service mutation operations.
* Alignment, Remote Process Group refresh, and provenance replay.
* Changes to backend troubleshooting lifecycle behavior.
* Changes to connector action availability.

h2. Acceptance Criteria

* Troubleshooting-only routes cannot activate unless the connector is in TROUBLESHOOTING.
* Cold deep links validate connector state through one backend request.
* Denied navigation redirects to the appropriate canvas or Controller Services page.
* Connector loading failures deny access and surface through existing error handling.
* The connector canvas and Controller Services page display a troubleshooting banner only while the mode is active.
* Canvas editing is enabled only while troubleshooting is active.
* Ending troubleshooting disables editing and refreshes the current flow.
* Connector state polling keeps open pages synchronized with backend changes.
* Polling stops when the owning page is destroyed.
* Cross-connector navigation does not produce false enter or exit transitions.
* Existing selection, navigation, polling, and error behavior remains unchanged.
* Frontend lint, strict type-check, unit tests, and production build pass.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)