constabulary / gb

gb, the project based build tool for Go
https://getgb.io/
MIT License
2.15k stars 148 forks source link

`gb vendor restore` fails for a large set of dependencies #698

Closed andremedeiros closed 7 years ago

andremedeiros commented 7 years ago

Using go vendor restore on a project with a large number of dependencies (in my case, 100+) never succeeds. It seems like some resource ran out and random errors happened, like:

Getting google.golang.org/genproto/googleapis/api/label
Getting gopkg.in/tomb.v1
Getting gopkg.in/yaml.v2
skipping insecure protocol: git://github.com/spf13/afero
skipping insecure protocol: http://github.com/spf13/afero
fatal: unable to access 'https://code.googlesource.com/google-api-go-client/': Failed to connect to code.googlesource.com port 443: Operation timed out

Version: HEAD Platform: macOS Sierra (gb compiled with Go 1.8)

I've proposed a fix for this in #695, which limits parallelization to the number of CPUs. It's still quite fast and has been incredibly reliable for me.

andremedeiros commented 7 years ago

cc. @dcheney-atlassian @davecheney