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 container instance health doctor to ecs-agent/ #3662

Merged
merged 1 commit into from
May 1, 2023

Conversation

danehlim
Copy link
Contributor

@danehlim danehlim commented Apr 28, 2023

Summary

Move doctor (container instance health) to ecs-agent/ and reformat accordingly.

NOTE: An interface for logging to be used in ecs-agent/ will be added as part of a future PR and is out of scope of this PR. For now, we continue to leverage our existing dependency on seelog in the ecs-agent module.

Implementation details

  • Move agent/doctor/doctor.go, agent/doctor/doctor_test.go, agent/doctor/healthcheck.go, agent/doctor/healthcheckstatus.go, and agent/doctor/healthcheckstatus_test.go to ecs-agent/doctor/ directory
  • Replace all imports of github.com/aws/amazon-ecs-agent/agent/doctor with github.com/aws/amazon-ecs-agent/ecs-agent/doctor and then resort imports
  • For files that previously imported github.com/aws/amazon-ecs-agent/agent/doctor but still have a dependency on agent/doctor/docker_runtime_healthcheck.go, reimport github.com/aws/amazon-ecs-agent/agent/doctor with alias dockerdoctor (to avoid package name conflict with github.com/aws/amazon-ecs-agent/ecs-agent/doctor)
    • github.com/aws/amazon-ecs-agent/ecs-agent/doctor is for general container instance health check functionality and constants
    • github.com/aws/amazon-ecs-agent/agent/doctor is for container instance health check things that are specific to our Agent, such as Docker health checks (since our Agent is Docker based)
  • Update doctor tests to use correct expected and actual values for assertions
  • Update health check status tests to use assert package for assertions
  • Go into agent/ directory and run go mod tidy and go mod vendor
  • Go into ecs-agent/ directory and run go mod tidy and go mod vendor

Testing

Unit, integration, and functional tests.

Description for the changelog

Move container instance health doctor 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.

@danehlim danehlim changed the title dummy Move container instance health doctor to ecs-agent/ Apr 28, 2023
@danehlim danehlim marked this pull request as ready for review April 28, 2023 16:09
@danehlim danehlim requested a review from a team as a code owner April 28, 2023 16:09
ecs-agent/go.mod Outdated Show resolved Hide resolved
amogh09
amogh09 previously approved these changes May 1, 2023
Copy link
Contributor

@amogh09 amogh09 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM overall. Left a couple of minor comments.

ecs-agent/doctor/doctor_test.go Outdated Show resolved Hide resolved
ecs-agent/doctor/healthcheckstatus_test.go Outdated Show resolved Hide resolved
YashdalfTheGray
YashdalfTheGray previously approved these changes May 1, 2023
agent/app/agent.go Outdated Show resolved Hide resolved
amogh09
amogh09 previously approved these changes May 1, 2023
ecs-agent/doctor/healthcheckstatus_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@YashdalfTheGray YashdalfTheGray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good, thanks for making the updates.

@danehlim danehlim merged commit d9bdd9a into aws:dev May 1, 2023
@Realmonia Realmonia mentioned this pull request May 9, 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