Skip to content

Commit ddf4c69

Browse files
authored
Revert "Upgrade Azure SDK and Jackson (#72833) (#72995) (#73493)" (#73861)
The recent upgrade of the Azure SDK has caused a few test failures that have been difficult to debug and do not yet have a fix. In particular, a change to the netty reactor resolving (reactor/reactor-netty#1655). We need to wait for a fix for that issue, so this reverts commit f454cef. relates #73493
1 parent 4c7c2d4 commit ddf4c69

File tree

126 files changed

+143
-139
lines changed

Some content is hidden

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

126 files changed

+143
-139
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 (System.getProperty('idea.active') == 'true') {
8888
tasks.register('buildDependencyArtifacts') {
8989
group = 'ide'
9090
description = 'Builds artifacts needed as dependency for IDE modules'
91-
dependsOn ':plugins:repository-hdfs:hadoop-common:shadowJar'
91+
dependsOn ':plugins:repository-hdfs:hadoop-common:shadowJar', ':plugins:repository-azure:azure-storage-blob:shadowJar'
9292
}
9393

9494
idea {

build-tools-internal/version.properties

+3-3
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.12.2
13-
snakeyaml = 1.27
12+
jackson = 2.10.4
13+
snakeyaml = 1.26
1414
icu4j = 62.1
1515
supercsv = 2.4.0
1616
# when updating log4j, please update also docs/java-api/index.asciidoc
@@ -20,7 +20,7 @@ slf4j = 1.6.2
2020
# when updating the JNA version, also update the version in buildSrc/build.gradle
2121
jna = 5.7.0-1
2222

23-
netty = 4.1.63.Final
23+
netty = 4.1.49.Final
2424
joda = 2.10.10
2525

2626
commons_lang3 = 3.9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8796585e716440d6dd5128b30359932a9eb74d0d

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

-1
This file was deleted.

modules/transport-netty4/build.gradle

-2
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ tasks.named("thirdPartyAudit").configure {
122122
'io.netty.internal.tcnative.SSL',
123123
'io.netty.internal.tcnative.SSLContext',
124124
'io.netty.internal.tcnative.SSLPrivateKeyMethod',
125-
'io.netty.internal.tcnative.SSLSession',
126-
'io.netty.internal.tcnative.SSLSessionCache',
127125

128126
// from io.netty.handler.ssl.util.BouncyCastleSelfSignedCertGenerator (netty)
129127
'org.bouncycastle.cert.X509v3CertificateBuilder',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
8e819a81bca88d1e88137336f64531a53db0a4ad

modules/transport-netty4/licenses/netty-buffer-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-codec-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-codec-http-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-common-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-handler-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-resolver-4.1.63.Final.jar.sha1

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

modules/transport-netty4/licenses/netty-transport-4.1.63.Final.jar.sha1

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

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

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

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

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import org.elasticsearch.gradle.internal.JavaClassPublicifier;
2+
3+
apply plugin: 'elasticsearch.java'
4+
apply plugin: 'com.github.johnrengelman.shadow'
5+
6+
configurations {
7+
originalJar {
8+
transitive = false
9+
}
10+
}
11+
12+
dependencies {
13+
originalJar "com.azure:azure-storage-blob:${project.parent.versions.azure}"
14+
implementation "com.azure:azure-storage-blob:${project.parent.versions.azure}"
15+
}
16+
17+
// We have to rewrite the service classes to make them public to avoid
18+
// granting the permission "java.lang.reflect.ReflectPermission" "newProxyInPackage"
19+
// to this plugin.
20+
//
21+
// There are plans to make those public in the azure sdk side, but in the meanwhile
22+
// we just do this workaround
23+
// https://github.com/Azure/azure-sdk-for-java/issues/12829#issuecomment-736755543
24+
List<String> classesToRewrite = ['com/azure/storage/blob/implementation/AppendBlobsImpl$AppendBlobsService.class',
25+
'com/azure/storage/blob/implementation/BlobsImpl$BlobsService.class',
26+
'com/azure/storage/blob/implementation/BlockBlobsImpl$BlockBlobsService.class',
27+
'com/azure/storage/blob/implementation/ContainersImpl$ContainersService.class',
28+
'com/azure/storage/blob/implementation/DirectorysImpl$DirectorysService.class',
29+
'com/azure/storage/blob/implementation/PageBlobsImpl$PageBlobsService.class',
30+
'com/azure/storage/blob/implementation/ServicesImpl$ServicesService.class']
31+
32+
tasks.register('extractClientClasses', Copy).configure {
33+
from({ zipTree(configurations.originalJar.singleFile) }) {
34+
include "com/azure/storage/blob/implementation/**"
35+
}
36+
into project.file('build/original')
37+
}
38+
39+
def modifiedOutput = project.layout.buildDirectory.dir('modified')
40+
def makePublic = tasks.register('makeClientClassesPublic', JavaClassPublicifier) {
41+
dependsOn 'extractClientClasses'
42+
classFiles = classesToRewrite
43+
inputDir = project.layout.buildDirectory.dir('original')
44+
outputDir = modifiedOutput
45+
}
46+
47+
sourceSets.main.output.dir(modifiedOutput, builtBy: makePublic)

plugins/repository-azure/build.gradle

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

2424
versions << [
25-
'azure': '12.11.1',
26-
'azureCore': '1.16.0',
27-
'azureCoreHttpNetty': '1.9.1',
28-
'azureAvro': '12.0.4',
25+
'azure': '12.9.0',
26+
'azureCore': '1.10.0',
27+
'azureCoreHttpNetty': '1.6.3',
2928

3029
'jakartaActivation': '1.2.1',
3130
'jakartaXMLBind': '2.3.2',
3231
'stax2API': '4.2',
33-
'woodstox': '6.2.4',
32+
'woodstox': '6.0.2',
3433

35-
'reactorNetty': '1.0.6',
36-
'reactorCore': '3.4.5',
34+
'reactorNetty': '0.9.12.RELEASE',
35+
'reactorCore': '3.3.10.RELEASE',
3736
'reactiveStreams': '1.0.3',
3837
]
3938

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

4752
// jackson
4853
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
4954
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
5055
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
5156
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
52-
api "com.fasterxml.jackson:jackson-bom:${versions.jackson}"
5357

5458
// jackson xml
5559
api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}"
@@ -60,23 +64,18 @@ dependencies {
6064

6165
// netty
6266
api "io.netty:netty-buffer:${versions.netty}"
63-
api "io.netty:netty-codec:${versions.netty}"
64-
api "io.netty:netty-codec-dns:${versions.netty}"
6567
api "io.netty:netty-codec-http:${versions.netty}"
6668
api "io.netty:netty-codec-http2:${versions.netty}"
6769
api "io.netty:netty-codec-socks:${versions.netty}"
70+
api "io.netty:netty-codec:${versions.netty}"
6871
api "io.netty:netty-common:${versions.netty}"
69-
api "io.netty:netty-handler:${versions.netty}"
7072
api "io.netty:netty-handler-proxy:${versions.netty}"
73+
api "io.netty:netty-handler:${versions.netty}"
7174
api "io.netty:netty-resolver:${versions.netty}"
72-
api "io.netty:netty-resolver-dns:${versions.netty}"
7375
api "io.netty:netty-transport:${versions.netty}"
74-
api "io.netty:netty-transport-native-unix-common:${versions.netty}"
7576

7677
// reactor
7778
api "io.projectreactor.netty:reactor-netty:${versions.reactorNetty}"
78-
api "io.projectreactor.netty:reactor-netty-core:${versions.reactorNetty}"
79-
api "io.projectreactor.netty:reactor-netty-http:${versions.reactorNetty}"
8079
api "io.projectreactor:reactor-core:${versions.reactorCore}"
8180
api "org.reactivestreams:reactive-streams:${versions.reactiveStreams}"
8281

@@ -106,7 +105,6 @@ tasks.named("dependencyLicenses").configure {
106105
mapping from: /netty-.*/, to: 'netty'
107106
mapping from: /jaxb-.*/, to: 'jaxb'
108107
mapping from: /stax-.*/, to: 'stax'
109-
mapping from: /reactor-netty-.*/, to: 'reactor-netty'
110108
mapping from: /reactive-streams.*/, to: 'reactive-streams'
111109
}
112110

@@ -240,8 +238,6 @@ tasks.named("thirdPartyAudit").configure {
240238
'io.netty.internal.tcnative.CertificateVerifier',
241239
'io.netty.internal.tcnative.SessionTicketKey',
242240
'io.netty.internal.tcnative.SniHostNameMatcher',
243-
'io.netty.internal.tcnative.SSLSession',
244-
'io.netty.internal.tcnative.SSLSessionCache',
245241

246242
// from io.netty.util.internal.Hidden (netty-common optional dependency)
247243
'reactor.blockhound.BlockHound$Builder',
@@ -250,23 +246,14 @@ tasks.named("thirdPartyAudit").configure {
250246
// it uses NIO
251247
'io.netty.channel.kqueue.KQueue',
252248
'io.netty.channel.kqueue.KQueueDatagramChannel',
253-
'io.netty.channel.kqueue.KQueueDomainSocketChannel',
254249
'io.netty.channel.kqueue.KQueueEventLoopGroup',
255-
'io.netty.channel.kqueue.KQueueServerDomainSocketChannel',
256250
'io.netty.channel.kqueue.KQueueServerSocketChannel',
257251
'io.netty.channel.kqueue.KQueueSocketChannel',
258252
'io.netty.channel.epoll.Epoll',
259253
'io.netty.channel.epoll.EpollDatagramChannel',
260-
'io.netty.channel.epoll.EpollDomainSocketChannel',
261254
'io.netty.channel.epoll.EpollEventLoopGroup',
262-
'io.netty.channel.epoll.EpollServerDomainSocketChannel',
263255
'io.netty.channel.epoll.EpollServerSocketChannel',
264256
'io.netty.channel.epoll.EpollSocketChannel',
265-
'io.netty.incubator.channel.uring.IOUring',
266-
'io.netty.incubator.channel.uring.IOUringDatagramChannel',
267-
'io.netty.incubator.channel.uring.IOUringEventLoopGroup',
268-
'io.netty.incubator.channel.uring.IOUringServerSocketChannel',
269-
'io.netty.incubator.channel.uring.IOUringSocketChannel',
270257

271258
// from reactor.netty.http.server.HttpServer (reactor-netty)
272259
'io.netty.handler.codec.haproxy.HAProxyMessage',
@@ -278,8 +265,7 @@ tasks.named("thirdPartyAudit").configure {
278265

279266
'org.slf4j.impl.StaticLoggerBinder',
280267
'org.slf4j.impl.StaticMDCBinder',
281-
'org.slf4j.impl.StaticMarkerBinder',
282-
'com.ctc.wstx.shaded.msv_core.driver.textui.Driver',
268+
'org.slf4j.impl.StaticMarkerBinder'
283269
)
284270

285271
if (BuildParams.runtimeJavaVersion <= JavaVersion.VERSION_1_8) {
@@ -295,6 +281,8 @@ tasks.named("thirdPartyAudit").configure {
295281
)
296282
} else {
297283
ignoreMissingClasses(
284+
'com.sun.org.apache.xml.internal.resolver.Catalog',
285+
'com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver',
298286
'javax.activation.DataHandler',
299287
'javax.activation.DataSource',
300288
'javax.xml.bind.JAXBElement',
@@ -345,7 +333,11 @@ tasks.named("thirdPartyAudit").configure {
345333
'io.netty.util.internal.shaded.org.jctools.util.UnsafeAccess',
346334
'io.netty.util.internal.shaded.org.jctools.util.UnsafeRefArrayAccess',
347335

336+
'reactor.core.publisher.MultiProducerRingBuffer',
337+
'reactor.core.publisher.RingBufferFields',
348338
'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException',
339+
'reactor.core.publisher.UnsafeSequence',
340+
'reactor.core.publisher.UnsafeSupport'
349341
)
350342
}
351343
boolean useFixture = false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d5e1258ba153b5e27c90b7c9cad262e6fc171d24

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

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

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

-1
This file was deleted.

plugins/repository-azure/licenses/azure-storage-blob-12.11.1.jar.sha1

-1
This file was deleted.

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

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

plugins/repository-azure/licenses/azure-storage-internal-avro-12.0.4.jar.sha1

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

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

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

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

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

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

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

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

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

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

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

plugins/repository-azure/licenses/netty-buffer-4.1.63.Final.jar.sha1

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

0 commit comments

Comments
 (0)