Skip to content

Commit

Permalink
JarHell caused by latest software.amazon.awssdk 2.20.141 (#616) (#622)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <[email protected]>
(cherry picked from commit 7be86f3)
  • Loading branch information
reta authored Sep 14, 2023
1 parent 239b5d9 commit 03de404
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

### Fixed
- Fix PutMappingRequest by removing unsupported fields ([#597](https://github.com/opensearch-project/opensearch-java/pull/597))
- [BUG] JarHell caused by latest software.amazon.awssdk 2.20.141 ([#616](https://github.com/opensearch-project/opensearch-java/pull/616))

### Security

Expand Down
6 changes: 6 additions & 0 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ plugins {
id("com.github.jk1.dependency-license-report") version "2.5"
}

configurations {
all {
exclude(group = "software.amazon.awssdk", module = "third-party-jackson-core")
}
}

checkstyle {
toolVersion = "10.0"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,15 @@ public void testCatPitSegments() throws Exception {
.pitSegments(r -> r.headers("index,shard,id,segment,size"));

assertNotNull("PitSegmentsResponse.segments() is null", PitSegmentsResponse.valueBody());
assertTrue("PitSegmentsResponse.segments().size() == 0",

if (Version.fromString(version).onOrAfter(Version.fromString("2.10.0"))) {
assertTrue("PitSegmentsResponse.segments().size() == 0",
PitSegmentsResponse.valueBody().isEmpty());
} else {
assertTrue("PitSegmentsResponse.segments().size() == 0",
PitSegmentsResponse.valueBody().size() > 0);
}
}

private void createIndex(String indexName) throws Exception {
CreateIndexResponse createResponse = javaClient().indices().create(b -> b.index(indexName));
Expand Down

0 comments on commit 03de404

Please sign in to comment.