gianarb / orbiter

Orbiter is an opensource docker swarm autoscaler
Apache License 2.0
501 stars 54 forks source link

Update dep dependencies #18

Closed solidnerd closed 7 years ago

solidnerd commented 7 years ago

Hey @gianarb , nice project it sounds really awesome. I wanted to build it local but I got problems with the vendor directory. So I updated your old dep configuration to the stable version. I did the update manually by hand ๐Ÿ˜“ . I hope you can use it as well. For me it works now. Feedback is welcome ;) .

gianarb commented 7 years ago

I was using an old dep version at that time. They changed some internals. I am having a look now. Thanks to point this out!

solidnerd commented 7 years ago

@gianarb You are welcome and it works really nice ๐Ÿ‘

gianarb commented 7 years ago

@solidnerd can you copy/paste here the error that you get during comping? Thanks

โœ” ~/go/src/github.com/gianarb/orbiter [master|โœ”]
09:55 $ make binaries
Compiling...
All done! The binaries is in ./bin let's have fun!
โœ” ~/go/src/github.com/gianarb/orbiter [master|โœ”]
09:55 $ go version
go version go1.8 linux/386
solidnerd commented 7 years ago

The main reason why did it. Is that dep doesn't recognized the old format (manifest.json and lock.json). Through this the dependencies won't be migrated correctly. Through this the binary can't be reproduced.

dep init -v                                                                                                                                                       
Searching GOPATH for projects...
  Using master as constraint for direct dep github.com/Sirupsen/logrus
  Locking in master (3ec0642) for direct dep github.com/Sirupsen/logrus
  Using master as constraint for direct dep github.com/digitalocean/godo
  Locking in master (7d7ef61) for direct dep github.com/digitalocean/godo
  Using master as constraint for direct dep github.com/docker/docker
  Locking in master (4ae7d8e) for direct dep github.com/docker/docker
  Using master as constraint for direct dep github.com/gorilla/mux
  Locking in master (392c28f) for direct dep github.com/gorilla/mux
  Using master as constraint for direct dep golang.org/x/oauth2
  Locking in master (cce311a) for direct dep golang.org/x/oauth2
  Locking in master (1f92242) for transitive dep golang.org/x/net
  Locking in master (7a09723) for transitive dep github.com/docker/distribution
  Locking in master (988efe9) for transitive dep github.com/docker/go-connections
  Locking in master (f2145db) for transitive dep github.com/docker/go-units
  Locking in master (4ae7d8e) for transitive dep github.com/docker/docker
  Locking in master (ac974c6) for transitive dep github.com/tent/http-link-go
  Locking in master (248dadf) for transitive dep github.com/pkg/errors
  Locking in master (53e6ce1) for transitive dep github.com/google/go-querystring
  Locking in master (d75a526) for transitive dep golang.org/x/sys
  Locking in master (e83ccf6) for transitive dep github.com/opencontainers/runc
Following dependencies were not found in GOPATH. Dep will use the most recent versions of these projects.
  github.com/go-yaml/yaml
  github.com/mitchellh/cli
  google.golang.org/appengine
  github.com/opencontainers/go-digest
  github.com/Microsoft/go-winio
  github.com/gorilla/context
Root project is "github.com/gianarb/orbiter"
 7 transitively valid internal packages
 10 external packages imported from 7 projects
