You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "mcgilman (via GitHub)" <gi...@apache.org> on 2026/03/13 17:28:38 UTC

[PR] NIFI-15714: Updating the logic to locate components within Connectors… [nifi]

mcgilman opened a new pull request, #11005:
URL: https://github.com/apache/nifi/pull/11005

   … 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()` and `rootGroup.findRemoteGroupPort()`, which only search the root process group hierarchy and cannot reach the isolated process groups managed by connectors.
   
   ## What's Changed
   - Added `findConnectionIncludingConnectorManaged()` and `findRemoteGroupPortIncludingConnectorManaged()` public methods to `FlowController` that search both the root process group hierarchy and all connector-managed process groups
   - Updated `StandardProvenanceAuthorizableFactory` to use the new `FlowController` methods for connection and remote group port authorization, replacing direct `rootGroup.findConnection()` / `findRemoteGroupPort()` calls
   - Updated `ControllerFacade.setComponentDetails()` to use the new `FlowController` methods for populating provenance event DTOs with group ID, connector ID, and component name for connections and remote group ports
   - Simplified the remote group port branch in `setComponentDetails()` to obtain the process group directly from `remoteGroupPort.getProcessGroup()` instead of the roundabout `root.findProcessGroup()` lookup, which had the same connector-managed scoping issue
   - Removed the now-unused `root` variable from `setComponentDetails()`
   - Added comprehensive unit tests for `StandardProvenanceAuthorizableFactory` covering all three factory methods across root group, connector-managed, and not-found scenarios
   - Added unit tests for `ControllerFacade` covering connection, remote group port, and not-found branches of `setComponentDetails`
   
   ## Key Features
   - **Consolidated lookup logic**: Connector-aware component search is centralized on `FlowController`, eliminating duplication and providing a reusable API for future callers
   - **Null-safe connector iteration**: Both methods handle connectors with null `activeFlowContext` gracefully
   - **Consistent pattern**: All three branches in `setComponentDetails` (connectable, remote group port, connection) now obtain their process group directly from the component object


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] NIFI-15714: Updating the logic to locate components within Connectors… [nifi]

Posted by "rfellows (via GitHub)" <gi...@apache.org>.
rfellows merged PR #11005:
URL: https://github.com/apache/nifi/pull/11005


-- 
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: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org