-
Notifications
You must be signed in to change notification settings - Fork 455
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
Add pagination support for show/list spire-server CLI commands that use List APIs #2443
Comments
@rturner3 aren't we already paginating the response from the server API and then using the same for listings? |
In order for the server to use pagination, the client needs to set the See ListAgents and ListEntries handlers for reference. |
The page size should depend on the approximated maximum size of each entity represented as a serialized protobuf message. Taking ListAgentsResponse as one example, we need to consider the maximum number of bytes it may take to represent an Agent, and the maximum size of a page token (size of a UUID represented as a string). The page token in the request message is directly copied from the previous response message, e.g. for |
The |
When using the spire-server CLI to fetch data via SPIRE Server APIs with commands like
entry show
oragent list
, if the amount of data returned by the SPIRE Server APIs exceeds the gRPC default max response size of 4 MB, the entire command fails to execute.For larger scale environments, this greatly reduces the usefulness of these CLI commands, since many times the command fails due to too much data being returned by the Server. It would be very helpful in such cases if these CLI commands used pagination in their Server API requests so that the data can actually be presented to the user, since the Server APIs are implemented with gRPC and are not otherwise easy to invoke without writing a custom application.
The text was updated successfully, but these errors were encountered: