Skip to content

Commit

Permalink
JarHell caused by latest software.amazon.awssdk 2.20.141 (#616)
Browse files Browse the repository at this point in the history
Signed-off-by: Andriy Redko <andriy.redko@aiven.io>
  • Loading branch information
reta authored Sep 13, 2023
1 parent 301687d commit 7be86f3
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 @@ -41,6 +41,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
### Removed

### Fixed
- [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 @@ -55,6 +55,12 @@ plugins {
}
apply(plugin = "opensearch.repositories")

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 7be86f3

Please sign in to comment.