Upgrade to Jackson 2.10.3 and GeoIP2 to 2.13.1 (#53576)
This commit upgrades our Jackson dependency to 2.10.3 and our GeoIP2 dependency to 2.13.1. Relates #53523
This commit is contained in:
parent
1262ab2762
commit
b7dbadeea0
|
@ -7,12 +7,8 @@ bundled_jdk = 13.0.2+8
|
||||||
# optional dependencies
|
# optional dependencies
|
||||||
spatial4j = 0.7
|
spatial4j = 0.7
|
||||||
jts = 1.15.0
|
jts = 1.15.0
|
||||||
# note that ingest-geoip has a hard-coded version; if you modify this version,
|
jackson = 2.10.3
|
||||||
# you should also inspect that version to see if it can be advanced along with
|
snakeyaml = 1.24
|
||||||
# the com.maxmind.geoip2:geoip2 dependency
|
|
||||||
jackson = 2.8.11
|
|
||||||
jacksondatabind = 2.8.11.6
|
|
||||||
snakeyaml = 1.17
|
|
||||||
icu4j = 62.1
|
icu4j = 62.1
|
||||||
supercsv = 2.4.0
|
supercsv = 2.4.0
|
||||||
# when updating log4j, please update also docs/java-api/index.asciidoc
|
# when updating log4j, please update also docs/java-api/index.asciidoc
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -49,6 +49,7 @@ forbiddenApisMain {
|
||||||
thirdPartyAudit.ignoreMissingClasses(
|
thirdPartyAudit.ignoreMissingClasses(
|
||||||
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
|
||||||
'com.fasterxml.jackson.databind.ObjectMapper',
|
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||||
|
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||||
)
|
)
|
||||||
|
|
||||||
dependencyLicenses {
|
dependencyLicenses {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -0,0 +1 @@
|
||||||
|
1ba01fef9c3b7ed388d91e71dc733b315c7374cd
|
|
@ -1 +0,0 @@
|
||||||
8b9826e16c3366764bfb7ad7362554f0471046c3
|
|
|
@ -0,0 +1 @@
|
||||||
|
ff397547ff168e77279a1cd549e2ca4923c991aa
|
|
@ -1 +0,0 @@
|
||||||
d9d1c49c5d9d5e46e2aee55f3cdd119286fe0fc1
|
|
|
@ -0,0 +1 @@
|
||||||
|
4dc1a172812d9da27c1afd6a08f4f12aad7b14dd
|
|
@ -1 +0,0 @@
|
||||||
2e77c6ff7342cd61ab1ae7cb14ed16aebfc8a72a
|
|
|
@ -1 +0,0 @@
|
||||||
7a27ea250c5130b2922b86dea63cbb1cc10a660c
|
|
|
@ -0,0 +1 @@
|
||||||
|
13a9c0d6776483c3876e3ff9384f9bb55b17001b
|
|
@ -78,14 +78,17 @@ public class XContentParserTests extends ESTestCase {
|
||||||
|
|
||||||
assertEquals(value, number.floatValue(), 0.0f);
|
assertEquals(value, number.floatValue(), 0.0f);
|
||||||
|
|
||||||
if (xContentType == XContentType.CBOR) {
|
switch (xContentType) {
|
||||||
// CBOR parses back a float
|
case CBOR:
|
||||||
assertTrue(number instanceof Float);
|
case SMILE:
|
||||||
} else {
|
assertThat(number, instanceOf(Float.class));
|
||||||
// JSON, YAML and SMILE parses back the float value as a double
|
break;
|
||||||
// This will change for SMILE in Jackson 2.9 where all binary based
|
case JSON:
|
||||||
// formats will return a float
|
case YAML:
|
||||||
assertTrue(number instanceof Double);
|
assertThat(number, instanceOf(Double.class));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new AssertionError("unexpected x-content type [" + xContentType + "]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class JsonProcessorTests extends ESTestCase {
|
||||||
|
|
||||||
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
||||||
assertThat(exception.getCause().getMessage(), containsString("Unrecognized token 'blah': " +
|
assertThat(exception.getCause().getMessage(), containsString("Unrecognized token 'blah': " +
|
||||||
"was expecting ('true', 'false' or 'null')"));
|
"was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testByteArray() {
|
public void testByteArray() {
|
||||||
|
@ -75,7 +75,12 @@ public class JsonProcessorTests extends ESTestCase {
|
||||||
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
|
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);
|
||||||
|
|
||||||
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
|
||||||
assertThat(exception.getCause().getMessage(), containsString("Unrecognized token 'B': was expecting ('true', 'false' or 'null')"));
|
assertThat(
|
||||||
|
exception.getCause().getMessage(),
|
||||||
|
containsString(
|
||||||
|
"Unrecognized token 'B': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testNull() throws Exception {
|
public void testNull() throws Exception {
|
||||||
|
|
|
@ -25,13 +25,11 @@ esplugin {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// Upgrade to 2.10.0 or higher when jackson-core gets upgraded to 2.9.x. Blocked by #27032
|
compile('com.maxmind.geoip2:geoip2:2.13.1')
|
||||||
compile('com.maxmind.geoip2:geoip2:2.9.0')
|
|
||||||
// geoip2 dependencies:
|
// geoip2 dependencies:
|
||||||
// do not hardcode this to the version in version.properties, it needs to be upgraded separately with geoip2
|
compile("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
|
||||||
compile("com.fasterxml.jackson.core:jackson-annotations:2.8.11")
|
compile("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
|
||||||
compile("com.fasterxml.jackson.core:jackson-databind:2.8.11.6")
|
compile('com.maxmind.db:maxmind-db:1.3.1')
|
||||||
compile('com.maxmind.db:maxmind-db:1.2.2')
|
|
||||||
|
|
||||||
testCompile 'org.elasticsearch:geolite2-databases:20191119'
|
testCompile 'org.elasticsearch:geolite2-databases:20191119'
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
f27d1a49d5a29dd4a7ac5006ce2eb16b8b9bb888
|
|
@ -1 +0,0 @@
|
||||||
c12b463a2c10824225c0b27952c49b464cb0e4c6
|
|
|
@ -0,0 +1 @@
|
||||||
|
0f63b3b1da563767d04d2e4d3fc1ae0cdeffebe7
|
|
@ -1 +0,0 @@
|
||||||
391de20b4e29cb3fb07d2454ace64be2c82ac91f
|
|
|
@ -0,0 +1 @@
|
||||||
|
aae92628b5447fa25af79871ca98668da6edd439
|
|
@ -1 +0,0 @@
|
||||||
35753201d0cdb1dbe998ab289bca1180b68d4368
|
|
|
@ -1 +0,0 @@
|
||||||
78c22a03de1e222b0751855aff7bb6e6db5569e5
|
|
|
@ -0,0 +1 @@
|
||||||
|
211bca628225bc0f719051b16deb03a747d7a14f
|
|
@ -36,7 +36,7 @@ dependencies {
|
||||||
compile "commons-logging:commons-logging:${versions.commonslogging}"
|
compile "commons-logging:commons-logging:${versions.commonslogging}"
|
||||||
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
||||||
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
|
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
0f63b3b1da563767d04d2e4d3fc1ae0cdeffebe7
|
|
@ -1 +0,0 @@
|
||||||
391de20b4e29cb3fb07d2454ace64be2c82ac91f
|
|
|
@ -0,0 +1 @@
|
||||||
|
aae92628b5447fa25af79871ca98668da6edd439
|
|
@ -1 +0,0 @@
|
||||||
35753201d0cdb1dbe998ab289bca1180b68d4368
|
|
|
@ -43,7 +43,7 @@ dependencies {
|
||||||
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
||||||
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
|
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
|
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
|
||||||
compile "joda-time:joda-time:${versions.joda}"
|
compile "joda-time:joda-time:${versions.joda}"
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
0f63b3b1da563767d04d2e4d3fc1ae0cdeffebe7
|
|
@ -1 +0,0 @@
|
||||||
391de20b4e29cb3fb07d2454ace64be2c82ac91f
|
|
|
@ -0,0 +1 @@
|
||||||
|
aae92628b5447fa25af79871ca98668da6edd439
|
|
@ -1 +0,0 @@
|
||||||
35753201d0cdb1dbe998ab289bca1180b68d4368
|
|
|
@ -31,7 +31,6 @@ import org.elasticsearch.test.ESTestCase;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Base64;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
@ -90,15 +89,7 @@ public class XContentParserUtilsTests extends ESTestCase {
|
||||||
|
|
||||||
public void testStoredFieldsValueBinary() throws IOException {
|
public void testStoredFieldsValueBinary() throws IOException {
|
||||||
final byte[] value = randomUnicodeOfLength(scaledRandomIntBetween(10, 1000)).getBytes("UTF-8");
|
final byte[] value = randomUnicodeOfLength(scaledRandomIntBetween(10, 1000)).getBytes("UTF-8");
|
||||||
assertParseFieldsSimpleValue(value, (xcontentType, result) -> {
|
assertParseFieldsSimpleValue(value, (xcontentType, result) -> assertArrayEquals(value, ((BytesArray) result).array()));
|
||||||
if (xcontentType == XContentType.JSON || xcontentType == XContentType.YAML) {
|
|
||||||
//binary values will be parsed back and returned as base64 strings when reading from json and yaml
|
|
||||||
assertArrayEquals(value, Base64.getDecoder().decode((String) result));
|
|
||||||
} else {
|
|
||||||
//binary values will be parsed back and returned as BytesArray when reading from cbor and smile
|
|
||||||
assertArrayEquals(value, ((BytesArray) result).array());
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testStoredFieldsValueNull() throws IOException {
|
public void testStoredFieldsValueNull() throws IOException {
|
||||||
|
|
|
@ -105,13 +105,13 @@ public class IndexingSlowLogTests extends ESTestCase {
|
||||||
final UncheckedIOException e = expectThrows(UncheckedIOException.class,
|
final UncheckedIOException e = expectThrows(UncheckedIOException.class,
|
||||||
()->new IndexingSlowLogMessage(index, doc, 10, true, 3));
|
()->new IndexingSlowLogMessage(index, doc, 10, true, 3));
|
||||||
assertThat(e, hasToString(containsString("_failed_to_convert_[Unrecognized token 'invalid':"
|
assertThat(e, hasToString(containsString("_failed_to_convert_[Unrecognized token 'invalid':"
|
||||||
+ " was expecting ('true', 'false' or 'null')\\n"
|
+ " was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\\n"
|
||||||
+ " at [Source: org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper")));
|
+ " at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper)")));
|
||||||
assertNotNull(e.getCause());
|
assertNotNull(e.getCause());
|
||||||
assertThat(e.getCause(), instanceOf(JsonParseException.class));
|
assertThat(e.getCause(), instanceOf(JsonParseException.class));
|
||||||
assertThat(e.getCause(), hasToString(containsString("Unrecognized token 'invalid':"
|
assertThat(e.getCause(), hasToString(containsString("Unrecognized token 'invalid':"
|
||||||
+ " was expecting ('true', 'false' or 'null')\n"
|
+ " was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n"
|
||||||
+ " at [Source: org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper")));
|
+ " at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper)")));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testReformatSetting() {
|
public void testReformatSetting() {
|
||||||
|
|
|
@ -44,3 +44,8 @@ dependencyLicenses {
|
||||||
shadowJar {
|
shadowJar {
|
||||||
relocate 'com.fasterxml', 'org.elasticsearch.fasterxml'
|
relocate 'com.fasterxml', 'org.elasticsearch.fasterxml'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
thirdPartyAudit.ignoreMissingClasses(
|
||||||
|
'com.fasterxml.jackson.databind.ObjectMapper',
|
||||||
|
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
|
||||||
|
)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -0,0 +1 @@
|
||||||
|
1ba01fef9c3b7ed388d91e71dc733b315c7374cd
|
|
@ -1 +0,0 @@
|
||||||
8b9826e16c3366764bfb7ad7362554f0471046c3
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -92,7 +92,8 @@ public class RemoteFailureTests extends ESTestCase {
|
||||||
public void testInvalidJson() {
|
public void testInvalidJson() {
|
||||||
IOException e = expectThrows(IOException.class, () -> parse("invalid_json.txt"));
|
IOException e = expectThrows(IOException.class, () -> parse("invalid_json.txt"));
|
||||||
assertEquals(
|
assertEquals(
|
||||||
"Can't parse error from Elasticsearch [Unrecognized token 'I': was expecting 'null', 'true', 'false' or NaN] "
|
"Can't parse error from Elasticsearch [Unrecognized token 'I': "
|
||||||
|
+ "was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')] "
|
||||||
+ "at [line 1 col 1]. Response:\n"
|
+ "at [line 1 col 1]. Response:\n"
|
||||||
+ "I'm not json at all",
|
+ "I'm not json at all",
|
||||||
e.getMessage());
|
e.getMessage());
|
||||||
|
@ -118,7 +119,7 @@ public class RemoteFailureTests extends ESTestCase {
|
||||||
}).streamInput()));
|
}).streamInput()));
|
||||||
assertThat(e.getMessage(),
|
assertThat(e.getMessage(),
|
||||||
startsWith("Can't parse error from Elasticsearch [Unrecognized token 'ÿ': "
|
startsWith("Can't parse error from Elasticsearch [Unrecognized token 'ÿ': "
|
||||||
+ "was expecting ('true', 'false' or 'null')] at [line 1 col 1]. Response:\n"));
|
+ "was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')] at [line 1 col 4]. Response:\n"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTooBig() {
|
public void testTooBig() {
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -26,7 +26,7 @@ dependencies {
|
||||||
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
compile "commons-codec:commons-codec:${versions.commonscodec}"
|
||||||
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
|
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
|
||||||
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
|
||||||
|
|
||||||
// GCS dependencies
|
// GCS dependencies
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
0f63b3b1da563767d04d2e4d3fc1ae0cdeffebe7
|
|
@ -1 +0,0 @@
|
||||||
391de20b4e29cb3fb07d2454ace64be2c82ac91f
|
|
|
@ -0,0 +1 @@
|
||||||
|
f7ee7b55c7d292ac72fbaa7648c089f069c938d2
|
|
@ -1 +0,0 @@
|
||||||
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
|
|
|
@ -0,0 +1 @@
|
||||||
|
aae92628b5447fa25af79871ca98668da6edd439
|
|
@ -1 +0,0 @@
|
||||||
35753201d0cdb1dbe998ab289bca1180b68d4368
|
|
Loading…
Reference in New Issue