From b2b4d746c3b3d0028db5fe1f0b05b00a84eeaec6 Mon Sep 17 00:00:00 2001 From: "Ryan Br..." Date: Thu, 9 Jan 2025 08:38:52 -0800 Subject: [PATCH] =?UTF-8?q?Revert=20"chore:=20config=20aws=20s3=20sdk=20to?= =?UTF-8?q?=20avoid=20connection=20closed=20error=202=20(=E2=80=A6=20(#509?= =?UTF-8?q?98)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- airbyte-cdk/bulk/toolkits/load-s3/build.gradle | 3 +-- .../src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/airbyte-cdk/bulk/toolkits/load-s3/build.gradle b/airbyte-cdk/bulk/toolkits/load-s3/build.gradle index ec1667e9b2ca..e19bc337b342 100644 --- a/airbyte-cdk/bulk/toolkits/load-s3/build.gradle +++ b/airbyte-cdk/bulk/toolkits/load-s3/build.gradle @@ -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") } diff --git a/airbyte-cdk/bulk/toolkits/load-s3/src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt b/airbyte-cdk/bulk/toolkits/load-s3/src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt index 48558739a029..e3d36350b9b3 100644 --- a/airbyte-cdk/bulk/toolkits/load-s3/src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt +++ b/airbyte-cdk/bulk/toolkits/load-s3/src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt @@ -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 @@ -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) : @@ -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(