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

Elastic 6.3.0 support; closes #168 #169

Merged
merged 2 commits into from
Jul 13, 2018
Merged

Elastic 6.3.0 support; closes #168 #169

merged 2 commits into from
Jul 13, 2018

Conversation

nomoa
Copy link
Collaborator

@nomoa nomoa commented Jun 22, 2018

Fixes #168

zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
distributionSha256Sum=6ac2f8f9302f50241bf14cc5f4a3d88504ad20e61bb98c5fd048f7723b61397e
Copy link
Collaborator

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?

Copy link
Collaborator Author

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)
Copy link
Collaborator

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?

Copy link
Collaborator Author

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);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should be Strings.toString

@softwaredoug softwaredoug self-assigned this Jul 13, 2018
@softwaredoug
Copy link
Collaborator

Looks good 👍 smoke tested with demo on ES 6.3.1. Merging...

@softwaredoug softwaredoug changed the title Elastic 6.3.0 support Elastic 6.3.0 support; closes #168 Jul 13, 2018
@softwaredoug softwaredoug merged commit 7bfb7a3 into master Jul 13, 2018
@softwaredoug softwaredoug deleted the es-6.3-support branch July 13, 2018 14:52
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.

3 participants