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

CI: Test gopkg.lock is up to date #1574

Closed
ValarDragon opened this issue Jul 6, 2018 · 5 comments
Closed

CI: Test gopkg.lock is up to date #1574

ValarDragon opened this issue Jul 6, 2018 · 5 comments
Assignees

Comments

@ValarDragon
Copy link
Contributor

ValarDragon commented Jul 6, 2018

Test that for imports which use a branch, that the revisions in Gopkg.lock are up to date with the latest revisions. I briefly looked at dep status but I was having trouble getting just diffs, and reliable status code errors out of it.

This should also check that Gopkg.lock wasn't deleted, and that it isn't missing any new dependencies in Gopkg.toml.

This should hopefully eliminate issues with Gopkg.lock being removed from develop, and also make us aware quickly when an upstream change breaks the sdk. (In addition to just ensuring we always update the lock file)

@ebuchman
Copy link
Member

ebuchman commented Jul 6, 2018

We should minimize as much as possible the use of branched in the toml

@cwgoes
Copy link
Contributor

cwgoes commented Jul 6, 2018

We should minimize as much as possible the use of branched in the toml

Agreed; when no version has been released yet, I think pinning to exact revisions is preferable to pinning to branches.

@ValarDragon
Copy link
Contributor Author

Should we just make a simple script then to ensure that the file exists, no branches are ref'd, and add this to lint?

@cwgoes
Copy link
Contributor

cwgoes commented Jul 6, 2018

Should we just make a simple script then to ensure that the file exists, no branches are ref'd, and add this to lint?

Yes; can we additionally check that the result of running dep ensure matches the committed Gopkg.lock?

@ebuchman ebuchman self-assigned this Jul 11, 2018
@ValarDragon
Copy link
Contributor Author

dep status can take care of most of this for us.

It makes sure that Gopkg.toml and lock are in sync, and that Gopkg.lock exists. To check revisions, we can just grep branch in the Gopkg.toml, and exploit that it returns exit status codes based on if there are matches or not.

ValarDragon added a commit that referenced this issue Jul 14, 2018
This adds dep status to the lint process. Also fixes linting errors
that existed earlier. (not sure why they didn't show up on CI)

Closes #1574
cwgoes pushed a commit that referenced this issue Jul 14, 2018
* tools: Ensure Gopkg.lock is correct in linting

This adds dep status to the lint process. Also fixes linting errors
that existed earlier. (not sure why they didn't show up on CI)

Closes #1574

* Update dep, use the lock file new dep version creates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants