-
Notifications
You must be signed in to change notification settings - Fork 2
Add concurrent transaction tests for DynamoDB adapter with AWS SDK v2 migration and golangci-lint fixes #205
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
Add concurrent transaction tests for DynamoDB adapter with AWS SDK v2 migration and golangci-lint fixes #205
Conversation
Co-authored-by: bootjp <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 [golangci] reported by reviewdog 🐶
SA1019: "github.com/aws/aws-sdk-go/aws/credentials" is deprecated: aws-sdk-go is deprecated. Use aws-sdk-go-v2. See https://aws.amazon.com/blogs/developer/announcing-end-of-support-for-aws-sdk-for-go-v1-on-july-31-2025/. (staticcheck)
elastickv/adapter/dynamodb_test.go
Line 10 in 6905c19
| "github.com/aws/aws-sdk-go/aws/credentials" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot 対応してください
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot fix
#205 (comment)
|
@copilot |
…arnings Co-authored-by: bootjp <[email protected]>
Fixed the SA1019 deprecation warning by migrating from AWS SDK v1 to v2. Updated all imports and usage patterns to use the modern AWS SDK v2 API. The staticcheck warning is now resolved. Commit: da8aa3a |
|
@copilot golangci-lintをパスさせてください |
…uration Co-authored-by: bootjp <[email protected]>
bootjp
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR adds comprehensive test coverage for DynamoDB adapter transactions under concurrent load, migrates from the deprecated AWS SDK v1 to AWS SDK v2, and resolves all golangci-lint issues to ensure CI passes.
Problem
The existing DynamoDB adapter transaction tests only covered single-threaded scenarios and were using the deprecated AWS SDK v1, which triggered SA1019 staticcheck warnings. Additionally, golangci-lint was failing due to version compatibility issues and unsafe type assertions, preventing CI from passing. Given that distributed systems often handle concurrent requests, it was important to verify that the transaction implementation correctly handles:
Solution
New Test Coverage
Added two new test cases following the existing codebase patterns:
TestDynamoDB_TransactWriteItems_ConcurrentTestDynamoDB_TransactWriteItems_Concurrent_ConflictingAWS SDK v2 Migration
Migrated all DynamoDB test code from AWS SDK v1 to v2 to resolve deprecation warnings:
github.com/aws/aws-sdk-go/*togithub.com/aws/aws-sdk-go-v2/*session.NewSessionwithconfig.LoadDefaultConfigBaseEndpointinstead of global resolvertypes.AttributeValueinterfaceWithContextsuffix (modern SDK v2 pattern)golangci-lint Fixes
Resolved all linting issues to ensure CI passes:
okpatternTesting
Both new tests and all existing tests continue to pass, confirming no regressions were introduced. The migration maintains full functional compatibility while using the modern, supported AWS SDK.
Impact
These tests provide confidence that the DynamoDB adapter's transaction handling is robust under concurrent load, which is critical for production deployment in distributed environments. The SDK migration ensures the codebase uses supported, non-deprecated dependencies, while the golangci-lint fixes ensure the CI pipeline runs successfully.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.