Skip to content

Update scalafmt-core to 3.8.5 #677

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.5
5423839d1776acc31b630bbeed5093eb042ca6d4
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.8.2
version = 3.8.5
runner.dialect = scala213
preset = default
align.preset = more
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,33 +213,33 @@ class BackupClient[T <: KafkaConsumerInterface](maybeS3Settings: Option[S3Settin
for {
exists <- checkObjectExists(previousState.previousKey)
} yield
// The backupToStorageTerminateSink gets called in response to finding in progress multipart uploads. If an S3 object exists
// the same key that means that in fact the upload has already been completed so in this case lets not do anything
if (exists) {
logger.debug(
s"Previous upload with uploadId: ${previousState.stateDetails.state.uploadId} and key: ${previousState.previousKey} doesn't actually exist, skipping terminating"
)
Sink.ignore
} else {
logger.info(
s"Terminating and completing previous backup with key: ${previousState.previousKey} and uploadId: ${previousState.stateDetails.state.uploadId}"
)
val sink = S3
.resumeMultipartUploadWithHeaders(
s3Config.dataBucket,
previousState.previousKey,
previousState.stateDetails.state.uploadId,
previousState.stateDetails.state.parts,
s3Headers = s3Headers,
chunkingParallelism = 1
// The backupToStorageTerminateSink gets called in response to finding in progress multipart uploads. If an S3 object exists
// the same key that means that in fact the upload has already been completed so in this case lets not do anything
if (exists) {
logger.debug(
s"Previous upload with uploadId: ${previousState.stateDetails.state.uploadId} and key: ${previousState.previousKey} doesn't actually exist, skipping terminating"
)

val base =
sink.mapMaterializedValue(future => future.map(result => Some(result))(ExecutionContext.parasitic))

maybeS3Settings
.fold(base)(s3Settings => base.withAttributes(S3Attributes.settings(s3Settings)))
}
Sink.ignore
} else {
logger.info(
s"Terminating and completing previous backup with key: ${previousState.previousKey} and uploadId: ${previousState.stateDetails.state.uploadId}"
)
val sink = S3
.resumeMultipartUploadWithHeaders(
s3Config.dataBucket,
previousState.previousKey,
previousState.stateDetails.state.uploadId,
previousState.stateDetails.state.parts,
s3Headers = s3Headers,
chunkingParallelism = 1
)

val base =
sink.mapMaterializedValue(future => future.map(result => Some(result))(ExecutionContext.parasitic))

maybeS3Settings
.fold(base)(s3Settings => base.withAttributes(S3Attributes.settings(s3Settings)))
}

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,8 @@ class MockedKafkaConsumerInterface(kafkaData: Source[ReducedConsumerRecord, NotU

val finalSource = if (handleOffsets) {
source.filter { reducedConsumerRecord =>
(commitStorage.isEmpty || {
reducedConsumerRecord.offset > commitStorage.getLast
}) && {
(commitStorage.isEmpty ||
reducedConsumerRecord.offset > commitStorage.getLast) && {
(stopAfterDuration, Option(firstReducedConsumerRecord.get())) match {
case (Some(afterDuration), Some(firstRecord)) =>
val difference =
Expand Down
Loading