Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[function] Function endpoint admin/v3/functions/{tenant}/{namespace} …
…always returns 404 (apache#6767) Fix apache#6839 ### Motivation The V3 endpoint that returns a list of all functions in a namespace always returns 404. The V2 version of the endpoint returns the actual list of functions in the namespace. It looks like during the switch from V2 to V3, the implementation for the endpoint was missed. This endpoint is part of the current API [documentation](https://pulsar.apache.org/functions-rest-api/?version=2.5.0#operation/listFunctions), so I don't think it was removed intentionally. This endpoint is also used by the pulsar-admin command, so that always returns 404: ``` pulsar-admin functions list --tenant chris-kafkaesque-io --namespace local-useast2-aws HTTP 404 Not Found Reason: HTTP 404 Not Found ``` ### Modifications I have added the endpoint to `FunctionsApiV3Resource.java`. It is essentially a clone of the V2 version. ### Verifying this change This is a pretty small change. I have confirmed that the V3 version of the endpoint now returns the same list of functions as the V2 version. I have also confirmed that the pulsar-admin command now works: ``` bin/pulsar-admin functions list --tenant chris-kafkaesque-io --namespace TTL 23:45:10.763 [main] INFO org.apache.pulsar.common.util.SecurityUtility - Found and Instantiated Bouncy Castle provider in classpath BC "exclaim" "pulsar-functions-0.1" ```
- Loading branch information