-
Notifications
You must be signed in to change notification settings - Fork 47
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
Update dependencies #328
Update dependencies #328
Conversation
@ondrej-fabry @jmedved @jhnbrns FYI, this seems to update all cn-infra dependencies and get things compiling. Is there a reason these are not kept up to date? See #327 for an easy way to keep this up to date automatically. |
I am unsure why |
This is passing CI now, I'd like to have this on merged and then I can move on to updating the dependencies in vpp-agent and finally contiv-vpp. |
I would recommand to try it with vpp-agent and contiv/vpp first. It can be tested using source rule in Once we know that the new versions work for the projects this could be merged. |
As @lukasmacko already wrote. You should try that these version are compatible with projects that use cn-infra, mainly vpp-agent and contiv. The specific versions in Gopkg.toml were chosen by @lukasmacko due some dependency issues when using cn-infra in contiv. |
Thanks @lukasmacko and @ondrej-fabry, I was testing with the source rule, will keep at it. BTW, I could only test this with vpp-agent with the contiv-1807 branch there, is there plans to merge that branch into master anytime soon? |
This updates all the dependencies to the very latest, and is part of the work to add CRD support to contiv-vpp. Note that this is dependent on an unmerged patch for cn-infra, which can be found here [1]. [1] ligato/cn-infra#328 Signed-off-by: Kyle Mestery <[email protected]>
@mestery For vpp-agent, we do main development on pantheon-dev branch. Tomorrow planning to merge that into contiv-1807, which is special branch just for contiv/vpp project. Master is used for official releases into which we merge from pantheon-dev. |
Gopkg.toml
Outdated
] | ||
|
||
[[constraint]] | ||
[[override]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this override? It's direct dependency for cn-infra: https://github.com/ligato/cn-infra/blob/master/rpc/grpc/plugin_impl_grpc.go#L25
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall @edwarnicke indicating there as a problem with cn-infra and newer grpc versions. The override here allows this to bump grpc up to version 1.14.0 (the latest). If this will be a problem, let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overrides are used in the projects to override transitive dependency. You can use override in the project where it makes problem for you to override it to your custom version. What you did here does not help at all with projects that use cn-infra.
See documentation for detailed information: https://golang.github.io/dep/docs/Gopkg.toml.html#override
only overrides from the current project's Gopkg.toml are incorporated.
Overrides should be used cautiously and temporarily, when possible.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Gopkg.toml
Outdated
version = "=3.3.9" | ||
|
||
[[constraint]] | ||
name = "github.com/coreos/bbolt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When did we switch to bbolt and why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something else was pulling bbolt and I had to add this constraint, otherwise a dep ensure -update
resulted in a tree which failed to compile.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you share the failure error? We use Bolt and not BBolt so I'm really curious what was pulling this dependency. There is no mention of bbolt anywhere in cn-infra.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just pulled this out and re-ran dep ensure -update
, and dep completed. So now I'm confused. I'l push a commit to remove it explicitly from Gopkg.toml. However, note that bbolt continues to remain in vendor, I believe because etcd is using it:
machine:cn-infra userid$ grep -R bbolt vendor/
vendor//github.com/boltdb/bolt/README.md:> you look at the CoreOS fork called [bbolt](https://github.com/coreos/bbolt).
grep: vendor//github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/securetrust.pem: No such file or directory
grep: vendor//github.com/hashicorp/go-rootcerts/test-fixtures/capath-with-symlinks/thawte.pem: No such file or directory
grep: vendor//github.com/coreos/etcd/cmd/tools: No such file or directory
grep: vendor//github.com/coreos/etcd/cmd/etcdctl: No such file or directory
grep: warning: vendor//github.com/coreos/etcd/cmd/etcd: recursive directory loop
grep: vendor//github.com/coreos/etcd/cmd/functional: No such file or directory
grep: vendor//github.com/coreos/etcd/Documentation/README.md: No such file or directory
vendor//github.com/coreos/etcd/mvcc/backend/backend.go: bolt "github.com/coreos/bbolt"
vendor//github.com/coreos/etcd/mvcc/backend/batch_tx.go: bolt "github.com/coreos/bbolt"
vendor//github.com/coreos/etcd/mvcc/backend/config_windows.go:import bolt "github.com/coreos/bbolt"
vendor//github.com/coreos/etcd/mvcc/backend/read_tx.go: bolt "github.com/coreos/bbolt"
vendor//github.com/coreos/etcd/mvcc/backend/config_default.go:import bolt "github.com/coreos/bbolt"
vendor//github.com/coreos/etcd/mvcc/backend/config_linux.go: bolt "github.com/coreos/bbolt"
machine:cn-infra userid$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The error probably wasn't occurring during dep, but when compiling tests. Just like it's happening in Travis now.
I believe that the reason is that etcd project uses glide and dep might have issue figuring out bbolt dependency correctly.
You selected etcd v3.3.9 which uses some specific option from bbolt introduced in bbolt v1.3.1, although the dep chose v1.3.0 causing tests to fail to compile.
This means you should actually keep the bbolt in Gopkg.toml
. However use [[override]]
since we don't actually use bbolt directly, only as transitive dependency from etcd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Gopkg.toml
Outdated
@@ -28,13 +28,13 @@ required = [ | |||
"github.com/grpc-ecosystem/grpc-gateway/runtime" | |||
] | |||
|
|||
[[constraint]] | |||
[[override]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still relevant to my comment: #328 (comment)
Gopkg.toml
Outdated
@@ -130,7 +130,7 @@ required = [ | |||
|
|||
[[override]] | |||
name = "github.com/ugorji/go" | |||
revision = "ded73eae5db7e7a0ef6f55aace87a2873c5d2b74" | |||
revision = "v1.1.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should most likely be version = "1.1.1"
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It appears not. Look at networkservicemesh and a dep status, you can see that grpc has the v
in front of the version:
servernetworkservicemesh username$ dep status|grep grpc
google.golang.org/grpc v1.14.0 (override) v1.14.0 32fb0ac v1.14.0 26
server:networkservicemesh username$
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can't really compare output of a dep status
with syntax used in Gopkg.toml
file.
My initial comment was coming from official documentation for Gopkg.toml
and it's version
property: https://golang.github.io/dep/docs/Gopkg.toml.html#version
Where you will find version without any prefix.
And even if it allows having both cases, why go for inconsistency if there is no other version
property with v
prefix in the current Gopkg.toml
? Inconsistency creates confusion.
Either put this without prefix or put all others with prefix, so we have same format for all version
properties in Gopkg.toml
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good explanation and I'll fix this one. Thanks @ondrej-fabry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, something weird happened. When I changes this to 1.1.1
instead of v1.1.1
, a run of dep ensure -update
failed because it could no longer match the version of github.com/ugorji/go
it needed for etcd-3.3.9. I wonder if this is related to their usage of glide.
Gopkg.lock
Outdated
branch = "master" | ||
name = "github.com/cockroachdb/cmux" | ||
digest = "1:c28625428387b63dd7154eb857f51e700465cfbf7c06f619e71f2da33cefe47e" | ||
name = "github.com/coreos/bbolt" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See: #328 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replying to review comments.
Rebase after #331 Also, remove |
This commit updates all of the dependencies for cn-infra and get the entire package compiling (as shown by running `make` from the toplevel). Note this does upgrade etcd to version 3.3.9, because version 3.2.0 no longer built with updated dependencies. Signed-off-by: Kyle Mestery <[email protected]>
Add github.com/cores/bbolt dependency, and update the dependency version of github.com/ugorji/go. Signed-off-by: Kyle Mestery <[email protected]>
Signed-off-by: Kyle Mestery <[email protected]>
This is still being pulled in, but we don't explicitely require it. Signed-off-by: Kyle Mestery <[email protected]>
Signed-off-by: Kyle Mestery <[email protected]>
While tinkering with changing the version of github.com/ugorji/go and running `dep ensure -update`, the following new dependencies were added to the project. This was done with dep at the following version: dep: version : v0.5.0 build date : 2018-07-26 git hash : 224a564 go version : go1.10.3 go compiler : gc platform : darwin/amd64 features : ImportDuringSolve=false Signed-off-by: Kyle Mestery <[email protected]>
Signed-off-by: Kyle Mestery <[email protected]>
Signed-off-by: Kyle Mestery <[email protected]>
This updates all the dependencies to the very latest, and is part of the work to add CRD support to contiv-vpp. Note that this is dependent on an unmerged patch for cn-infra, which can be found here [1]. [1] ligato/cn-infra#328 Signed-off-by: Kyle Mestery <[email protected]>
the work to add CRD support to contiv-vpp. Note that this is dependent on an unmerged patch for cn-infra, which can be found here [1]. [1] ligato/cn-infra#328 Signed-off-by: Kyle Mestery <[email protected]>
This commit updates all of the dependencies for cn-infra and get the
entire package compiling (as shown by running
make
from thetoplevel).
Note this does upgrade etcd to version 3.3.9, because version 3.2.0
no longer built with updated dependencies.
Please note this is an attempt to bring the dependencies up to date outside of the work being down around adding in requisite dependencies for the custom resource definition work being done.
Signed-off-by: Kyle Mestery [email protected]