Skip to content

Commit 58cb259

Browse files
committed
Update jackson and azure
This grabs a new version of jackson and snakeyaml to get some bug fixes. It also updates azure to stay compatible with the new jackson. Closes elastic#66555 Closes elastic#67214 Closes elastic#80142
1 parent 691886f commit 58cb259

File tree

74 files changed

+96
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+96
-58
lines changed

build-tools-internal/src/main/groovy/elasticsearch.ide.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ if (providers.systemProperty('idea.active').forUseAtConfigurationTime().getOrNul
8888
tasks.register('buildDependencyArtifacts') {
8989
group = 'ide'
9090
description = 'Builds artifacts needed as dependency for IDE modules'
91-
dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar', ':plugins:repository-azure:azure-storage-blob:shadowJar'
91+
dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar'
9292
}
9393

9494
idea {

build-tools-internal/version.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ checkstyle = 8.42
99
# optional dependencies
1010
spatial4j = 0.7
1111
jts = 1.15.0
12-
jackson = 2.10.4
13-
snakeyaml = 1.26
12+
jackson = 2.13.0
13+
snakeyaml = 1.29
1414
icu4j = 68.2
1515
supercsv = 2.4.0
1616
# when updating log4j, please update also docs/java-api/index.asciidoc

client/sniffer/licenses/jackson-core-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e957ec5442966e69cef543927bdc80e5426968bb

distribution/tools/plugin-cli/licenses/jackson-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15be89db6609bd6fda3dc309bacf0318a312c03f

distribution/tools/plugin-cli/licenses/jackson-databind-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
889672a1721d6d85b2834fcd29d3fda92c8c8891

libs/x-content/licenses/jackson-core-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e957ec5442966e69cef543927bdc80e5426968bb

libs/x-content/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8d4c05a638d686138021a2480a9d67b5fdef6e0d

libs/x-content/licenses/jackson-dataformat-smile-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
a8c8f05272b8f9d7220e7b3fef4ab0a89fa20808

libs/x-content/licenses/jackson-dataformat-yaml-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
90c7265058f7b8b805abde4da1e2e59febb30c7d

libs/x-content/licenses/snakeyaml-1.26.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
6d0cdafb2010f1297e574656551d7145240f6e25

modules/ingest-geoip/licenses/jackson-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15be89db6609bd6fda3dc309bacf0318a312c03f

modules/ingest-geoip/licenses/jackson-databind-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
889672a1721d6d85b2834fcd29d3fda92c8c8891

plugins/discovery-ec2/licenses/jackson-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15be89db6609bd6fda3dc309bacf0318a312c03f

plugins/discovery-ec2/licenses/jackson-databind-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
889672a1721d6d85b2834fcd29d3fda92c8c8891

plugins/repository-azure/build.gradle

+31-24
Original file line numberDiff line numberDiff line change
@@ -23,38 +23,34 @@ esplugin {
2323
}
2424

2525
versions << [
26-
'azure': '12.9.0',
27-
'azureCore': '1.10.0',
28-
'azureCoreHttpNetty': '1.6.3',
26+
'azure': '12.14.0',
27+
'azureCore': '1.21.0',
28+
'azureCoreHttpNetty': '1.11.1',
29+
'azureAvro': '12.1.1',
2930

3031
'jakartaActivation': '1.2.1',
3132
'jakartaXMLBind': '2.3.2',
3233
'stax2API': '4.2',
33-
'woodstox': '6.0.2',
34+
'woodstox': '6.2.6',
3435

35-
'reactorNetty': '0.9.12.RELEASE',
36-
'reactorCore': '3.3.10.RELEASE',
36+
'reactorNetty': '1.0.12',
37+
'reactorCore': '3.4.11',
3738
'reactiveStreams': '1.0.3',
3839
]
3940

4041
dependencies {
41-
api project(path: 'azure-storage-blob', configuration: 'shadow')
42-
if (isEclipse) {
43-
/*
44-
* Eclipse can't pick up the shadow dependency so we point it at *something*
45-
* so it can compile things.
46-
*/
47-
api project(path: 'azure-storage-blob')
48-
}
4942
api "com.azure:azure-storage-common:${versions.azure}"
43+
api "com.azure:azure-storage-blob:${versions.azure}"
5044
api "com.azure:azure-core-http-netty:${versions.azureCoreHttpNetty}"
5145
api "com.azure:azure-core:${versions.azureCore}"
46+
api "com.azure:azure-storage-internal-avro:${versions.azureAvro}"
5247

5348
// jackson
5449
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
5550
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
5651
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
5752
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
53+
api "com.fasterxml.jackson:jackson-bom:${versions.jackson}"
5854

5955
// jackson xml
6056
api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}"
@@ -67,18 +63,23 @@ dependencies {
6763

6864
// netty
6965
api "io.netty:netty-buffer:${versions.netty}"
66+
api "io.netty:netty-codec:${versions.netty}"
67+
api "io.netty:netty-codec-dns:${versions.netty}"
7068
api "io.netty:netty-codec-http:${versions.netty}"
7169
api "io.netty:netty-codec-http2:${versions.netty}"
7270
api "io.netty:netty-codec-socks:${versions.netty}"
73-
api "io.netty:netty-codec:${versions.netty}"
7471
api "io.netty:netty-common:${versions.netty}"
75-
api "io.netty:netty-handler-proxy:${versions.netty}"
7672
api "io.netty:netty-handler:${versions.netty}"
73+
api "io.netty:netty-handler-proxy:${versions.netty}"
7774
api "io.netty:netty-resolver:${versions.netty}"
75+
api "io.netty:netty-resolver-dns:${versions.netty}"
7876
api "io.netty:netty-transport:${versions.netty}"
77+
api "io.netty:netty-transport-native-unix-common:${versions.netty}"
7978

8079
// reactor
8180
api "io.projectreactor.netty:reactor-netty:${versions.reactorNetty}"
81+
api "io.projectreactor.netty:reactor-netty-core:${versions.reactorNetty}"
82+
api "io.projectreactor.netty:reactor-netty-http:${versions.reactorNetty}"
8283
api "io.projectreactor:reactor-core:${versions.reactorCore}"
8384
api "org.reactivestreams:reactive-streams:${versions.reactiveStreams}"
8485

@@ -108,6 +109,7 @@ tasks.named("dependencyLicenses").configure {
108109
mapping from: /netty-.*/, to: 'netty'
109110
mapping from: /jaxb-.*/, to: 'jaxb'
110111
mapping from: /stax-.*/, to: 'stax'
112+
mapping from: /reactor-netty-.*/, to: 'reactor-netty'
111113
mapping from: /reactive-streams.*/, to: 'reactive-streams'
112114
}
113115

@@ -254,14 +256,25 @@ tasks.named("thirdPartyAudit").configure {
254256
// it uses NIO
255257
'io.netty.channel.kqueue.KQueue',
256258
'io.netty.channel.kqueue.KQueueDatagramChannel',
259+
'io.netty.channel.kqueue.KQueueDomainDatagramChannel',
260+
'io.netty.channel.kqueue.KQueueDomainSocketChannel',
257261
'io.netty.channel.kqueue.KQueueEventLoopGroup',
262+
'io.netty.channel.kqueue.KQueueServerDomainSocketChannel',
258263
'io.netty.channel.kqueue.KQueueServerSocketChannel',
259264
'io.netty.channel.kqueue.KQueueSocketChannel',
260265
'io.netty.channel.epoll.Epoll',
261266
'io.netty.channel.epoll.EpollDatagramChannel',
267+
'io.netty.channel.epoll.EpollDomainDatagramChannel',
268+
'io.netty.channel.epoll.EpollDomainSocketChannel',
262269
'io.netty.channel.epoll.EpollEventLoopGroup',
270+
'io.netty.channel.epoll.EpollServerDomainSocketChannel',
263271
'io.netty.channel.epoll.EpollServerSocketChannel',
264272
'io.netty.channel.epoll.EpollSocketChannel',
273+
'io.netty.incubator.channel.uring.IOUring',
274+
'io.netty.incubator.channel.uring.IOUringDatagramChannel',
275+
'io.netty.incubator.channel.uring.IOUringEventLoopGroup',
276+
'io.netty.incubator.channel.uring.IOUringServerSocketChannel',
277+
'io.netty.incubator.channel.uring.IOUringSocketChannel',
265278

266279
// from reactor.netty.http.server.HttpServer (reactor-netty)
267280
'io.netty.handler.codec.haproxy.HAProxyMessage',
@@ -271,13 +284,11 @@ tasks.named("thirdPartyAudit").configure {
271284
'org.osgi.framework.BundleActivator',
272285
'org.osgi.framework.BundleContext',
273286

274-
// from com.ctc.wstx.shaded.msv_core.driver.textui.Driver (woodstox-core)
275-
'com.sun.org.apache.xml.internal.resolver.Catalog',
276-
'com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver',
277-
278287
'org.slf4j.impl.StaticLoggerBinder',
279288
'org.slf4j.impl.StaticMDCBinder',
280289
'org.slf4j.impl.StaticMarkerBinder',
290+
291+
'com.ctc.wstx.shaded.msv_core.driver.textui.Driver',
281292
)
282293

283294
ignoreViolations(
@@ -303,11 +314,7 @@ tasks.named("thirdPartyAudit").configure {
303314
'javax.activation.MailcapCommandMap',
304315
'javax.activation.MimetypesFileTypeMap',
305316

306-
'reactor.core.publisher.MultiProducerRingBuffer',
307-
'reactor.core.publisher.RingBufferFields',
308317
'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException',
309-
'reactor.core.publisher.UnsafeSequence',
310-
'reactor.core.publisher.UnsafeSupport'
311318
)
312319
}
313320
boolean useFixture = false

plugins/repository-azure/licenses/azure-core-1.10.0.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
f231784d49156f602d7952c9984cdc75677c6cd6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
94236568194f4d7453d0d023f0bdeed94d744f12

plugins/repository-azure/licenses/azure-core-http-netty-1.6.3.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
75d45d21dc208fa369abc832354470464c859d67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ed58d3438a7fa3a2a5e9f60c0111795101dc8bf6

plugins/repository-azure/licenses/azure-storage-common-12.9.0.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3a13c7837bbbc88b4ba0559b15df5f8db7c1ef50

plugins/repository-azure/licenses/jackson-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15be89db6609bd6fda3dc309bacf0318a312c03f

plugins/repository-azure/licenses/jackson-databind-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
889672a1721d6d85b2834fcd29d3fda92c8c8891

plugins/repository-azure/licenses/jackson-dataformat-xml-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
396634365e8439b27794fa94b571fdc03b4cf7be

plugins/repository-azure/licenses/jackson-datatype-jsr310-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4c143877fc733befe6189151c8b95d84acd06941

plugins/repository-azure/licenses/jackson-module-jaxb-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ddfabac3d9a4cbe43afd6c472e536b26adcd6561
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
390ff96a0e1f7c626cb52c119a1a1dfd0784d193
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7b74815fb1403e5747c872c6eee2a07e7a700d30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d0163c1d9ec983fc413cafc7610e27e269517634

plugins/repository-azure/licenses/reactor-core-3.3.10.RELEASE.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0e305f6aa6e6da26aa42726f8cfd69b6ab53d7c0

plugins/repository-azure/licenses/reactor-netty-0.9.12.RELEASE.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
4765023130d1dc1e8ec3e5e7842564953cf549db
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2b5b9fee56a6e492db277cd27e8baa7e1988e3cd
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
494c9d45bc4de180e2eb911d1af7077c80740276

plugins/repository-azure/licenses/woodstox-core-6.0.2.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d4a055af5dcadea8d1bded5b64bc7be5bb7fea95

plugins/repository-azure/src/main/java/org/elasticsearch/repositories/azure/AzureRepositoryPlugin.java

+13
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
import org.elasticsearch.watcher.ResourceWatcherService;
3535
import org.elasticsearch.xcontent.NamedXContentRegistry;
3636

37+
import java.security.AccessController;
38+
import java.security.PrivilegedAction;
3739
import java.util.Arrays;
3840
import java.util.Collection;
3941
import java.util.Collections;
@@ -53,6 +55,17 @@ public class AzureRepositoryPlugin extends Plugin implements RepositoryPlugin, R
5355
// Trigger static initialization with the plugin class loader
5456
// so we have access to the proper xml parser
5557
JacksonAdapter.createDefaultSerializerAdapter();
58+
59+
// Even though we don't use it, we need to force static init
60+
// of the default resolver which reads /etc/hosts so it doesn't init later
61+
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
62+
try {
63+
Class.forName("io.netty.resolver.HostsFileEntriesResolver");
64+
} catch (Exception e) {
65+
throw new RuntimeException(e);
66+
}
67+
return null;
68+
});
5669
}
5770

5871
// protected for testing

plugins/repository-azure/src/main/plugin-metadata/plugin-security.policy

+5
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,9 @@ grant {
1414
// Used by jackson bean deserialization
1515
permission java.lang.RuntimePermission "accessDeclaredMembers";
1616
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
17+
// needed by netty dns resolver
18+
permission java.io.FilePermission "/etc/hosts", "read";
19+
permission java.io.FilePermission "/etc/resolv.conf", "read";
20+
permission java.io.FilePermission "/etc/resolver", "read";
21+
permission java.io.FilePermission "/etc/resolver/-", "read";
1722
};

plugins/repository-s3/licenses/jackson-annotations-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15be89db6609bd6fda3dc309bacf0318a312c03f

plugins/repository-s3/licenses/jackson-databind-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
889672a1721d6d85b2834fcd29d3fda92c8c8891

qa/smoke-test-http/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.rest-test'
1212
apply plugin: 'elasticsearch.test-with-dependencies'
1313

1414
dependencies {
15-
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.10.4"
15+
// testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
1616
testImplementation project(':modules:transport-netty4') // for http
1717
testImplementation project(':plugins:transport-nio') // for http
1818
}

test/framework/src/main/java/org/elasticsearch/common/xcontent/support/AbstractFilteringTestCase.java

+6
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,12 @@ public void testFilterPrefix() throws IOException {
432432
testFilter(expected, sample, singleton("photosCount"), emptySet());
433433
}
434434

435+
public void testFilterNothingInObject() throws IOException {
436+
final Builder sample = builder -> builder.startObject().field("bar", "test1").field("foo", "test2").endObject();
437+
Builder expected = builder -> builder.startObject().field("bar", "test1").field("foo", "test2").endObject();
438+
testFilter(expected, sample, emptySet(), singleton("bar.xxx"));
439+
}
440+
435441
public void testManyFilters() throws IOException, URISyntaxException {
436442
Builder deep = builder -> builder.startObject()
437443
.startObject("system")

x-pack/plugin/sql/jdbc/licenses/jackson-core-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
e957ec5442966e69cef543927bdc80e5426968bb

x-pack/plugin/sql/jdbc/licenses/jackson-dataformat-cbor-2.10.4.jar.sha1

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8d4c05a638d686138021a2480a9d67b5fdef6e0d

0 commit comments

Comments
 (0)