From 8f63673321bc77bcdc4ab12926f0509032f84a5b Mon Sep 17 00:00:00 2001 From: Matthew de Detrich Date: Sun, 12 Nov 2023 20:34:36 +0100 Subject: [PATCH] Change materializer type for chunkUploadSink in S3 DSL's --- ...nkUploadSink-type-param-change.backwards.excludes | 12 ++++++++++++ .../pekko/stream/connectors/s3/javadsl/S3.scala | 12 ++++++------ .../pekko/stream/connectors/s3/scaladsl/S3.scala | 8 ++++---- 3 files changed, 22 insertions(+), 10 deletions(-) create mode 100644 s3/src/main/mima-filters/1.0.x.backwards.excludes/chunkUploadSink-type-param-change.backwards.excludes diff --git a/s3/src/main/mima-filters/1.0.x.backwards.excludes/chunkUploadSink-type-param-change.backwards.excludes b/s3/src/main/mima-filters/1.0.x.backwards.excludes/chunkUploadSink-type-param-change.backwards.excludes new file mode 100644 index 000000000..1d9a11221 --- /dev/null +++ b/s3/src/main/mima-filters/1.0.x.backwards.excludes/chunkUploadSink-type-param-change.backwards.excludes @@ -0,0 +1,12 @@ +# These filters are here because a type argument in the chunkUploadSink parameter was changed from +# NotUsed to _ which has zero effect on runtime +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.javadsl.S3.resumeMultipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.javadsl.S3.multipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.javadsl.S3.resumeMultipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.resumeMultipartUploadWithHeadersAndContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.resumeMultipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.multipartUploadWithHeadersAndContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.multipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.multipartUploadWithHeadersAndContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.resumeMultipartUploadWithContext") +ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.stream.connectors.s3.scaladsl.S3.resumeMultipartUploadWithHeadersAndContext") diff --git a/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/javadsl/S3.scala b/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/javadsl/S3.scala index 41078d8f0..5873d978d 100644 --- a/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/javadsl/S3.scala +++ b/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/javadsl/S3.scala @@ -961,7 +961,7 @@ object S3 { def multipartUploadWithContext[C]( bucket: String, key: String, - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed], + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _], contentType: ContentType, s3Headers: S3Headers): Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = S3Stream @@ -1003,7 +1003,7 @@ object S3 { def multipartUploadWithContext[C]( bucket: String, key: String, - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed], + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _], contentType: ContentType): Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = multipartUploadWithContext[C](bucket, key, @@ -1034,7 +1034,7 @@ object S3 { def multipartUploadWithContext[C]( bucket: String, key: String, - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed]) + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _]) : Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = multipartUploadWithContext[C](bucket, key, chunkUploadSink, ContentTypes.APPLICATION_OCTET_STREAM) @@ -1133,7 +1133,7 @@ object S3 { key: String, uploadId: String, previousParts: java.lang.Iterable[Part], - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed], + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _], contentType: ContentType, s3Headers: S3Headers): Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = { S3Stream @@ -1183,7 +1183,7 @@ object S3 { key: String, uploadId: String, previousParts: java.lang.Iterable[Part], - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed], + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _], contentType: ContentType): Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = resumeMultipartUploadWithContext[C](bucket, key, @@ -1221,7 +1221,7 @@ object S3 { key: String, uploadId: String, previousParts: java.lang.Iterable[Part], - chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], NotUsed]) + chunkUploadSink: Sink[JPair[UploadPartResponse, java.lang.Iterable[C]], _]) : Sink[JPair[ByteString, C], CompletionStage[MultipartUploadResult]] = resumeMultipartUploadWithContext[C](bucket, key, diff --git a/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/scaladsl/S3.scala b/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/scaladsl/S3.scala index 56cd9bc86..9a09fef56 100644 --- a/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/scaladsl/S3.scala +++ b/s3/src/main/scala/org/apache/pekko/stream/connectors/s3/scaladsl/S3.scala @@ -581,7 +581,7 @@ object S3 { def multipartUploadWithContext[C]( bucket: String, key: String, - chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), NotUsed], + chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), _], contentType: ContentType = ContentTypes.`application/octet-stream`, metaHeaders: MetaHeaders = MetaHeaders(Map()), cannedAcl: CannedAcl = CannedAcl.Private, @@ -626,7 +626,7 @@ object S3 { def multipartUploadWithHeadersAndContext[C]( bucket: String, key: String, - chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), NotUsed], + chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), _], contentType: ContentType = ContentTypes.`application/octet-stream`, chunkSize: Int = MinChunkSize, chunkingParallelism: Int = 4, @@ -710,7 +710,7 @@ object S3 { key: String, uploadId: String, previousParts: immutable.Iterable[Part], - chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), NotUsed], + chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), _], contentType: ContentType = ContentTypes.`application/octet-stream`, metaHeaders: MetaHeaders = MetaHeaders(Map()), cannedAcl: CannedAcl = CannedAcl.Private, @@ -797,7 +797,7 @@ object S3 { key: String, uploadId: String, previousParts: immutable.Iterable[Part], - chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), NotUsed], + chunkUploadSink: Sink[(UploadPartResponse, immutable.Iterable[C]), _], contentType: ContentType = ContentTypes.`application/octet-stream`, chunkSize: Int = MinChunkSize, chunkingParallelism: Int = 4,