-
Notifications
You must be signed in to change notification settings - Fork 370
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
Elastic 6.3.0 support; closes #168 #169
Conversation
zipStorePath=wrapper/dists | ||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip | ||
zipStoreBase=GRADLE_USER_HOME | ||
distributionSha256Sum=6ac2f8f9302f50241bf14cc5f4a3d88504ad20e61bb98c5fd048f7723b61397e |
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.
sorry for the might be stupid question, what is this sha for?
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 copied it from upstream, I guess it's an extra check to make sure that binary downloaded is valid (probably security concerns?)
@@ -164,7 +165,9 @@ public XContentBuilder toXContent(XContentBuilder builder, Params params) throws | |||
if (modelAsString) { | |||
builder.value(rankingModel); | |||
} else { | |||
try (XContentParser parser = JsonXContent.jsonXContent.createParser(EMPTY, rankingModel)) { | |||
try (XContentParser parser = JsonXContent.jsonXContent.createParser(EMPTY, | |||
LoggingDeprecationHandler.INSTANCE, rankingModel) |
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.
again, sorry for the might be stupid question. Why this is logged as deprecated?
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 is the new signature for createParser, I suppose that now they force us to specify the deprecation policy. (this is part of elastic/elasticsearch#28504 & elastic/elasticsearch#28697)
@@ -114,7 +114,7 @@ public StoredFeature(String name, List<String> params, String templateLanguage, | |||
} | |||
|
|||
public StoredFeature(String name, List<String> params, String templateLanguage, XContentBuilder template) { | |||
this(name, params, templateLanguage, Objects.requireNonNull(template).bytes().utf8ToString(), false); | |||
this(name, params, templateLanguage, BytesReference.bytes(Objects.requireNonNull(template)).utf8ToString(), false); |
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.
should be Strings.toString
Fixes #168
Looks good 👍 smoke tested with demo on ES 6.3.1. Merging... |
Fixes #168