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

nats-bench.go breaks Travis #249

Closed
drasko opened this issue Jan 2, 2017 · 9 comments
Closed

nats-bench.go breaks Travis #249

drasko opened this issue Jan 2, 2017 · 9 comments

Comments

@drasko
Copy link

drasko commented Jan 2, 2017

The command "go get -v ./..." exited with 2.
https://travis-ci.org/mainflux/mainflux-core/builds/188357908

drasko@Lenin:~/go/src/github.com/mainflux/mainflux-core$ go get -v ./...
github.com/nats-io/gnatsd (download)
github.com/nats-io/gnatsd/conf
github.com/nats-io/gnatsd/logger
github.com/nats-io/gnatsd/server/pse
github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats/examples
github.com/nats-io/gnatsd/util
github.com/nats-io/gnatsd/vendor/github.com/nats-io/nuid
github.com/nats-io/gnatsd/vendor/golang.org/x/crypto/blowfish
github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats/examples
# github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats/examples
vendor/github.com/nats-io/go-nats/examples/nats-bench.go:120: cannot use nc (type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats".Conn) as type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats".Conn in argument to bench.NewSample
vendor/github.com/nats-io/go-nats/examples/nats-bench.go:139: cannot use nc (type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats".Conn) as type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats".Conn in argument to bench.NewSample
# github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats/examples
vendor/github.com/nats-io/nats/examples/nats-bench.go:120: cannot use nc (type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats".Conn) as type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats".Conn in argument to bench.NewSample
vendor/github.com/nats-io/nats/examples/nats-bench.go:139: cannot use nc (type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats".Conn) as type *"github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats".Conn in argument to bench.NewSample
github.com/nats-io/gnatsd/vendor/golang.org/x/crypto/bcrypt
github.com/nats-io/gnatsd/server
github.com/nats-io/gnatsd/auth
github.com/nats-io/gnatsd/test
github.com/mainflux/mainflux-core/vendor/github.com/nats-io/go-nats/test
github.com/mainflux/mainflux-core/vendor/github.com/nats-io/nats/test
drasko@Lenin:~/go/src/github.com/mainflux/mainflux-core$ gvim .travis.yml 
@kozlovic
Copy link
Member

kozlovic commented Jan 3, 2017

@drasko I think this is due to the repo rename (https://github.com/nats-io/go-nats/pull/239). As you can see above you have references to go-nats and nats. You need to update the mainflux's vendor directory.

@kozlovic kozlovic closed this as completed Jan 3, 2017
@drasko
Copy link
Author

drasko commented Jan 3, 2017

No, I don't, and glide.yaml sees that well:

drasko@Lenin:~/go/src/github.com/mainflux/mainflux-core$ cat glide.yaml 
package: github.com/mainflux/mainflux-core
import:
- package: github.com/BurntSushi/toml
  version: ^0.2.0
- package: github.com/cisco/senml
- package: github.com/codegangsta/negroni
  version: ^0.2.0
- package: github.com/fatih/color
  version: ^1.1.0
- package: github.com/go-zoo/bone
  version: ^1.2.0
- package: github.com/nats-io/go-nats
  version: ^1.2.2
- package: github.com/satori/go.uuid
  version: ^1.1.0
- package: github.com/xeipuuv/gojsonschema
- package: gopkg.in/mgo.v2
  subpackages:
  - bson
testImport:
- package: gopkg.in/ory-am/dockertest.v2
  version: ^2.2.3

However, I see that you reference vendor/github.com/nats-io/nats/examples in NATS 1.2.2, which is your latest official release, and this freaks-out glide.

I think you will need to push new release with these references cleaned ;)

@kozlovic
Copy link
Member

kozlovic commented Jan 3, 2017

In 1.2.2, the repo was not renamed, so references to nats-io/nats/ are normal and expected. There is no reference to nats-io/nats in current master (since we have renamed to go-nats). It looks like you are vendoring nats twice. You need to remove the vendor reference of nats-io/nats and keep nats-io/go-nats or vice-versa: https://github.com/mainflux/mainflux-core/tree/master/vendor/github.com/nats-io

@drasko
Copy link
Author

drasko commented Jan 3, 2017

I know, but vedor dir is auto-generated by Glide, which takes last stable NATS (https://github.com/mainflux/mainflux-core/blob/master/glide.yaml#L12-L13), looks inside it and there sees references to nats-io/nats and vendors this too.

What I want to say is - if you keep nonexisting references in your stable release this will confuse Glide (and potentially some other tools).

@kozlovic
Copy link
Member

kozlovic commented Jan 3, 2017

What I want to say is - if you keep nonexisting references in your stable release this will confuse Glide (and potentially some other tools).

Not sure what you mean here? The latest release 1.2.2 was issued before the repo name change, so of course this release will refer to nats-io/nats.
Master is currently with the repo name change to go-nats and has references only to go-nats.
I wonder if your vendoring tool is not using the current repo name, but then fetched the tag v1.2.2 which is still with the old name.

I will ask if it's ok to issue a new release.

@kozlovic kozlovic reopened this Jan 3, 2017
@drasko
Copy link
Author

drasko commented Jan 3, 2017

@kozlovic Yes - vendoring tool gets release v1.2.2. But it finds the release to fetch by analyzing the current Mainflux code and finds go-nats. To it tries to vendor go-nats, version 1.2.2, but inside v1.2.2 it finds a references to nats and tries to vendor this also (which kind of makes sense, because it vendors all the references of dependencies).

@drasko
Copy link
Author

drasko commented Jan 3, 2017

I've found a workaround for Mainflux, I just opened the bug to let you know. No need for rushing new release, as long as we are concerned.

@kozlovic
Copy link
Member

kozlovic commented Jan 3, 2017

Yes, you should not do go get when vendoring, that's the point of vendoring, to control exactly what version/tag you need, etc.. Closing this issue for now.

@kozlovic kozlovic closed this as completed Jan 3, 2017
@drasko
Copy link
Author

drasko commented Jan 3, 2017

Agreed, and this is exactly what I changed yesterday in Travis script ;). Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants