-
Notifications
You must be signed in to change notification settings - Fork 619
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 to dep #1009
move to dep #1009
Conversation
agent/Gopkg.toml
Outdated
|
||
[[constraint]] | ||
name = "github.com/aws/aws-sdk-go" | ||
version = "1.8.19" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about locking everything to the commit that is referenced in the old Godeps.json file? It would potentially reduce the blast radius.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about locking dependencies to tags and upgrade to nearest tagged version where it makes sense. ill add a separate commit for each dependency i lock to a new version. cause as we were saying earlier, tagging to revisions doesn't really provide guarantees. we can definitely do some things to reduce blast radius though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming that the Gopkg.lock contains the same commits as the previous Gopkg.json file had for our deps I think it's okay to migrate this way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either strategy we discussed.
Quoting the original document from
Even though |
The Makefile will also need to be updated to account for this change, which will require that we also bump the version of go used for the travis build. Though I'm happy to start using dep, we need to verify we are ready to update go. This looks great otherwise 👍 |
I don't think we need to bump Go. I think the dep tool needs Go 1.8 to be compiled itself, but our code should only rely on Go >= 1.5 (with GO15VENDOREXPERIMENT). |
This now needs a rebase, since |
this commit also removes Godep directory and old vendor directory
this commit adds revision constraints to keep parity with the old godep vendor package versions and ran dep ensure
ran dep prune to remove unused packages from the vendor tree.
safe to remove, our automated process do not depend on godep executable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM 🚀
- Document the new behavior someplace
- Use
versions
for constraints when applicable (outside this PR)
agent/prune.out
Outdated
@@ -0,0 +1,6094 @@ | |||
On branch move-to-dep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove this file from this intermediate commit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good after you remove that file from the intermediate commit. Thanks for doing this!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary
Use dep instead of godep.
$ dep version
dep:
version : v0.3.2
build date : 2017-10-19
git hash : 8ddfc8a
go version : go1.9
go compiler : gc
platform : linux/amd64
Implementation details
See
agent/Gopkg.toml
andagent/Gopkg.lock
.Testing
make release
)go build -out amazon-ecs-agent.exe ./agent
)make test
) passgo test -timeout=25s ./agent/...
) passmake run-integ-tests
) pass.\scripts\run-integ-tests.ps1
) passmake run-functional-tests
) pass.\scripts\run-functional-tests.ps1
) passNew tests cover the changes:
no
Description for the changelog
Licensing
This contribution is under the terms of the Apache 2.0 License:
yes