-
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
Consume ECS client from ecs-agent module in agent module #4032
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
fierlion
reviewed
Nov 16, 2023
fierlion
reviewed
Nov 16, 2023
fierlion
reviewed
Nov 16, 2023
fierlion
reviewed
Nov 16, 2023
danehlim
force-pushed
the
ecsclient-agent-integration
branch
3 times, most recently
from
November 17, 2023 21:42
e5b9177
to
44eb7c2
Compare
mye956
reviewed
Nov 18, 2023
fierlion
previously approved these changes
Nov 20, 2023
mye956
previously approved these changes
Nov 20, 2023
danehlim
force-pushed
the
ecsclient-agent-integration
branch
from
November 20, 2023 19:04
44eb7c2
to
7c9786b
Compare
fierlion
approved these changes
Nov 20, 2023
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.
approve (post merge)
mye956
approved these changes
Nov 20, 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
In the agent module, consume the ECS client defined in ecs-agent module.
Implementation details
NewContainerMetadataGetter
andNewTaskMetadataGetter
functions defined inagent/api/metadata_getter.go
private as they are not to be used outside of the agent module'sapi
packageToECSAgent
translation methods for agent module levelTaskStateChange
,ContainerStateChange
, andAttachmentStateChange
state change types that convert to the state change types defined in the ecs-agent moduleProtocolBindIP
and helper functionsbuildManagedAgentStateChangePayload
andbuildContainerStateChangePayload
introduced as part of this pull request inagent/api/statechange.go
are based off the components with the same names currently defined inagent/api/ecsclient/client.go
Int64PtrToIntPtr
inecs-agent/utils/utils.go
for use inToECSAgent
translation methodecs-agent/acs/session/session.go
, refactorsession
struct fielddiscoverEndpointClient
of typeapi.ECSDiscoverEndpointSDK
such that it is renamed to struct fieldecsClient
with typeecs.ECSClient
insteadapi.ECSDiscoverEndpointSDK
is currently being used in ACS session but is no longer necessary now that there exists an ECS client in the ecs-agent module that we are consuming in agent module as part of this pull requestagent/api/task/task_test.go
to assert that container port zero will explicitly not be included in the set of container ports that are exposed for a containeragent/api/ecsclient/client.go
agent/api/ecsclient/client_test.go
agent/api/ecsclient/retry_handler.go
agent/api/ecsclient/retry_handler_test.go
agent/api/ecsclient/utils.go
agent/api/ecsclient/utils_amd64_test.go
agent/api/ecsclient/utils_arm64_test.go
agent/api/generate_mocks.go
agent/api/interface.go
agent/api/mocks/api_mocks.go
ecs-agent/api/generate_mocks.go
ecs-agent/api/interface.go
ecs-agent/api/mocks/api_mocks.go
Testing
Unit, integration, and functional tests.
New tests cover the changes: yes
Description for the changelog
Consume ECS client from ecs-agent module in agent module
Does this PR include breaking model changes? If so, Have you added transformation functions?
No
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.