-
Notifications
You must be signed in to change notification settings - Fork 613
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
Move ACS client to ecs-agent module and refactor #3710
Merged
Merged
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
danehlim
force-pushed
the
ecs-agent-acs-client
branch
from
May 23, 2023 18:55
b184117
to
cd8844c
Compare
danehlim
force-pushed
the
ecs-agent-acs-client
branch
from
May 24, 2023 18:23
cd8844c
to
339f1c7
Compare
ubhattacharjya
previously approved these changes
May 24, 2023
ohsoo
reviewed
May 24, 2023
ohsoo
reviewed
May 24, 2023
ohsoo
reviewed
May 24, 2023
ohsoo
reviewed
May 24, 2023
ohsoo
reviewed
May 24, 2023
danehlim
force-pushed
the
ecs-agent-acs-client
branch
from
May 25, 2023 05:52
339f1c7
to
b8ea04c
Compare
danehlim
force-pushed
the
ecs-agent-acs-client
branch
from
May 25, 2023 15:16
b8ea04c
to
eacf30d
Compare
ubhattacharjya
approved these changes
May 25, 2023
ohsoo
approved these changes
May 25, 2023
Merged
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
Use ecs-agent module's wsclient in ACS, move ACS client to ecs-agent module, and refactor associated code.
Implementation details
agent/acs/
, swap out the following imports in all files:github.com/aws/amazon-ecs-agent/agent/wsclient
withgithub.com/aws/amazon-ecs-agent/ecs-agent/wsclient
github.com/aws/amazon-ecs-agent/agent/wsclient/mock
withgithub.com/aws/amazon-ecs-agent/ecs-agent/wsclient/mock
github.com/aws/amazon-ecs-agent/agent/wsclient/wsconn
withgithub.com/aws/amazon-ecs-agent/ecs-agent/wsclient/wsconn
agent/acs/client
and move toecs-agent/
agent/acs/client/acs_client.go
->ecs-agent/acs/client/acs_client.go
ecs-agent
modulegithub.com/aws/amazon-ecs-agent/ecs-agent/logger
instead ofgithub.com/cihub/seelog
for loggingacsClientFactory
struct and refactorNew()
function intoacsClientFactory
struct method, such thatacsClientFactory
struct implementswsclient.ClientFactory
interfacewsclient.ClientFactory
interface returns a newwsclient.ClientServer
and helps in testing session/ACS handler code, which is critical for ACS (we can now easily test and define what to expect during session's creation of ACS client/how the ACS client came to be in the first place)acsClientFactory
struct itself is zero (since it contains no fields) and thus does not introduce any need for additional storageagent/acs/client/acs_client_test.go
->ecs-agent/acs/client/acs_client_test.go
agent/acs/client/acs_client_types.go
->ecs-agent/acs/client/acs_client_types.go
ecs-agent/acs/client/acs_error.go
->ecs-agent/acs/client/acs_error.go
ecs-agent/acs/client/acs_error_test.go
->ecs-agent/acs/client/acs_error_test.go
agent/acs/handler/acs_handler.go
and associated filesagent/acs/handler/acs_handler.go
agent/acs/handler/acs_handler_test.go
agent/acs/handler/acs_handler.go
agent/app/agent.go
acshandler.NewSession
function based off of changes toagent/acs/handler/acs_handler.go
Testing
Unit, integration, and functional tests.
New tests cover the changes: yes
Description for the changelog
Move ACS client to ecs-agent module and refactor
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.