Skip to content
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 spire-server entry show command #3135

Merged

Conversation

ryysud
Copy link
Contributor

@ryysud ryysud commented Jun 3, 2022

Signed-off-by: Ryuma Yoshida ryumyosh@zlab.co.jp

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality

spire-server entry show command.

Description of change

Pagination support for spire-server entry show command.

Which issue this PR fixes

Fixes #2443.

Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
@@ -15,6 +15,8 @@ import (
"golang.org/x/net/context"
)

const listEntriesRequestPageSize = 1000
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not understand what size should be defined...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a great question :) The benefit of paging the response is that in deployments with significant amounts of entries, we can exceed the gRPC message size limit (4MB). With 1000 entries, that gives us roughly 4K per entry, which seems reasonable except that SPIFFE ID's can technically be up to 2048 bytes each. I don't think we need to be too precise here. What if we just went for 500?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix: ee8ea5d

Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
Copy link
Member

@azdagron azdagron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @ryysud !

@azdagron azdagron added this to the 1.3.2 milestone Jun 8, 2022
@azdagron azdagron merged commit aaec611 into spiffe:main Jun 8, 2022
@ryysud ryysud deleted the pagenation-support-for-entry-show-commnad branch June 10, 2022 05:14
stevend-uber pushed a commit to stevend-uber/spire that referenced this pull request Oct 16, 2023
…3135)

Signed-off-by: Ryuma Yoshida <ryumyosh@zlab.co.jp>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add pagination support for show/list spire-server CLI commands that use List APIs
2 participants