-
Notifications
You must be signed in to change notification settings - Fork 330
feat: enforce LIST_PAGINATION_ENABLED #2401
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
Conversation
| return PageTokenUtil.decodePageRequest(serializedPageToken, requestedPageSize); | ||
| @Nullable String serializedPageToken, | ||
| @Nullable Integer requestedPageSize, | ||
| Supplier<Boolean> shouldDecodeToken) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this a Supplier? None of the call sites is really "dynamic".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not called when the token is null, so it avoids touching the config look up in most cases... I'm fine with an unconditional config lookup too. What is preferable from your POV?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, neither getResolvedCatalogEntity nor getConfig are really simple.
Mind making this at least a Predicate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Predicate is a one-argument function, but here we just need to have a deferred getter for a simple boolean 🤔
Updated to BooleanSupplier. WDYT?
The enforcement of the LIST_PAGINATION_ENABLED flag was missed in apache#1938. This change make the flag effective as discussed in apache#2296. Note: this causes a change in the default Polaris behaviour (no pagination by default) with respect to the previous state of `main`. However, there is no behaviour change with respect to 1.0.0 or 1.0.1 as previous releases did not have apache#1938.
Correct method args (follow-up to apache#2401)
Correct method args (follow-up to #2401)
The enforcement of the LIST_PAGINATION_ENABLED flag was missed in #1938. This change make the flag effective as discussed in #2296.
Note: this causes a change in the default Polaris behaviour (no pagination by default) with respect to the previous state of
main. However, there is no behaviour change with respect to 1.0.0 or 1.0.1 as previous releases did not have #1938.