Skip to content

Commit

Permalink
Revert "chore: config aws s3 sdk to avoid connection closed error 2 (#…
Browse files Browse the repository at this point in the history
…50995)"

This reverts commit 1061780.
  • Loading branch information
tryangul committed Jan 9, 2025
1 parent 7a196ae commit 36f6d08
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
3 changes: 1 addition & 2 deletions airbyte-cdk/bulk/toolkits/load-s3/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@ dependencies {
api project(':airbyte-cdk:bulk:toolkits:bulk-cdk-toolkit-load-object-storage')

testFixturesApi(testFixtures(project(":airbyte-cdk:bulk:toolkits:bulk-cdk-toolkit-load-object-storage")))
implementation("aws.sdk.kotlin:s3:1.3.98")
implementation("aws.smithy.kotlin:http-client-engine-okhttp:1.3.31")
implementation("aws.sdk.kotlin:s3:1.3.94")
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import aws.sdk.kotlin.services.s3.model.PutObjectRequest
import aws.smithy.kotlin.runtime.auth.awscredentials.CredentialsProvider
import aws.smithy.kotlin.runtime.content.ByteStream
import aws.smithy.kotlin.runtime.content.toInputStream
import aws.smithy.kotlin.runtime.http.engine.okhttp.OkHttpEngine
import aws.smithy.kotlin.runtime.net.url.Url
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings
import io.airbyte.cdk.load.command.aws.AWSAccessKeyConfigurationProvider
Expand All @@ -39,7 +38,6 @@ import jakarta.inject.Singleton
import java.io.ByteArrayOutputStream
import java.io.InputStream
import java.io.OutputStream
import kotlin.time.Duration.Companion.milliseconds
import kotlinx.coroutines.flow.flow

data class S3Object(override val key: String, override val storageConfig: S3BucketConfiguration) :
Expand Down Expand Up @@ -246,9 +244,6 @@ class S3ClientFactory(
Url.parse(it)
} else null
}
// Fix for connection reset issue:
// https://github.com/awslabs/aws-sdk-kotlin/issues/1214#issuecomment-2464831817
httpClient(OkHttpEngine) { connectionIdlePollingInterval = 200.milliseconds }
}

return S3Client(
Expand Down

0 comments on commit 36f6d08

Please sign in to comment.