Upgrade AWS SDK to v2#14
Open
eagletmt wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Upgrades the project’s AWS integrations from AWS SDK for Java v1 to AWS SDK v2 across the stream, shared, batch, and merge modules, updating S3/SQS/SNS/Glue usage and related tests/build dependencies.
Changes:
- Migrate S3/SQS/SNS/Glue client and model usage to AWS SDK v2 (builders, response types, getters).
- Update S3 event notification parsing to the v2
s3-event-notificationslibrary in the stream dispatcher. - Adjust tests and Gradle dependencies to align with AWS SDK v2 APIs.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| stream/src/test/java/com/cookpad/prism/stream/events/SqsEventDispatcherTest.java | Updates SQS test mocks/models to AWS SDK v2 types. |
| stream/src/main/java/com/cookpad/prism/stream/filequeue/S3QueueDownloader.java | Switches S3 downloader to S3Client + GetObjectRequest and URI input. |
| stream/src/main/java/com/cookpad/prism/stream/events/SqsEventDispatcher.java | Migrates SQS receive/delete + S3 event parsing to AWS SDK v2. |
| stream/src/main/java/com/cookpad/prism/stream/events/FileQueueEventDispatcher.java | Replaces AmazonS3URI parsing with URI parsing for queue entries. |
| stream/src/main/java/com/cookpad/prism/stream/Main.java | Replaces v1 AWS clients with v2 client beans. |
| stream/src/main/java/com/cookpad/prism/stream/FileQueueEventDispatcherFactory.java | Updates queue-file URI handling to URI. |
| stream/src/main/java/com/cookpad/prism/objectstore/StagingObjectStore.java | Migrates S3 getObject usage to AWS SDK v2. |
| stream/build.gradle | Adds AWS SDK v2 s3-event-notifications dependency. |
| shared/src/test/java/com/cookpad/prism/objectstore/PrismObjectStoreTest.java | Updates S3 putObject test to AWS SDK v2 request/body. |
| shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStoreFactory.java | Switches factory dependency from AmazonS3 to S3Client. |
| shared/src/main/java/com/cookpad/prism/objectstore/PrismObjectStore.java | Migrates S3 get/put and tagging to AWS SDK v2 APIs. |
| shared/build.gradle | Replaces AWS SDK v1 dependencies with AWS SDK v2 modules. |
| merge/src/main/java/com/cookpad/prism/merge/Main.java | Replaces v1 S3 client bean with v2 S3Client. |
| batch/src/test/java/com/cookpad/prism/batch/catalog/CatalogTableTest.java | Updates Glue model accessors to AWS SDK v2 style. |
| batch/src/main/java/com/cookpad/prism/batch/catalog/UpsertPartitionRequest.java | Migrates Glue request construction to v2 builders. |
| batch/src/main/java/com/cookpad/prism/batch/catalog/CatalogTable.java | Migrates Glue table/partition/database model building to v2 builders. |
| batch/src/main/java/com/cookpad/prism/batch/catalog/Catalog.java | Migrates Glue client and pagination/result handling to AWS SDK v2. |
| batch/src/main/java/com/cookpad/prism/batch/UnlinkTableCmd.java | Migrates Glue delete table request to AWS SDK v2 builder API. |
| batch/src/main/java/com/cookpad/prism/batch/Main.java | Replaces v1 AWS clients with v2 S3/Glue client beans. |
| batch/src/main/java/com/cookpad/prism/batch/ListStagingObjectsCmd.java | Migrates S3 listing and putObject to AWS SDK v2 APIs; uses URI for destination. |
| batch/src/main/java/com/cookpad/prism/batch/CmdRunner.java | Updates dest S3 URI parsing to URI. |
| batch/build.gradle | Replaces AWS SDK v1 Glue dependency with AWS SDK v2 Glue module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
56
to
64
| @Bean | ||
| public AmazonSQS sqs() { | ||
| return AmazonSQSClientBuilder.defaultClient(); | ||
| public SqsClient sqs() { | ||
| return SqsClient.create(); | ||
| } | ||
|
|
||
| @Bean | ||
| public AmazonS3 s3() { | ||
| return AmazonS3ClientBuilder.defaultClient(); | ||
| public S3Client s3() { | ||
| return S3Client.create(); | ||
| } |
Comment on lines
33
to
41
| @Bean | ||
| public AmazonS3 s3() { | ||
| return AmazonS3ClientBuilder.defaultClient(); | ||
| public S3Client s3() { | ||
| return S3Client.create(); | ||
| } | ||
|
|
||
| @Bean | ||
| public AWSGlue glue() { | ||
| return AWSGlueClientBuilder.defaultClient(); | ||
| public GlueClient glue() { | ||
| return GlueClient.create(); | ||
| } |
| @@ -39,8 +38,8 @@ public static void main(String[] args) { | |||
| } | |||
|
|
|||
| @Bean | |||
Comment on lines
+32
to
37
| void putLiveObjectFile_shouldCreateRequestWithCorrectTag() throws IOException { | ||
| // Arrange | ||
| LocalDate testDate = LocalDate.of(2025, 1, 1); | ||
| long objectId = 100; | ||
| File testFile = mock(File.class); | ||
| File testFile = Files.createTempFile("prism-test-", ".tmp").toFile(); | ||
| String bucketName = "test-bucket"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.