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

Move ECSTaskProtectionSDK interface to ecs-agent #3756

Merged
merged 3 commits into from
Jun 26, 2023

Conversation

amogh09
Copy link
Contributor

@amogh09 amogh09 commented Jun 21, 2023

Summary

Moving ECSTaskProtectionSDK interface to ecs-agent module. The interface is only used by TMDS task scale-in protection endpoint handlers. The handlers will be moved to ecs-agent module in upcoming PRs.

Note that this PR includes some changes to agent/vendor/github.com/aws/amazon-ecs-agent/ecs-agent/tcs/handler/handler.go file which are a result of running go mod vendor in agent module. The changes were added in #3731. Most likely vendor sync was not performed when this change was made in ecs-agent which is why it's showing up on this PR. I have confirmed with the author of that PR that the changes are safe.

Implementation details

  • Move ECSTaskProtectionSDK interface from agent/api/interface.go to ecs-agent/api/interface.go.
  • Move mockgen command to generate a mock for the interface from agent/api/generate_mocks.go to ecs-agent/api/generate_mocks.go.
  • Run make gogenerate for both agent and ecs-agent modules.
  • Update imports in agent module to consume the interface from ecs-agent module.

Testing

Automated tests only.

New tests cover the changes: no

Description for the changelog

Move ECSTaskProtectionSDK interface to ecs-agent

Licensing

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

@amogh09 amogh09 marked this pull request as ready for review June 21, 2023 18:55
@amogh09 amogh09 requested a review from a team as a code owner June 21, 2023 18:55
@amogh09 amogh09 requested review from Realmonia and removed request for Realmonia June 23, 2023 00:10
@amogh09 amogh09 merged commit 894ce44 into aws:dev Jun 26, 2023
xxx0624 pushed a commit to xxx0624/amazon-ecs-agent that referenced this pull request Jun 27, 2023
@mye956 mye956 mentioned this pull request Jul 5, 2023
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.

4 participants