Skip to content

Commit

Permalink
Update jackson and azure
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nik9000 committed Nov 1, 2021
1 parent 691886f commit 58cb259
Show file tree
Hide file tree
Showing 74 changed files with 96 additions and 58 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ if (providers.systemProperty('idea.active').forUseAtConfigurationTime().getOrNul
tasks.register('buildDependencyArtifacts') {
group = 'ide'
description = 'Builds artifacts needed as dependency for IDE modules'
dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar', ':plugins:repository-azure:azure-storage-blob:shadowJar'
dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-client-api:shadowJar'
}

idea {
Expand Down
4 changes: 2 additions & 2 deletions build-tools-internal/version.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ checkstyle = 8.42
# optional dependencies
spatial4j = 0.7
jts = 1.15.0
jackson = 2.10.4
snakeyaml = 1.26
jackson = 2.13.0
snakeyaml = 1.29
icu4j = 68.2
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.4.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions client/sniffer/licenses/jackson-core-2.13.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e957ec5442966e69cef543927bdc80e5426968bb

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
889672a1721d6d85b2834fcd29d3fda92c8c8891
1 change: 0 additions & 1 deletion libs/x-content/licenses/jackson-core-2.10.4.jar.sha1

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
90c7265058f7b8b805abde4da1e2e59febb30c7d
1 change: 0 additions & 1 deletion libs/x-content/licenses/snakeyaml-1.26.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions libs/x-content/licenses/snakeyaml-1.29.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6d0cdafb2010f1297e574656551d7145240f6e25

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
889672a1721d6d85b2834fcd29d3fda92c8c8891
55 changes: 31 additions & 24 deletions plugins/repository-azure/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,38 +23,34 @@ esplugin {
}

versions << [
'azure': '12.9.0',
'azureCore': '1.10.0',
'azureCoreHttpNetty': '1.6.3',
'azure': '12.14.0',
'azureCore': '1.21.0',
'azureCoreHttpNetty': '1.11.1',
'azureAvro': '12.1.1',

'jakartaActivation': '1.2.1',
'jakartaXMLBind': '2.3.2',
'stax2API': '4.2',
'woodstox': '6.0.2',
'woodstox': '6.2.6',

'reactorNetty': '0.9.12.RELEASE',
'reactorCore': '3.3.10.RELEASE',
'reactorNetty': '1.0.12',
'reactorCore': '3.4.11',
'reactiveStreams': '1.0.3',
]

dependencies {
api project(path: 'azure-storage-blob', configuration: 'shadow')
if (isEclipse) {
/*
* Eclipse can't pick up the shadow dependency so we point it at *something*
* so it can compile things.
*/
api project(path: 'azure-storage-blob')
}
api "com.azure:azure-storage-common:${versions.azure}"
api "com.azure:azure-storage-blob:${versions.azure}"
api "com.azure:azure-core-http-netty:${versions.azureCoreHttpNetty}"
api "com.azure:azure-core:${versions.azureCore}"
api "com.azure:azure-storage-internal-avro:${versions.azureAvro}"

// jackson
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
api "com.fasterxml.jackson:jackson-bom:${versions.jackson}"

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

// netty
api "io.netty:netty-buffer:${versions.netty}"
api "io.netty:netty-codec:${versions.netty}"
api "io.netty:netty-codec-dns:${versions.netty}"
api "io.netty:netty-codec-http:${versions.netty}"
api "io.netty:netty-codec-http2:${versions.netty}"
api "io.netty:netty-codec-socks:${versions.netty}"
api "io.netty:netty-codec:${versions.netty}"
api "io.netty:netty-common:${versions.netty}"
api "io.netty:netty-handler-proxy:${versions.netty}"
api "io.netty:netty-handler:${versions.netty}"
api "io.netty:netty-handler-proxy:${versions.netty}"
api "io.netty:netty-resolver:${versions.netty}"
api "io.netty:netty-resolver-dns:${versions.netty}"
api "io.netty:netty-transport:${versions.netty}"
api "io.netty:netty-transport-native-unix-common:${versions.netty}"

// reactor
api "io.projectreactor.netty:reactor-netty:${versions.reactorNetty}"
api "io.projectreactor.netty:reactor-netty-core:${versions.reactorNetty}"
api "io.projectreactor.netty:reactor-netty-http:${versions.reactorNetty}"
api "io.projectreactor:reactor-core:${versions.reactorCore}"
api "org.reactivestreams:reactive-streams:${versions.reactiveStreams}"

Expand Down Expand Up @@ -108,6 +109,7 @@ tasks.named("dependencyLicenses").configure {
mapping from: /netty-.*/, to: 'netty'
mapping from: /jaxb-.*/, to: 'jaxb'
mapping from: /stax-.*/, to: 'stax'
mapping from: /reactor-netty-.*/, to: 'reactor-netty'
mapping from: /reactive-streams.*/, to: 'reactive-streams'
}

Expand Down Expand Up @@ -254,14 +256,25 @@ tasks.named("thirdPartyAudit").configure {
// it uses NIO
'io.netty.channel.kqueue.KQueue',
'io.netty.channel.kqueue.KQueueDatagramChannel',
'io.netty.channel.kqueue.KQueueDomainDatagramChannel',
'io.netty.channel.kqueue.KQueueDomainSocketChannel',
'io.netty.channel.kqueue.KQueueEventLoopGroup',
'io.netty.channel.kqueue.KQueueServerDomainSocketChannel',
'io.netty.channel.kqueue.KQueueServerSocketChannel',
'io.netty.channel.kqueue.KQueueSocketChannel',
'io.netty.channel.epoll.Epoll',
'io.netty.channel.epoll.EpollDatagramChannel',
'io.netty.channel.epoll.EpollDomainDatagramChannel',
'io.netty.channel.epoll.EpollDomainSocketChannel',
'io.netty.channel.epoll.EpollEventLoopGroup',
'io.netty.channel.epoll.EpollServerDomainSocketChannel',
'io.netty.channel.epoll.EpollServerSocketChannel',
'io.netty.channel.epoll.EpollSocketChannel',
'io.netty.incubator.channel.uring.IOUring',
'io.netty.incubator.channel.uring.IOUringDatagramChannel',
'io.netty.incubator.channel.uring.IOUringEventLoopGroup',
'io.netty.incubator.channel.uring.IOUringServerSocketChannel',
'io.netty.incubator.channel.uring.IOUringSocketChannel',

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

// from com.ctc.wstx.shaded.msv_core.driver.textui.Driver (woodstox-core)
'com.sun.org.apache.xml.internal.resolver.Catalog',
'com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver',

'org.slf4j.impl.StaticLoggerBinder',
'org.slf4j.impl.StaticMDCBinder',
'org.slf4j.impl.StaticMarkerBinder',

'com.ctc.wstx.shaded.msv_core.driver.textui.Driver',
)

ignoreViolations(
Expand All @@ -303,11 +314,7 @@ tasks.named("thirdPartyAudit").configure {
'javax.activation.MailcapCommandMap',
'javax.activation.MimetypesFileTypeMap',

'reactor.core.publisher.MultiProducerRingBuffer',
'reactor.core.publisher.RingBufferFields',
'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException',
'reactor.core.publisher.UnsafeSequence',
'reactor.core.publisher.UnsafeSupport'
)
}
boolean useFixture = false
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
f231784d49156f602d7952c9984cdc75677c6cd6
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
94236568194f4d7453d0d023f0bdeed94d744f12

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
75d45d21dc208fa369abc832354470464c859d67
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ed58d3438a7fa3a2a5e9f60c0111795101dc8bf6

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ddfabac3d9a4cbe43afd6c472e536b26adcd6561
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
390ff96a0e1f7c626cb52c119a1a1dfd0784d193
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7b74815fb1403e5747c872c6eee2a07e7a700d30
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d0163c1d9ec983fc413cafc7610e27e269517634

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4765023130d1dc1e8ec3e5e7842564953cf549db
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2b5b9fee56a6e492db277cd27e8baa7e1988e3cd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
494c9d45bc4de180e2eb911d1af7077c80740276

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d4a055af5dcadea8d1bded5b64bc7be5bb7fea95
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
import org.elasticsearch.watcher.ResourceWatcherService;
import org.elasticsearch.xcontent.NamedXContentRegistry;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
Expand All @@ -53,6 +55,17 @@ public class AzureRepositoryPlugin extends Plugin implements RepositoryPlugin, R
// Trigger static initialization with the plugin class loader
// so we have access to the proper xml parser
JacksonAdapter.createDefaultSerializerAdapter();

// Even though we don't use it, we need to force static init
// of the default resolver which reads /etc/hosts so it doesn't init later
AccessController.doPrivileged((PrivilegedAction<Void>) () -> {
try {
Class.forName("io.netty.resolver.HostsFileEntriesResolver");
} catch (Exception e) {
throw new RuntimeException(e);
}
return null;
});
}

// protected for testing
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,9 @@ grant {
// Used by jackson bean deserialization
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
// needed by netty dns resolver
permission java.io.FilePermission "/etc/hosts", "read";
permission java.io.FilePermission "/etc/resolv.conf", "read";
permission java.io.FilePermission "/etc/resolver", "read";
permission java.io.FilePermission "/etc/resolver/-", "read";
};

This file was deleted.

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

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
889672a1721d6d85b2834fcd29d3fda92c8c8891
2 changes: 1 addition & 1 deletion qa/smoke-test-http/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ apply plugin: 'elasticsearch.rest-test'
apply plugin: 'elasticsearch.test-with-dependencies'

dependencies {
testImplementation "com.fasterxml.jackson.core:jackson-databind:2.10.4"
// testImplementation "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
testImplementation project(':modules:transport-netty4') // for http
testImplementation project(':plugins:transport-nio') // for http
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,12 @@ public void testFilterPrefix() throws IOException {
testFilter(expected, sample, singleton("photosCount"), emptySet());
}

public void testFilterNothingInObject() throws IOException {
final Builder sample = builder -> builder.startObject().field("bar", "test1").field("foo", "test2").endObject();
Builder expected = builder -> builder.startObject().field("bar", "test1").field("foo", "test2").endObject();
testFilter(expected, sample, emptySet(), singleton("bar.xxx"));
}

public void testManyFilters() throws IOException, URISyntaxException {
Builder deep = builder -> builder.startObject()
.startObject("system")
Expand Down

This file was deleted.

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

This file was deleted.

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

0 comments on commit 58cb259

Please sign in to comment.