mcgilman opened a new pull request, #11244: URL: https://github.com/apache/nifi/pull/11244
…ging. # Summary [NIFI-15936](https://issues.apache.org/jira/browse/NIFI-15936) `ConnectorFlowEndpointMerger.canHandle` was never returning `true` for the actual connector flow endpoint, so cluster responses for `GET /nifi-api/connectors/{id}/flow/process-groups/{pgId}` were not being merged through `FlowMerger.mergeProcessGroupFlowDto`. The result on a multi-node cluster: per-node bulletins/statuses on the connector's flow are not aggregated into the coordinator's response, so bulletins emitted on non-coordinator nodes are not visible on the connector canvas. The endpoint URI declared by `ConnectorResource` is: https://github.com/apache/nifi/blob/main/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/ConnectorResource.java#L1755 i.e. `/connectors/{connectorId}/flow/process-groups/{processGroupId}`. The merger's pattern `/nifi-api/connectors/[a-f0-9\-]{36}/flow` was missing the trailing `/process-groups/{pgId}` segment, which under `Matcher#matches()` (whole-string match) meant `canHandle` always returned `false`. ## Change - Updated `CONNECTOR_FLOW_URI_PATTERN` in `ConnectorFlowEndpointMerger` to `/nifi-api/connectors/[a-f0-9\-]{36}/flow/process-groups/[a-f0-9\-]{36}`, mirroring the shape of `FlowMerger.FLOW_URI_PATTERN`. - The `mergeResponses` body is unchanged; it already delegates to the package-private `FlowMerger.mergeProcessGroupFlowDto`, which was the intended reuse all along. - Added `ConnectorFlowEndpointMergerTest` covering `canHandle` for: - the real connector flow URI (with and without `?uiOnly=true`), - non-`GET` methods on the same URI, - the previously-broken `/connectors/{id}/flow` shape (regression guard), - adjacent connector sub-paths (`/controller-services`, `/parameter-context`) that must keep being routed to their own mergers, - the standard `/nifi-api/flow/process-groups/{pgId}` URI (must remain owned by `FlowMerger`), - non-UUID connector and process group ids. ## Scope - nifi-api: no changes. - DTO/entity surface: no changes. - Server-side flow / aggregation logic: no changes — `getProcessGroupBulletins` already walks `findAllProcessGroups()` for descendants on the connector flow path; the bug was strictly in cluster-mode response routing. - Standalone (non-clustered) NiFi: no behavior change. - Cluster-mode NiFi: connector flow responses now flow through `FlowMerger.mergeProcessGroupFlowDto`, so per-node bulletins/statuses on the connector's flow are merged into the coordinator's response. -- 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]
