Skip to content

Commit f98b374

Browse files
authored
Revert "Upgrade Azure SDK and Jackson (#72833) (#72995)" (#73837)
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 6c4c4a0. relates #73493
1 parent 334ad82 commit f98b374

File tree

70 files changed

+124
-114
lines changed

Some content is hidden

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

70 files changed

+124
-114
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 ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-common:shadowJar'
91+
dependsOn ':client:rest-high-level:shadowJar', ':plugins:repository-hdfs:hadoop-common:shadowJar', ':plugins:repository-azure:azure-storage-blob: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.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
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.
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

+32-38
Original file line numberDiff line numberDiff line change
@@ -22,35 +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-
'azureNetty': '4.1.63.Final',
36-
'reactorNetty': '1.0.6',
37-
'reactorCore': '3.4.5',
34+
'reactorNetty': '0.9.12.RELEASE',
35+
'reactorCore': '3.3.10.RELEASE',
3836
'reactiveStreams': '1.0.3',
3937
]
4038

4139
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+
}
4248
api "com.azure:azure-storage-common:${versions.azure}"
43-
api "com.azure:azure-storage-blob:${versions.azure}"
4449
api "com.azure:azure-core-http-netty:${versions.azureCoreHttpNetty}"
4550
api "com.azure:azure-core:${versions.azureCore}"
46-
api "com.azure:azure-storage-internal-avro:${versions.azureAvro}"
4751

4852
// jackson
4953
api "com.fasterxml.jackson.core:jackson-core:${versions.jackson}"
5054
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
5155
api "com.fasterxml.jackson.core:jackson-annotations:${versions.jackson}"
5256
api "com.fasterxml.jackson.core:jackson-databind:${versions.jackson}"
53-
api "com.fasterxml.jackson:jackson-bom:${versions.jackson}"
5457

5558
// jackson xml
5659
api "com.fasterxml.jackson.dataformat:jackson-dataformat-xml:${versions.jackson}"
@@ -62,24 +65,19 @@ dependencies {
6265
api "com.fasterxml.woodstox:woodstox-core:${versions.woodstox}"
6366

6467
// netty
65-
api "io.netty:netty-buffer:${versions.azureNetty}"
66-
api "io.netty:netty-codec:${versions.azureNetty}"
67-
api "io.netty:netty-codec-dns:${versions.azureNetty}"
68-
api "io.netty:netty-codec-http:${versions.azureNetty}"
69-
api "io.netty:netty-codec-http2:${versions.azureNetty}"
70-
api "io.netty:netty-codec-socks:${versions.azureNetty}"
71-
api "io.netty:netty-common:${versions.azureNetty}"
72-
api "io.netty:netty-handler:${versions.azureNetty}"
73-
api "io.netty:netty-handler-proxy:${versions.azureNetty}"
74-
api "io.netty:netty-resolver:${versions.azureNetty}"
75-
api "io.netty:netty-resolver-dns:${versions.azureNetty}"
76-
api "io.netty:netty-transport:${versions.azureNetty}"
77-
api "io.netty:netty-transport-native-unix-common:${versions.azureNetty}"
68+
api "io.netty:netty-buffer:${versions.netty}"
69+
api "io.netty:netty-codec-http:${versions.netty}"
70+
api "io.netty:netty-codec-http2:${versions.netty}"
71+
api "io.netty:netty-codec-socks:${versions.netty}"
72+
api "io.netty:netty-codec:${versions.netty}"
73+
api "io.netty:netty-common:${versions.netty}"
74+
api "io.netty:netty-handler-proxy:${versions.netty}"
75+
api "io.netty:netty-handler:${versions.netty}"
76+
api "io.netty:netty-resolver:${versions.netty}"
77+
api "io.netty:netty-transport:${versions.netty}"
7878

7979
// reactor
8080
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}"
8381
api "io.projectreactor:reactor-core:${versions.reactorCore}"
8482
api "org.reactivestreams:reactive-streams:${versions.reactiveStreams}"
8583

