Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Auth Manager API part 1: HTTPRequest, HTTPHeader #11769
Auth Manager API part 1: HTTPRequest, HTTPHeader #11769
Changes from 2 commits
7db53d8
e486e0d
0449744
d9a05fb
4c0e650
56ff7b2
ca6eb1e
2848e42
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Shouldn't this be
Set<HTTPHeader>
? This would also take care of cases where there are actualy k/v duplicates (which we don't appear to handle)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.
I feel like we should also annotate this as
@NotNull
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.
I don't see a
@NotNull
annotation available in iceberg-core? Besides, the immutable generated class is annotated with@AllParametersAreNonNullByDefault
.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.
@danielcweeks
@NotNull
shouldn't be needed here, because everything not marked as@Nullable
or Optional is implicitly not null with ImmutablesThere 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.
All these methods will be useful later.
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.
do we actually have a use case for this? I see the value in having
asMap()
/asSimpleMap()
but I feel like we don't need this method atm?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.
This one will be very useful later to do things like this in
HTTPClient
: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.
Same here, set
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.
we might want to consider naming this (and the other method)
withHeaderIfAbsent()
to clearly indicate that (potentially) a new instance is returned becauseadd
in the name suggests that the existing object is modifiedThere 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.
same as I mentioned above. Do we actually have a use case for a bunch of these static methods? I would try to keep those to the amount we actually need
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.
If the methods are tested, is that a big deal? This one indeed has no usage today, but more auth managers in the future could use it.
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.
The Iceberg project typically tries to only add things to APIs that are needed for current use cases instead of planning for potential use cases that may or may not actually exist/happen (independent of whether there are tests for unused methods or not).
You also have to keep in mind that everything that's being added to
iceberg-core
can't be easily changed without going through an API deprecation cycle, so we're trying to be mindful about what's really required in terms of APIsThere 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.
Fair enough, let's remove all the static methods for now.