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

Implement agent introspection server in ecs-agent #4482

Merged
merged 9 commits into from
Jan 31, 2025

Conversation

willmyrs
Copy link

Summary

As part of the effort to bring the Agent Introspection Server to the Fargate Agent, this change implements the agent introspection server in the shared ecs-agent library.

Implementation details

The http server logic for the introspection server is implemented in the shared ecs-agent library. This refactored server is responsible for handling http requests and generating responses. The server defines an AgentState interface which will be implemented in the ECS and Fargate agents. The AgentState implementations will supply the server with the data it needs to construct responses.

Testing

Unit and integration tests

New unit and integration tests were added to the introspection package in ecs-agent. Where applicable, existing tests were copied and modified to help ensure the new server implementation will have the same outward-facing behavior.

Description for the changelog

Feature - Implement agent introspection server in shared library

Additional Information

Does this PR include breaking model changes? If so, Have you added transformation functions?
No

Does this PR include the addition of new environment variables in the README?
No

Licensing

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

@willmyrs
Copy link
Author

willmyrs commented Jan 28, 2025

Per suggestion from @sparrc, I am splitting Move introspection server to ecs-agent into two pull requests:

  1. Implement agent introspection server in shared ecs-agent (this PR)
  2. Refactor introspection api to consume shared implementation #4483

ecs-agent/introspection/handlers.go Outdated Show resolved Hide resolved
ecs-agent/introspection/response.go Outdated Show resolved Hide resolved
ecs-agent/introspection/handlers.go Outdated Show resolved Hide resolved
ecs-agent/introspection/handlers_test.go Outdated Show resolved Hide resolved
ecs-agent/introspection/handlers.go Outdated Show resolved Hide resolved
ecs-agent/introspection/server.go Show resolved Hide resolved
ecs-agent/introspection/server.go Outdated Show resolved Hide resolved
ecs-agent/introspection/server_test.go Show resolved Hide resolved
ecs-agent/tmds/handlers/utils/helpers.go Outdated Show resolved Hide resolved
ecs-agent/tmds/handlers/utils/helpers.go Outdated Show resolved Hide resolved
ecs-agent/introspection/server.go Outdated Show resolved Hide resolved
ecs-agent/introspection/server_integ_test.go Outdated Show resolved Hide resolved
ecs-agent/introspection/server_test.go Show resolved Hide resolved
ecs-agent/introspection/v1/handlers/handlers.go Outdated Show resolved Hide resolved
@willmyrs willmyrs force-pushed the share_introspection branch from 6ef783f to 75de604 Compare January 31, 2025 18:12
@willmyrs willmyrs merged commit 08a3ca0 into aws:dev Jan 31, 2025
40 checks passed
@willmyrs willmyrs deleted the share_introspection branch January 31, 2025 21:10
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.

7 participants