Skip to content

Commit

Permalink
Revert "Upgrade to Jackson 2.10.3 and GeoIP2 to 2.13.1 (#53576)"
Browse files Browse the repository at this point in the history
This reverts commit b7dbade.
  • Loading branch information
mark-vieira committed Mar 16, 2020
1 parent 66374b6 commit 2f0aca9
Show file tree
Hide file tree
Showing 56 changed files with 63 additions and 63 deletions.
8 changes: 6 additions & 2 deletions buildSrc/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ bundled_jdk = 13.0.2+8
# optional dependencies
spatial4j = 0.7
jts = 1.15.0
jackson = 2.10.3
snakeyaml = 1.24
# note that ingest-geoip has a hard-coded version; if you modify this version,
# you should also inspect that version to see if it can be advanced along with
# the com.maxmind.geoip2:geoip2 dependency
jackson = 2.8.11
jacksondatabind = 2.8.11.6
snakeyaml = 1.17
icu4j = 62.1
supercsv = 2.4.0
# when updating log4j, please update also docs/java-api/index.asciidoc
Expand Down
1 change: 0 additions & 1 deletion client/sniffer/licenses/jackson-core-2.10.3.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions client/sniffer/licenses/jackson-core-2.8.11.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
1 change: 0 additions & 1 deletion libs/x-content/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ forbiddenApisMain {
thirdPartyAudit.ignoreMissingClasses(
// from com.fasterxml.jackson.dataformat.yaml.YAMLMapper (jackson-dataformat-yaml)
'com.fasterxml.jackson.databind.ObjectMapper',
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
)

dependencyLicenses {
Expand Down
1 change: 0 additions & 1 deletion libs/x-content/licenses/jackson-core-2.10.3.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions libs/x-content/licenses/jackson-core-2.8.11.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b9826e16c3366764bfb7ad7362554f0471046c3

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d9d1c49c5d9d5e46e2aee55f3cdd119286fe0fc1

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2e77c6ff7342cd61ab1ae7cb14ed16aebfc8a72a
1 change: 1 addition & 0 deletions libs/x-content/licenses/snakeyaml-1.17.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7a27ea250c5130b2922b86dea63cbb1cc10a660c
1 change: 0 additions & 1 deletion libs/x-content/licenses/snakeyaml-1.24.jar.sha1

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,14 @@ public void testFloat() throws IOException {

assertEquals(value, number.floatValue(), 0.0f);

switch (xContentType) {
case CBOR:
case SMILE:
assertThat(number, instanceOf(Float.class));
break;
case JSON:
case YAML:
assertThat(number, instanceOf(Double.class));
break;
default:
throw new AssertionError("unexpected x-content type [" + xContentType + "]");
if (xContentType == XContentType.CBOR) {
// CBOR parses back a float
assertTrue(number instanceof Float);
} else {
// JSON, YAML and SMILE parses back the float value as a double
// This will change for SMILE in Jackson 2.9 where all binary based
// formats will return a float
assertTrue(number instanceof Double);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void testInvalidValue() {

Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
assertThat(exception.getCause().getMessage(), containsString("Unrecognized token 'blah': " +
"was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"));
"was expecting ('true', 'false' or 'null')"));
}

public void testByteArray() {
Expand All @@ -75,12 +75,7 @@ public void testByteArray() {
IngestDocument ingestDocument = RandomDocumentPicks.randomIngestDocument(random(), document);

Exception exception = expectThrows(IllegalArgumentException.class, () -> jsonProcessor.execute(ingestDocument));
assertThat(
exception.getCause().getMessage(),
containsString(
"Unrecognized token 'B': was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')"
)
);
assertThat(exception.getCause().getMessage(), containsString("Unrecognized token 'B': was expecting ('true', 'false' or 'null')"));
}

public void testNull() throws Exception {
Expand Down
10 changes: 6 additions & 4 deletions modules/ingest-geoip/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ esplugin {
}

dependencies {
compile('com.maxmind.geoip2:geoip2:2.13.1')
// 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.9.0')
// geoip2 dependencies:
compile("com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}")
compile("com.fasterxml.jackson.core:jackson-databind:${versions.jackson}")
compile('com.maxmind.db:maxmind-db:1.3.1')
// 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:2.8.11")
compile("com.fasterxml.jackson.core:jackson-databind:2.8.11.6")
compile('com.maxmind.db:maxmind-db:1.2.2')

testCompile 'org.elasticsearch:geolite2-databases:20191119'
}
Expand Down
1 change: 0 additions & 1 deletion modules/ingest-geoip/licenses/geoip2-2.13.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions modules/ingest-geoip/licenses/geoip2-2.9.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c12b463a2c10824225c0b27952c49b464cb0e4c6

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
391de20b4e29cb3fb07d2454ace64be2c82ac91f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35753201d0cdb1dbe998ab289bca1180b68d4368
1 change: 1 addition & 0 deletions modules/ingest-geoip/licenses/maxmind-db-1.2.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
78c22a03de1e222b0751855aff7bb6e6db5569e5
1 change: 0 additions & 1 deletion modules/ingest-geoip/licenses/maxmind-db-1.3.1.jar.sha1

This file was deleted.

2 changes: 1 addition & 1 deletion plugins/discovery-ec2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ dependencies {
compile "commons-logging:commons-logging:${versions.commonslogging}"
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
391de20b4e29cb3fb07d2454ace64be2c82ac91f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35753201d0cdb1dbe998ab289bca1180b68d4368
2 changes: 1 addition & 1 deletion plugins/repository-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies {
compile "org.apache.logging.log4j:log4j-1.2-api:${versions.log4j}"
compile "commons-codec:commons-codec:${versions.commonscodec}"
compile "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${versions.jackson}"
compile "joda-time:joda-time:${versions.joda}"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
391de20b4e29cb3fb07d2454ace64be2c82ac91f

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35753201d0cdb1dbe998ab289bca1180b68d4368
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.Map;

Expand Down Expand Up @@ -89,7 +90,15 @@ public void testStoredFieldsValueBoolean() throws IOException {

public void testStoredFieldsValueBinary() throws IOException {
final byte[] value = randomUnicodeOfLength(scaledRandomIntBetween(10, 1000)).getBytes("UTF-8");
assertParseFieldsSimpleValue(value, (xcontentType, result) -> assertArrayEquals(value, ((BytesArray) result).array()));
assertParseFieldsSimpleValue(value, (xcontentType, result) -> {
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ public void testSlowLogParsedDocumentPrinterSourceToLog() throws IOException {
final UncheckedIOException e = expectThrows(UncheckedIOException.class,
()->new IndexingSlowLogMessage(index, doc, 10, true, 3));
assertThat(e, hasToString(containsString("_failed_to_convert_[Unrecognized token 'invalid':"
+ " was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\\n"
+ " at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper)")));
+ " was expecting ('true', 'false' or 'null')\\n"
+ " at [Source: org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper")));
assertNotNull(e.getCause());
assertThat(e.getCause(), instanceOf(JsonParseException.class));
assertThat(e.getCause(), hasToString(containsString("Unrecognized token 'invalid':"
+ " was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')\n"
+ " at [Source: (org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper)")));
+ " was expecting ('true', 'false' or 'null')\n"
+ " at [Source: org.elasticsearch.common.bytes.AbstractBytesReference$MarkSupportingStreamInputWrapper")));
}

public void testReformatSetting() {
Expand Down
5 changes: 0 additions & 5 deletions x-pack/plugin/sql/jdbc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,3 @@ dependencyLicenses {
shadowJar {
relocate 'com.fasterxml', 'org.elasticsearch.fasterxml'
}

thirdPartyAudit.ignoreMissingClasses(
'com.fasterxml.jackson.databind.ObjectMapper',
'com.fasterxml.jackson.databind.cfg.MapperBuilder'
)

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
8b9826e16c3366764bfb7ad7362554f0471046c3

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,7 @@ public void testNoType() {
public void testInvalidJson() {
IOException e = expectThrows(IOException.class, () -> parse("invalid_json.txt"));
assertEquals(
"Can't parse error from Elasticsearch [Unrecognized token 'I': "
+ "was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')] "
"Can't parse error from Elasticsearch [Unrecognized token 'I': was expecting 'null', 'true', 'false' or NaN] "
+ "at [line 1 col 1]. Response:\n"
+ "I'm not json at all",
e.getMessage());
Expand All @@ -119,7 +118,7 @@ public void testTotalGarbage() {
}).streamInput()));
assertThat(e.getMessage(),
startsWith("Can't parse error from Elasticsearch [Unrecognized token 'ÿ': "
+ "was expecting (JSON String, Number, Array, Object or token 'null', 'true' or 'false')] at [line 1 col 4]. Response:\n"));
+ "was expecting ('true', 'false' or 'null')] at [line 1 col 1]. Response:\n"));
}

public void testTooBig() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b
2 changes: 1 addition & 1 deletion x-pack/snapshot-tool/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dependencies {
compile "commons-codec:commons-codec:${versions.commonscodec}"
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-databind:${versions.jackson}"
compile "com.fasterxml.jackson.core:jackson-databind:${versions.jacksondatabind}"
compile "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"

// GCS dependencies
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
391de20b4e29cb3fb07d2454ace64be2c82ac91f
1 change: 0 additions & 1 deletion x-pack/snapshot-tool/licenses/jackson-core-2.10.3.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions x-pack/snapshot-tool/licenses/jackson-core-2.8.11.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
876ead1db19f0c9e79c9789273a3ef8c6fd6c29b

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
35753201d0cdb1dbe998ab289bca1180b68d4368

0 comments on commit 2f0aca9

Please sign in to comment.