-
Notifications
You must be signed in to change notification settings - Fork 42
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] Users.List
and other listing API using iterators do not work correctly when using Count
#704
Comments
After some more research, I can conclude that the issue #641 has the same problem, as |
Thanks for raising this. For my understanding, what is your reasoning for using |
In any case, after looking at this, I think you're right, we need to change the SCIM API definition to make this work properly. |
The main reason was basically to support rare cases with huge amounts of users, to not overload the network message size and possibly even client memory. |
@tcesnik-veza we're thinking of completely removing
default page size for SCIM is 100, meaning at most 100 users per page. How would it overload the network?.. |
I am fine with changing the high-level interface to not include |
@tcesnik-veza re: large workspaces/accounts and optimization - see the discussion here - databrickslabs/ucx#638 |
@tcesnik-veza this has been fixed in today's release of the Go SDK: default page size is 100 users/groups/service principals when listing. Please try it out and let us know if you have any feedback; otherwise, I'll close this out. |
Looks good, although haven't extensively tested it. |
Description
All the listing API that uses iterators do not allow listing of all the items, but they merely fetch just one page based on the
Count
parameter.They all contain this code:
The problem is that the last parameter in the
NewIterator
constructor is not set, so new requests cannot be created based on the responses.This makes it impossible to use the intended pattern of this API for iterating:
Reproduction
With e.g. 10 users configured on the workspace, this code only prints 2 - which is the page size configured.
Expected behavior
The code should print all users configured on the workspace.
Is it a regression?
No - tested on the last version 0.25.0.
Debug Logs
/
Other Information
/
Additional context
/
The text was updated successfully, but these errors were encountered: