Skip to content

Conversation

@javuto
Copy link
Collaborator

@javuto javuto commented Nov 25, 2025

Avoid using deprecated code and update usage of the aws sdk to v2

@javuto javuto requested a review from Copilot November 25, 2025 09:08
@javuto javuto added refactor Refactorization of code osctrl-tls osctrl-tls related changes 🗄️ logging Logging related issues labels Nov 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates the Kinesis logger from AWS SDK v1 to v2, removing deprecated code and updating to modern AWS SDK patterns. The migration includes updating import statements, refactoring session/client initialization, and adapting API calls to the v2 interface.

Key Changes:

  • Replaced AWS SDK v1 imports with v2 equivalents and updated client initialization
  • Refactored configuration loading to use AWS SDK v2's LoadDefaultConfig pattern
  • Updated API method calls to use context-aware v2 signatures

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
pkg/logging/kinesis.go Migrated from AWS SDK v1 to v2 with updated imports, client initialization using LoadDefaultConfig, and context-aware API calls
go.mod Removed aws-sdk-go v1 dependency, updated v2 packages to latest versions, and added kinesis service dependency
Comments suppressed due to low confidence (1)

go.mod:3

  • Go version 1.24.3 does not exist. As of January 2025, the latest stable Go version was 1.23.x. This should be corrected to a valid Go version (e.g., 1.23.0 or an appropriate version for your project).
go 1.24.3

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

go.mod Outdated
github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.4 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.13 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.13 // indirect
github.com/aws/aws-sdk-go-v2/service/kinesis v1.42.5
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The kinesis service dependency should be moved to the direct dependencies section (require block starting at line 5) rather than the indirect dependencies section, since it's directly imported and used in pkg/logging/kinesis.go.

Copilot uses AI. Check for mistakes.
@javuto javuto closed this Nov 25, 2025
@javuto javuto merged commit dac6f7e into main Nov 25, 2025
55 checks passed
@javuto javuto deleted the migrate-aws-sdk-v2 branch November 25, 2025 09:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗄️ logging Logging related issues osctrl-tls osctrl-tls related changes refactor Refactorization of code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants