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

Use ecs-agent/acs/model and ecs-agent/gogenerate #3659

Merged
merged 2 commits into from
Apr 27, 2023

Conversation

danehlim
Copy link
Contributor

@danehlim danehlim commented Apr 26, 2023

Summary

Use ecs-agent/acs/model in favor of agent/acs/model and ecs-agent/gogenerate in favor of agent/gogenerate. This is a followup to #3643.

Implementation details

  1. Use ecs-agent/acs/model instead of agent/acs/model
    • In agent/ directory, replace all imports of github.com/aws/amazon-ecs-agent/agent/acs/model/ecsacs with github.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs
    • Resort imports in affected files
    • Delete agent/acs/model directory and all of its files
  2. Use ecs-agent/gogenerate over agent/gogenerate
    • In agent/ directory, modify all go generate commands using ../../gogenerate/awssdk.go to use ../../../ecs-agent/gogenerate/awssdk.go instead
    • Delete agent/gogenerate directory and all of its files
    • Vendor github.com/aws/aws-sdk-go/private/model/api, github.com/aws/aws-sdk-go/private/util, and golang.org/x/tools/imports packages explicitly in agent/ since we need these to generate code as part of make gogenerate, but they are not automatically vendored after deleting agent/gogenerate directory and all of its files (i.e., the previous step).
    • Run go mod tidy and go mod vendor in agent/ directory

Testing

Unit, integration, and functional tests.
Manually ran make gogenerate to ensure it still succeeds after this change.

Description for the changelog

Use ecs-agent/acs/model and ecs-agent/gogenerate

Licensing

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

@danehlim danehlim marked this pull request as ready for review April 26, 2023 19:07
@danehlim danehlim requested a review from a team as a code owner April 26, 2023 19:07
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.

Tests are passing on this, the change itself looks alright. Good use of the tools file to prevent packages being cleaned up when running go mod tidy.

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