From e7b8fc4d97cf67b5fbfbd7dde9bdb18d2ca2a91f Mon Sep 17 00:00:00 2001 From: "Ryan Br..." Date: Thu, 9 Jan 2025 14:33:37 -0800 Subject: [PATCH] chore: Use CRT http engine. (#51021) Co-authored-by: Octavia Squidington III --- airbyte-cdk/bulk/toolkits/load-s3/build.gradle | 3 ++- .../src/main/kotlin/io/airbyte/cdk/load/file/s3/S3Client.kt | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/airbyte-cdk/bulk/toolkits/load-s3/build.gradle b/airbyte-cdk/bulk/toolkits/load-s3/build.gradle index e19bc337b342..c495dc5e9d0b 100644 --- a/airbyte-cdk/bulk/toolkits/load-s3/build.gradle +++ b/airbyte-cdk/bulk/toolkits/load-s3/build.gradle @@ -5,5 +5,6 @@ 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.94") + implementation("aws.sdk.kotlin:s3:1.3.98") + implementation("aws.smithy.kotlin:http-client-engine-crt:1.3.31") } 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 e3d36350b9b3..810d671967b4 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,6 +18,7 @@ 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.crt.CrtHttpEngine import aws.smithy.kotlin.runtime.net.url.Url import edu.umd.cs.findbugs.annotations.SuppressFBWarnings import io.airbyte.cdk.load.command.aws.AWSAccessKeyConfigurationProvider @@ -244,6 +245,10 @@ class S3ClientFactory( Url.parse(it) } else null } + + // Fix for connection reset issue: + // https://github.com/awslabs/aws-sdk-kotlin/issues/1214#issuecomment-2464831817 + httpClient(CrtHttpEngine) } return S3Client(