(0)   โœ“ select (root)
(1) ? attempt github.com/Sirupsen/logrus with 1 pkgs; at least 1 versions to try
(1)     try github.com/Sirupsen/logrus@master
(1) โœ“ select github.com/Sirupsen/logrus@master w/1 pkgs
(2) ? attempt github.com/digitalocean/godo with 1 pkgs; at least 1 versions to try
(2)     try github.com/digitalocean/godo@master
(2) โœ“ select github.com/digitalocean/godo@master w/1 pkgs
(3) ? attempt github.com/docker/docker with 4 pkgs; at least 1 versions to try
(3)     try github.com/docker/docker@master
(3) โœ“ select github.com/docker/docker@master w/15 pkgs
(4) ? attempt github.com/docker/distribution with 1 pkgs; at least 1 versions to try
(4)     try github.com/docker/distribution@master
(4) โœ“ select github.com/docker/distribution@master w/2 pkgs
(5) ? attempt github.com/docker/go-connections with 3 pkgs; at least 1 versions to try
(5)     try github.com/docker/go-connections@master
(5) โœ“ select github.com/docker/go-connections@master w/3 pkgs
(6) ? attempt golang.org/x/sys with 1 pkgs; at least 1 versions to try
(6)     try golang.org/x/sys@master
(6) โœ“ select golang.org/x/sys@master w/1 pkgs
(7) ? attempt github.com/tent/http-link-go with 1 pkgs; at least 1 versions to try
(7)     try github.com/tent/http-link-go@master
(7) โœ“ select github.com/tent/http-link-go@master w/1 pkgs
(8) ? attempt github.com/docker/go-units with 1 pkgs; at least 1 versions to try
(8)     try github.com/docker/go-units@master
(8) โœ“ select github.com/docker/go-units@master w/1 pkgs
(9) ? attempt github.com/gorilla/mux with 1 pkgs; at least 1 versions to try
(9)     try github.com/gorilla/mux@master
(9) โœ“ select github.com/gorilla/mux@master w/1 pkgs
(10)  ? attempt golang.org/x/oauth2 with 1 pkgs; at least 1 versions to try
(10)      try golang.org/x/oauth2@master
(10)  โœ“ select golang.org/x/oauth2@master w/2 pkgs
(11)  ? attempt github.com/opencontainers/runc with 1 pkgs; at least 1 versions to try
(11)      try github.com/opencontainers/runc@master
(11)  โœ“ select github.com/opencontainers/runc@master w/1 pkgs
(12)  ? attempt github.com/google/go-querystring with 1 pkgs; at least 1 versions to try
(12)      try github.com/google/go-querystring@master
(12)  โœ“ select github.com/google/go-querystring@master w/1 pkgs
(13)  ? attempt github.com/mitchellh/cli with 1 pkgs; 1 versions to try
(13)      try github.com/mitchellh/cli@master
(13)  โœ“ select github.com/mitchellh/cli@master w/1 pkgs
(14)  ? attempt github.com/pkg/errors with 1 pkgs; at least 1 versions to try
(14)      try github.com/pkg/errors@master
(14)  โœ“ select github.com/pkg/errors@master w/1 pkgs
(15)  ? attempt golang.org/x/net with 2 pkgs; at least 1 versions to try
(15)      try golang.org/x/net@master
(15)  โœ“ select golang.org/x/net@master w/2 pkgs
(16)  ? attempt github.com/opencontainers/go-digest with 1 pkgs; 3 versions to try
(16)      try github.com/opencontainers/go-digest@v1.0.0-rc0
(16)  โœ“ select github.com/opencontainers/go-digest@v1.0.0-rc0 w/1 pkgs
(17)  ? attempt github.com/armon/go-radix with 1 pkgs; 1 versions to try
(17)      try github.com/armon/go-radix@master
(17)  โœ“ select github.com/armon/go-radix@master w/1 pkgs
(18)  ? revisit golang.org/x/net to add 1 pkgs
(18)    โœ“ include 1 more pkgs from golang.org/x/net@master
(18)  ? attempt github.com/Microsoft/go-winio with 1 pkgs; 30 versions to try
(19)      try github.com/Microsoft/go-winio@v0.4.2
(19)  โœ“ select github.com/Microsoft/go-winio@v0.4.2 w/1 pkgs
(19)  ? revisit golang.org/x/sys to add 1 pkgs
(20)    โœ“ include 1 more pkgs from golang.org/x/sys@master
(19)  ? attempt google.golang.org/appengine with 1 pkgs; 2 versions to try
(21)      try google.golang.org/appengine@v1.0.0
(21)  โœ“ select google.golang.org/appengine@v1.0.0 w/7 pkgs
(20)  ? attempt github.com/golang/protobuf with 1 pkgs; 1 versions to try
(22)      try github.com/golang/protobuf@master
(22)  โœ“ select github.com/golang/protobuf@master w/1 pkgs
(21)  ? attempt github.com/gorilla/context with 1 pkgs; 2 versions to try
(23)      try github.com/gorilla/context@v1.1
(23)  โœ“ select github.com/gorilla/context@v1.1 w/1 pkgs
(22)  ? attempt github.com/mattn/go-isatty with 1 pkgs; 4 versions to try
(24)      try github.com/mattn/go-isatty@v0.0.2
(24)  โœ“ select github.com/mattn/go-isatty@v0.0.2 w/1 pkgs
(23)  ? attempt github.com/go-yaml/yaml with 1 pkgs; 4 versions to try
(25)      try github.com/go-yaml/yaml@v2
(25)  โœ“ select github.com/go-yaml/yaml@v2 w/1 pkgs
(24)  ? attempt github.com/bgentry/speakeasy with 1 pkgs; 2 versions to try
(26)      try github.com/bgentry/speakeasy@v0.1.0
(26)  โœ“ select github.com/bgentry/speakeasy@v0.1.0 w/1 pkgs
  โœ“ found solution with 51 packages from 24 projects

Solver wall times by segment:
         b-list-pkgs: 8.060597047s
              b-gmal: 5.684519849s
     b-list-versions: 1.376272888s
     b-source-exists: 691.243252ms
             satisfy:  15.620036ms
         select-atom:  14.724536ms
            new-atom:    590.178ยตs
         select-root:    356.273ยตs
  b-deduce-proj-root:    163.144ยตs
               other:     86.569ยตs
            add-atom:      9.788ยตs

  TOTAL: 15.84418356s

Old vendor backed up to /Users/niclas/go/src/github.com/gianarb/orbiter/_vendor-20170710095317

After this now the creation of the binary doesn't work anymore.

make binaries                                                                                                                                                 
Compiling...
# github.com/gianarb/orbiter/provider
provider/swarm.go:54: unknown field 'Filters' in struct literal of type types.TaskListOptions
provider/swarm.go:82: assignment count mismatch: 2 = 1
make: *** [binaries] Error 2
solidnerd commented 7 years ago

The main reason why i did it. That I'am able to update the dependencies to a newer version and test it with the latest docker client for example.

gianarb commented 7 years ago

Can you try this branch please? https://github.com/gianarb/orbiter/pull/19

That PR is using the last version of dep. You can do dep ensure --update github.com/docker/docker to test it with the new client. Please let's try to close this PR (Update dep).

When this one is gone we can try to update docker.

Thanks

solidnerd commented 7 years ago

@gianarb It works for me. My tests on #19 . You can close my PR in flavor of #19 .

$ rm -rf vendor
$ dep ensure
$ make binaries
Compiling...
All done! The binaries is in ./bin let's have fun!
# Now lets remove unused binaries
$ dep prune
# And try it again
$ make binaries 
Compiling...
All done! The binaries is in ./bin let's have fun!
gianarb commented 7 years ago

Thanks a lot!