-
Notifications
You must be signed in to change notification settings - Fork 619
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
Migrate ECS client to aws-sdk-go-v2 #4447
Open
tinnywang
wants to merge
15
commits into
aws:dev
Choose a base branch
from
tinnywang:aws-sdk-go-v2/ecs
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
tinnywang
force-pushed
the
aws-sdk-go-v2/ecs
branch
2 times, most recently
from
December 6, 2024 08:34
6b18859
to
a1a9480
Compare
tinnywang
force-pushed
the
aws-sdk-go-v2/ecs
branch
2 times, most recently
from
December 10, 2024 11:19
1c2d4b8
to
7d2a689
Compare
Yiyuanzzz
approved these changes
Dec 13, 2024
tinnywang
force-pushed
the
aws-sdk-go-v2/ecs
branch
from
December 18, 2024 19:38
7d2a689
to
0d3c3a7
Compare
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.
Summary
Migrate ECS client to
aws-sdk-go-v2
.#4406 added our bespoke codegen'd
aws-sdk-go-v2
ECS client. This PR integrates the v2 ECS client with Agent and removes all uses of our v1 ECS client.Implementation details
In
go.mod
for theagent
andecs-agent
modules,github.com/aws/aws-sdk-go-v2/service/ecs
Update ECS client construction per the docs.
Replace all uses of our v1 ECS client with the v2 ECS client.
aws/aws-sdk-go/service/ecs
is now split betweenaws/aws-sdk-go-v2/service/ecs
andaws/aws-sdk-go-v2/service/ecs/types
.ContainerStateChange.NetworkBindings
changed from[]*NetworkBinding
to[]NetworkBinding
). See the docs for more info.int64
types are nowint32
(e.g.NetworkBinding.ContainerPort
andNetworkBinding.HostPort
changed from*int64
to*int32
).string
constants now have their own enum types aliased tostring
(e.g. theAgentUpdateStatus*
constants changed fromstring
to typeAgentUpdateStatus
.ErrCode*Exception
string constants have been replaced with Exception types (e.g.ErrCodeAccessDeniedException
("AccessDeniedException") now corresponds to theAccessDeniedException
type).Update error handling to handle SDKv1 and SDKv2 errors. v1 error handling can be removed after all clients have been migrated to
aws-sdk-go-v2
. See the docs for more info on error handling in v2.aws.Error
is analogous tosmithy.APIError
.string
error codes now have modeled error types (compare this v1 example with this v2 example).aws.RequestFailure
, which includes the request ID, is analogous tohttp.ResponseError
(see the docs for more info).Rewrite the
oneDayRetrier
to be compatible withaws-sdk-go-v2
per the docs.Testing
GitHub checks pass.
New tests cover the changes: no
Description for the changelog
Migrate ECS 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.