Skip to content
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

[WIP - TEST] Migrate ecr pure sdk #4512

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

TheanLim
Copy link
Contributor

@TheanLim TheanLim commented Feb 20, 2025

Summary

Migrate ECR client to aws-sdk-go-v2.

Implementation details

  • Migrate our v1 ECR client to v2 ECR SDK client
    • Migrate from the v1 bespoke ECR client to using the official ECR SDK.
    • Replace our v1 ECR types to v2 ECR types
    • Update GetAuthorizationToken() signature to match the v2 client's
      • Update GetAuthorizationTokenInput, which now takes in a slice of strings instead of an array of string pointers
    • Update ECR Client Construction per doc
      • Use aws-sdk-go-v2 config and credentials instead of v1 aws.NewConfig(), credentials and session. Configuration Loading doc for reference
      • Get instancecreds referring to #4446
      • Replace cfg.BaseEndpoint with cfg.Endpoint
      • Replace aws.StringValue -> aws.ToString, aws.TimeValue -> aws.ToTime, aws.IntValue -> aws.ToInt
  • Generate ECR mocks (for v2 client)
  • Remove our v1 ECR Client
  • Update vendor modules for the agent module.

Testing

Github checks pass.

New tests cover the changes: no

Description for the changelog

Migrate ECR client to aws-sdk-go-v2.

Licensing

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@TheanLim TheanLim requested a review from a team as a code owner February 20, 2025 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants