NIFI-16156: Add connector-scoped Controller Service GET so View Canva… - #11487
Open
mcgilman wants to merge 1 commit into
Open
NIFI-16156: Add connector-scoped Controller Service GET so View Canva…#11487mcgilman wants to merge 1 commit into
mcgilman wants to merge 1 commit into
Conversation
…s Go To Service works without Troubleshooting. - Adding response merging for the Controller Service endpoints.
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.
…s Go To Service works without Troubleshooting.
NIFI-16156: Add connector-scoped Controller Service GET so View Canvas Go To Service works without Troubleshooting
Problem
The "Go To Service" affordance on the property table needs to resolve a Controller Service by ID before it can navigate to it. For services managed by a Connector, the only existing lookup was
GET /controller-services/{id}, which is gated so that it only succeeds while the Connector is in Troubleshooting mode. As a result, "Go To Service" was non-functional for Connector-managed services when viewing the canvas normally (outside Troubleshooting).Changes
Backend (
nifi-web-api)GET /connectors/{id}/controller-services/{controllerServiceId}toConnectorResource, authorized viaREADon the Connector resource (not the underlying service), and resolved throughlocateConnectorControllerServiceso it bypasses the Troubleshooting gate — mirroring the pattern already established for connector-scoped Controller Service state (NIFI-15549).uiOnly=truequery param, stripping non-UI-relevant fields the same wayControllerServiceResource.getControllerServicedoes.NiFiServiceFacade.getConnectorControllerService/StandardNiFiServiceFacadeimplementation.Cluster response merging (
nifi-framework-cluster)ControllerServiceEndpointMerger, so GET responses across cluster nodes are properly merged (validation status/errors, bulletins, referencing-component permissions) instead of an arbitrary node's response being returned unmerged.GET /connectors/{id}/flow/process-groups/{processGroupId}/controller-services) had no merger registered either; added its pattern to the existingControllerServicesEndpointMerger.Toolkit client
ConnectorClient.getControllerService/JerseyConnectorClientimplementation for the new endpoint.Frontend (
nifi-frontend, upstream only)connector.service.ts: addedgetControllerService(connectorId, controllerServiceId).connector-canvas.effects.tsandconnector-controller-services.effects.ts: wiredgoToServiceto call the new connector-scoped endpoint, then dispatchnavigateToControllerServiceand close the dialog.takeUntil(dialogRef.afterClosed())rather than the service's lifetime, so it doesn't outlive the dialog.Testing
TestConnectorResource: new endpoint success,uiOnly=true, and not-authorized cases.StandardNiFiServiceFacadeTest: not-found case for the new facade method.ControllerServiceEndpointMergerTest/ControllerServicesEndpointMergerTest:canHandlecoverage for the connector-scoped patterns (including negative cases for malformed UUIDs, wrong HTTP method, and non-matching sub-paths).connector-canvas.effects.spec.ts/connector-controller-services.effects.spec.ts: success (fetch → navigate → close), HTTP error (banner error), and missing-connector-id (banner error, no HTTP call) cases forgoToServicein both dialogs.