bbende commented on a change in pull request #5630:
URL: https://github.com/apache/nifi/pull/5630#discussion_r787984172
##########
File path:
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/api/FlowResource.java
##########
@@ -1358,6 +1359,41 @@ public Response getReportingTaskTypes(
return generateOkResponse(entity).build();
}
+ @GET
+ @Consumes(MediaType.WILDCARD)
+ @Produces(MediaType.APPLICATION_JSON)
+ @Path("runtime-manifest")
+ @ApiOperation(
+ value = "Retrieves the runtime manifest for this NiFi instance.",
+ notes = NON_GUARANTEED_ENDPOINT,
+ response = RuntimeManifest.class,
+ authorizations = {
+ @Authorization(value = "Read - /flow")
+ }
+ )
+ @ApiResponses(
+ value = {
+ @ApiResponse(code = 400, message = "NiFi was unable to
complete the request because it was invalid. The request should not be retried
without modification."),
+ @ApiResponse(code = 401, message = "Client could not be
authenticated."),
+ @ApiResponse(code = 403, message = "Client is not
authorized to make this request."),
+ @ApiResponse(code = 409, message = "The request was valid
but NiFi was not in the appropriate state to process it. Retrying the same
request later may be successful.")
+ }
+ )
+ public Response getRuntimeManifest() throws InterruptedException {
+
+ authorizeFlow();
+
+ if (isReplicateRequest()) {
+ return replicate(HttpMethod.GET);
+ }
Review comment:
I stand corrected about the existing "types" end-points, they do
actually perform replication and response merging. The idea is to provide a
consistent response to a client with the intersection of the types in case one
node has some NARs that another node doesn't have.
I pushed another commit that adds a response merger for the
runtime-manifest. Right now the logic is to just perform the intersection of
the bundles based on their unique group-artifact-version. To test this you can
run a cluster and remove a NAR from one of the nodes and it should no longer
show up in the manifest 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]