databricks-sdk-go icon indicating copy to clipboard operation
databricks-sdk-go copied to clipboard

[ISSUE] `Users.ListAll` takes `Count` into account if it's specified in the request

Open alexott opened this issue 2 years ago • 4 comments

Description

The Users.ListAll of both account & workspace clients is returning only Count entries if it's specified in the request instead of paginating using the given information. Lack of pagination leads to SCIM backend overload on workspaces with big number of users.

Expected behavior

ListAll should fetch all users with a given Count attribute.

Other Information

  • OS: mac
  • Version: 0.22.0

Additional context Add any other context about the problem here.

alexott avatar Oct 06 '23 08:10 alexott

There’s a PR to ignore pagination-related fields for iterators. And there’s discussion either or not we do “virtual iteration” for scim lists

nfx avatar Oct 06 '23 09:10 nfx

The underlying issue is actually wrong iterator construction, described in #704.

tcesnik-veza avatar Nov 23 '23 09:11 tcesnik-veza

@tcesnik-veza this issue existed before the change to using Iterators, but I'll make sure it is fixed soon.

mgyucht avatar Nov 23 '23 09:11 mgyucht

@alexott as of release v0.26.0, the SCIM APIs do paginate by default, so you don't need to specify Count anymore (it will default to 100 users/groups/SPs), but the existing behavior of the Count field determining the total number of items to return has not changed.

mgyucht avatar Nov 29 '23 14:11 mgyucht