-
Notifications
You must be signed in to change notification settings - Fork 66
API: /namedspaces/{userName} to support all spaces #1628
Comments
But what if there are 2000+ spaces? Uncontrolled result size may kill the UI, right? Are UI ready to handle 2000-space list as a response from backend? Yes? Then what about 3 000? 10 000? No? Then set page limit to 2000. Paginating is not a limitation. It just gives you some control over the result size. |
Setting a page limit of 2000 is a temporary workaround, until the APIs support sort and filtering. The main reason we need all the user's spaces is so the UI can apply sort and filtering properly. When data is paginated, the sorting and filtering client-side fails. With paginated data, the API should perform sort and filtering server-side. |
What if there are 10 000 spaces in the response? Will UI handle it properly? |
Do we really expect a single user to own 10k spaces? I'm not speaking about all spaces across the system, only those owned by a given user. That's not my point, however. Regardless how the data is obtained, it all has to be sorted and filtered together. I simply want a single user's spaces so the UI can sort and filter client-side. That is, until the APIs are able support server-side sort and filter. Otherwise, the client-side sort and filter may fail without all the necessary data -- can't sort/filter spaces that have yet to load. I thought this could be a compromise. That is, a temporary workaround until the APIs can be enhanced? If the API cannot provide all the user's spaces, then can the API please add support for sort and filtering? |
It sounds reasonable to me but I would like @aslakknutsen to reply too. |
That's a bug if anything... |
Replaced by #1627 |
The existing /namedspaces/{userName} API only supports paginated data. For the new my spaces page, I need to obtain all spaces for a given user in order to apply a filter and sort.
I've tried omitting page[limit] and using -1, but that defaults to 20 items. The alternative is to set a page limit of 2000, which is a short term workaround, but doesn't scale.
I expected this to behave more like the /spaces/{spaceID}/codebases API. That is, when page[limit] is omitted, all codebases are returned for the given space.
Note that the SpaceService.getSpacesByUser method of ngx-fabric8-wit should also be updated to provide all spaces instead of defaulting to 20 items.
The text was updated successfully, but these errors were encountered: