NIFI-15714: Updating the logic to locate components within Connectors…#11005
Open
mcgilman wants to merge 1 commit intoapache:NIFI-15258from
Open
NIFI-15714: Updating the logic to locate components within Connectors…#11005mcgilman wants to merge 1 commit intoapache:NIFI-15258from
mcgilman wants to merge 1 commit intoapache:NIFI-15258from
Conversation
… when authorizing and populating provenance events.
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.
… when authorizing and populating provenance events.
NIFI-15714: Fix provenance event handling for connector-managed components
Description
Provenance event authorization and DTO enrichment failed with a 404 ("The component that generated this event is no longer part of the data flow") for connections and remote group ports belonging to connector-managed process groups. This occurred because the existing lookups used
rootGroup.findConnection()androotGroup.findRemoteGroupPort(), which only search the root process group hierarchy and cannot reach the isolated process groups managed by connectors.What's Changed
findConnectionIncludingConnectorManaged()andfindRemoteGroupPortIncludingConnectorManaged()public methods toFlowControllerthat search both the root process group hierarchy and all connector-managed process groupsStandardProvenanceAuthorizableFactoryto use the newFlowControllermethods for connection and remote group port authorization, replacing directrootGroup.findConnection()/findRemoteGroupPort()callsControllerFacade.setComponentDetails()to use the newFlowControllermethods for populating provenance event DTOs with group ID, connector ID, and component name for connections and remote group portssetComponentDetails()to obtain the process group directly fromremoteGroupPort.getProcessGroup()instead of the roundaboutroot.findProcessGroup()lookup, which had the same connector-managed scoping issuerootvariable fromsetComponentDetails()StandardProvenanceAuthorizableFactorycovering all three factory methods across root group, connector-managed, and not-found scenariosControllerFacadecovering connection, remote group port, and not-found branches ofsetComponentDetailsKey Features
FlowController, eliminating duplication and providing a reusable API for future callersactiveFlowContextgracefullysetComponentDetails(connectable, remote group port, connection) now obtain their process group directly from the component object