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

switching dependency management from glide to dep #817

Merged
merged 2 commits into from
Mar 6, 2018

Conversation

shawn-hurley
Copy link
Contributor

Describe what this PR does and why we need it:
Move from glide to dep

Although dep was not added to the core toolchain for go 1.10 I still think that it is worth moving to for dependancy management for the errors and help it has for updating and vendor bumps.

@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Mar 5, 2018
@rthallisey
Copy link
Contributor

Does make vendor need to change?

@jmrodri jmrodri changed the title switching depenancy management from glide to dep switching dependency management from glide to dep Mar 5, 2018
@jmrodri
Copy link
Contributor

jmrodri commented Mar 5, 2018

$ make vendor                                                   
[ERROR] Failed to find glide.yaml file in directory tree: Cannot resolve parent of /                                                
make: *** [Makefile:18: vendor] Error 2                           

Copy link
Contributor

@jmrodri jmrodri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make vendor fails

@jmrodri
Copy link
Contributor

jmrodri commented Mar 6, 2018

The problem I'm hitting is that it doesn't work with my symlink setup.

/home/devel/jesusr/dev/cap/ansible-service-broker - real location, git cloned
/home/devel/jesusr/dev/src/github.com/openshift/ansible-service-broker - symlink to the above
/home/devel/jesusr/dev/ - GOPATH value

If I run dep ensure inside the symlink path cd /home/devel/jesusr/dev/src/github.com/openshift/ansible-service-broker, then dep ensure will complain with the following error:

both /home/devel/jesusr/dev/src/github.com/openshift/ansible-service-broker and /home/devel/jesusr/dev/cap/ansible-service-broker are in the same GOPATH /home/devel/jesusr/dev

If I try to run dep ensure from the checked out path, /home/devel/jesusr/dev/cap/ansible-service-broker it complains I'm not in the project :)

There are quite a few of symlink issues with dep :)

https://github.com/golang/dep/issues?utf8=%E2%9C%93&q=is%3Aissue+is%3Aopen+symlink

golang/dep#1723

So I'm going to mark this as approved since it seems it's my current setup.

@jmrodri
Copy link
Contributor

jmrodri commented Mar 6, 2018

So if i clone the project into a path NOT in my GOPATH it works with symlink
real directory with project: /home/jesusr/ansible-service-broker
GOPATH: /home/jesusr/dev/
symlink: /home/jesusr/dev/src/github.com/openshift/ansible-service-broker -> /home/jesusr/ansible-service-broker/

$ cd $GOPATH/src/github.com/openshift/ansible-service-broker/
$ $ dep ensure -v
Gopkg.lock was already in sync with imports and Gopkg.toml
(1/75) Wrote github.com/gorilla/mux@v1.4.0                                                               
(2/75) Wrote github.com/golang/glog@44145f04b68cf362d9c4df2182967c2275eaefed
(3/75) Wrote github.com/PuerkitoBio/purell@v1.0.0                                                        
(4/75) Wrote github.com/gorilla/handlers@v1.2.1     
...
(72/75) Wrote golang.org/x/sys@95c6576299259db960f6c5b9b69ea52422860fce                                  
(73/75) Wrote golang.org/x/text@b19bf474d317b857955b12035d2c5acb57ce8b01                                 
(74/75) Wrote github.com/openshift/api@master       
(75/75) Wrote k8s.io/kubernetes@v1.9.1              

@jmrodri
Copy link
Contributor

jmrodri commented Mar 6, 2018

Capturing for posterity, this golang/dep#1429 is the issue I was hitting on my desktop causing the hang.

Copy link
Member

@djzager djzager left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@djzager
Copy link
Member

djzager commented Mar 6, 2018

Thank you for testing out symlinks @jmrodri that would have been painful, thankfully I'm in the working category.

Copy link
Contributor

@eriknelson eriknelson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dep ensure -v, make, and make check all LGTM.

@shawn-hurley shawn-hurley merged commit f811bfb into openshift:master Mar 6, 2018
@eriknelson eriknelson deleted the dep-dependancy branch March 8, 2018 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. tech-debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants