-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Verify that main info response returns correct product headers #73910
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
|
Pinging @elastic/es-core-features (Team:Core/Features) |
|
Build failures are because #73434 has not been backported to |
8cf8b0b to
352f276
Compare
dakrone
left a comment
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.
Thanks for working on this @swallez, I left some comments
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/test/java/org/elasticsearch/client/RestHighLevelClientTests.java
Outdated
Show resolved
Hide resolved
dakrone
left a comment
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.
LGTM, thanks for iterating on this. I left a few other minor nits but nothing major.
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
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.
Can you add a comment about how this essentially acts as a memoized method? Before fully understanding this code I assumed it was doing the version check for every request, rather than once and then return a completed future with an optional string.
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.
| return Optional.of("Elasticsearch version 6 or more is required"); | |
| return Optional.of("Elasticsearch version 6 or higher is required"); |
jbaiera
left a comment
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.
A quick note about compatibility coverage that should be addressed before merge:
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 should perform additional validation here of build_flavor and taglines.
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 think we want to do the tagline validation here as well.
Follow-up to elastic#73434 Ensures that High Level Rest Client is running against a verified Elasticsearch. When the first request is send on HLRC, a request to the info endpoint is made first to verify the product identification and version.
ec19ee3 to
115e9d1
Compare
dakrone
left a comment
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 think we need to support OSS builds here also, so we need to change the build flavor check
client/rest-high-level/src/main/java/org/elasticsearch/client/RestHighLevelClient.java
Outdated
Show resolved
Hide resolved
jbaiera
left a comment
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.
LGTM! Thanks @swallez!
dakrone
left a comment
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.
LGTM also, thanks for doing this @swallez!
|
Thank you both for your patience! Now waiting for CI to hopefully be happy and I'll hit that merge button 😉 |
Follow-up to #73434
Ensures that High Level Rest Client is running against a verified
Elasticsearch. When the first request is sent on HLRC, a request to the
info endpoint is made first to verify the product identification and
version.