-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE] listSecrets returns null if no secrets are found in a scope #197
Comments
Thanks for reporting this! We'll take a look. Just to confirm, is listSecrets() itself returning |
@mgyucht I believe I was printing the returned iterable and it was null. It appeared to be behaving differently to other list() calls as I normally convert it to a stream using:
but it was failing as it was null. I can't check right now to be certain sorry! |
@mgyucht |
Thanks for this. I've identified the root cause and made a PR to address it: #266. |
## Changes Currently, non-paginated list APIs in the Java SDK simply return the field in the response with the listed items. However, when there are no items in the collection being listed. This PR changes all list APIs to return a Paginator so that the API response is never `null`. Resolves #197. ## Tests Tested listing clusters using an SP with no access to any clusters, which passed: ``` 10:12 [DEBUG] > GET /api/2.0/clusters/list < 200 OK < { } ```
## Changes Currently, non-paginated list APIs in the Java SDK simply return the field in the response with the listed items. However, when there are no items in the collection being listed. This PR changes all list APIs to return a Paginator so that the API response is never `null`. Resolves databricks#197. ## Tests Tested listing clusters using an SP with no access to any clusters, which passed: ``` 10:12 [DEBUG] > GET /api/2.0/clusters/list < 200 OK < { } ```
Description
If I make a call to get a list of secrets in a scope, it returns null if no secrets are found.
Reproduction
Returns null if no secrets are found
Returns a secret if a secret is found
Expected behavior
An empty result instead of null.
Is it a regression?
Unknown.
Other Information
The text was updated successfully, but these errors were encountered: