NIFI-15937: Adding support for polling in the connector canvas.#11246
Merged
Conversation
rfellows
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
NIFI-15937
The Connector canvas previously loaded the flow once on mount and only refreshed in response to user-initiated navigation or actions. As a result, server-side changes that happen passively — bulletins emitted by managed components, queue counts as data flows through, processor run-status transitions — did not appear on the canvas until the user navigated away and back. This change introduces a polling loop modeled on the flow designer's reload pattern so the connector canvas reflects server state without manual interaction.
Behavior
startConnectorCanvasPollingaction is dispatched fromConnectorCanvasComponent#ngOnInit, and a matchingstopConnectorCanvasPollingis dispatched fromngOnDestroy. The polling effect drives a 30 second interval and tears down on the stop action so polling never outlives the canvas.reloadConnectorFlowaction sits between the polling source andloadConnectorFlow. Its effect throttles to one reload per second, resolves the connector id and process group id from canvas state (rather than the route, which can race a navigation), and skips work if the canvas has not yet completed an initial load. This mirrors the flow designer'sreloadFlowindirection and keeps the polling source decoupled from which group is currently mounted.DocumentVisibility.Visibleso background tabs do not generate load, and onloadingStatus !== 'loading'so a polling reload cannot cancel a user-initiated process group navigation. Without the loading guard the load effect'sswitchMapwould replace the in-flight navigation load with a load of the previously-rendered group, leaving the URL and canvas out of sync.lastReloadtimestamp debounces rapid tab switches so they do not each force a fresh load.Test coverage
connector-canvas.effects.spec.tsandconnector-canvas.component.spec.tsare extended to cover the new polling lifecycle (start dispatched on init, stop dispatched on destroy, throttle behavior onreloadConnectorFlow, document-visibility wake-up paths above and below the 30 s threshold, transitions to hidden), as well as a handful of pre-existing coverage gaps that surfaced while writing the polling tests (refreshAfterQueueEmptied$all-queues-emptied path and missing-connectorIdguard,viewComponentConfiguration$entity-without-operatePermissionsfallback,navigateToProvenanceForComponent$funnel back-navigation,viewProcessorStateAction#canClearDisabled / Invalid / missing-status branches,canDrain/canCancelDrainpredicate matrix, andreturnToConnectorListingrouter navigation).