Use ecs-agent/acs/model and ecs-agent/gogenerate #3659
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Use
ecs-agent/acs/model
in favor ofagent/acs/model
andecs-agent/gogenerate
in favor ofagent/gogenerate
. This is a followup to #3643.Implementation details
ecs-agent/acs/model
instead ofagent/acs/model
agent/
directory, replace all imports ofgithub.com/aws/amazon-ecs-agent/agent/acs/model/ecsacs
withgithub.com/aws/amazon-ecs-agent/ecs-agent/acs/model/ecsacs
agent/acs/model
directory and all of its filesecs-agent/gogenerate
overagent/gogenerate
agent/
directory, modify all go generate commands using../../gogenerate/awssdk.go
to use../../../ecs-agent/gogenerate/awssdk.go
insteadagent/gogenerate
directory and all of its filesgithub.com/aws/aws-sdk-go/private/model/api
,github.com/aws/aws-sdk-go/private/util
, andgolang.org/x/tools/imports
packages explicitly inagent/
since we need these to generate code as part ofmake gogenerate
, but they are not automatically vendored after deletingagent/gogenerate
directory and all of its files (i.e., the previous step).agent/tools.go
, which is the best practice for managing tool dependencies: cmd/go: clarify best practice for tool dependencies golang/go#25922 (comment). This is also explained in more detail in the previous pull request where we introduced theagent/tools.go
file: migrate from dep to go module #2890.go mod tidy
andgo mod vendor
inagent/
directoryTesting
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.