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

Add ecs-agent/ ACS model + cleanup gogenerate make #3643

Merged
merged 2 commits into from
Apr 20, 2023

Conversation

danehlim
Copy link
Contributor

@danehlim danehlim commented Apr 14, 2023

Summary

Create ecs-agent/ directory, and add ACS model and gogenerate to that directory.

Update/clean up existing gogenerate make targets in Makefile.
Prior to this change:

  • make gogenerate does not actually run go generate at all
  • make gogenerate-init runs go generate for both agent/ and ecs-init/ directories

Implementation details

  1. Add ACS model and gogenerate to ecs-agent/
    • Copy agent/acs/model and agent/gogenerate to ecs-agent/acs/model and ecs-agent/gogenerate
    • Go into ecs-agent directory and run go mod init and go mod tidy
    • Modify versions in ecs-agent/go.mod to match those in agent/go.mod
    • Run go mod tidy and go mod vendor
    • Generate new ACS JSON model file per ECS Agent standard operation procedure that is in sync with up to date source of truth provided by control plane, and then replace agent/acs/model/api/api-2.json and ecs-agent/acs/model/api/api-2.jsonwith the newly generated file
    • Run make get-deps and make gogenerate (dependent on below implementation detail). This replaces agent/acs/model/ecsacs/api.go and ecs-agent/acs/model/ecsacs/api.go with newly generated files
  2. Clean up gogenerate make targets
    • Update make gogenerate-init target to run go generate only for ecs-init/ directory
    • Update make gogenerate target to actually run go generate, and run it for agent/ and ecs-agent/ directories

Testing

Unit, integration, and functional tests.
Manually test modified make targets locally with make command.

Description for the changelog

Add ecs-agent/ ACS model + cleanup gogenerate make

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 Add ecs-agent/ ACS model + cleanup gogenerate make Apr 15, 2023
@danehlim danehlim marked this pull request as ready for review April 15, 2023 00:02
@danehlim danehlim requested a review from a team as a code owner April 15, 2023 00:02
@danehlim danehlim marked this pull request as draft April 15, 2023 00:18
@danehlim danehlim marked this pull request as ready for review April 17, 2023 16:52
@danehlim danehlim requested review from soo-o and removed request for soo-o April 20, 2023 17:39
@danehlim danehlim merged commit 2149068 into aws:dev Apr 20, 2023
@Yiyuanzzz Yiyuanzzz mentioned this pull request Apr 26, 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.

5 participants