@@ -109,7 +107,6 @@ tasks.named("dependencyLicenses").configure {
109107
mapping from: /netty-.*/, to: 'netty'
110108
mapping from: /jaxb-.*/, to: 'jaxb'
111109
mapping from: /stax-.*/, to: 'stax'
112-
mapping from: /reactor-netty-.*/, to: 'reactor-netty'
113110
mapping from: /reactive-streams.*/, to: 'reactive-streams'
114111
}
115112

@@ -253,23 +250,14 @@ tasks.named("thirdPartyAudit").configure {
253250
// it uses NIO
254251
'io.netty.channel.kqueue.KQueue',
255252
'io.netty.channel.kqueue.KQueueDatagramChannel',
256-
'io.netty.channel.kqueue.KQueueDomainSocketChannel',
257253
'io.netty.channel.kqueue.KQueueEventLoopGroup',
258-
'io.netty.channel.kqueue.KQueueServerDomainSocketChannel',
259254
'io.netty.channel.kqueue.KQueueServerSocketChannel',
260255
'io.netty.channel.kqueue.KQueueSocketChannel',
261256
'io.netty.channel.epoll.Epoll',
262257
'io.netty.channel.epoll.EpollDatagramChannel',
263-
'io.netty.channel.epoll.EpollDomainSocketChannel',
264258
'io.netty.channel.epoll.EpollEventLoopGroup',
265-
'io.netty.channel.epoll.EpollServerDomainSocketChannel',
266259
'io.netty.channel.epoll.EpollServerSocketChannel',
267260
'io.netty.channel.epoll.EpollSocketChannel',
268-
'io.netty.incubator.channel.uring.IOUring',
269-
'io.netty.incubator.channel.uring.IOUringDatagramChannel',
270-
'io.netty.incubator.channel.uring.IOUringEventLoopGroup',
271-
'io.netty.incubator.channel.uring.IOUringServerSocketChannel',
272-
'io.netty.incubator.channel.uring.IOUringSocketChannel',
273261

274262
// from reactor.netty.http.server.HttpServer (reactor-netty)
275263
'io.netty.handler.codec.haproxy.HAProxyMessage',
@@ -279,11 +267,13 @@ tasks.named("thirdPartyAudit").configure {
279267
'org.osgi.framework.BundleActivator',
280268
'org.osgi.framework.BundleContext',
281269

270+
// from com.ctc.wstx.shaded.msv_core.driver.textui.Driver (woodstox-core)
271+
'com.sun.org.apache.xml.internal.resolver.Catalog',
272+
'com.sun.org.apache.xml.internal.resolver.tools.CatalogResolver',
273+
282274
'org.slf4j.impl.StaticLoggerBinder',
283275
'org.slf4j.impl.StaticMDCBinder',
284276
'org.slf4j.impl.StaticMarkerBinder',
285-
286-
'com.ctc.wstx.shaded.msv_core.driver.textui.Driver',
287277
)
288278

289279
ignoreViolations(
@@ -309,7 +299,11 @@ tasks.named("thirdPartyAudit").configure {
309299
'javax.activation.MailcapCommandMap',
310300
'javax.activation.MimetypesFileTypeMap',
311301

302+
'reactor.core.publisher.MultiProducerRingBuffer',
303+
'reactor.core.publisher.RingBufferFields',
312304
'reactor.core.publisher.Traces$SharedSecretsCallSiteSupplierFactory$TracingException',
305+
'reactor.core.publisher.UnsafeSequence',
306+
'reactor.core.publisher.UnsafeSupport'
313307
)
314308
}
315309
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.

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

-1
This file was deleted.

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

-1
This file was deleted.

plugins/repository-azure/licenses/netty-transport-native-unix-common-4.1.63.Final.jar.sha1

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

plugins/repository-azure/licenses/reactor-core-3.4.5.jar.sha1

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

plugins/repository-azure/licenses/reactor-netty-1.0.6.jar.sha1

-1
This file was deleted.

plugins/repository-azure/licenses/reactor-netty-core-1.0.6.jar.sha1

-1
This file was deleted.

plugins/repository-azure/licenses/reactor-netty-http-1.0.6.jar.sha1

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

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

-1
This file was deleted.

0 commit comments

Comments
 (0)