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

migrate to vendor #82

Merged
merged 2 commits into from
Jun 12, 2017
Merged

migrate to vendor #82

merged 2 commits into from
Jun 12, 2017

Conversation

unclejack
Copy link
Contributor

@unclejack unclejack commented Feb 28, 2017

This PR migrates ofnet to vendor.

This PR makes the following changes:

  • bump vishvananda/netlink to the latest version
  • bump vishvananda/netns to the latest version
  • bumps libovsdb to the latest version
  • switches to the centos/73 box to use Go 1.7.5 delayed for a future PR
  • fixes some minor gofmt and go vet issues to pass checks

Most of these changes were made in one commit because godep was causing some issues with vendor.

@dseevr
Copy link
Contributor

dseevr commented Feb 28, 2017

Changes look fine but the build is failing...

@unclejack
Copy link
Contributor Author

The failures don't seem to be related to the libovsdb, netlink and netns. Reverting those doesn't fix the issue.

@unclejack
Copy link
Contributor Author

@jojimt: Could you take a look at the logs when you have the time, please? I'm not sure why it's failing right now.

@unclejack
Copy link
Contributor Author

I've reverted the change which was switching to contiv/centos73. This fixes the failure we were seeing in the tests.

I've opened an issue to track the TestPolicyAddDelete failure: #87.

This PR will allow us to bump the other deps (libovsdb, libOpenflow).

This PR is ready for review.
@dseevr @jojimt PTAL

sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./
sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./ofctrl
sudo -E PATH=$(PATH) /opt/gopath/bin/godep go test -v ./pqueue
PATH=${PATH} sudo -E /usr/local/go/bin/go test -v ./
Copy link
Contributor

Choose a reason for hiding this comment

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

If the box isn't being updated, do we still need the host-test path changes in Makefile? IIRC the old box had Go installed under the /opt path

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dseevr: This makes it easy for us to migrate away from godep. Even though we're not upgrading to Go 1.7, we're on Go 1.6 and we can get rid of godep in some places. The new box has Go in the same place, but it's easier to not rely on the box's gopath.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cool 👍

@unclejack unclejack requested review from abhi and jojimt March 28, 2017 17:50
@abhi
Copy link
Member

abhi commented Mar 28, 2017

the last time we tried moving ofnet to vendoring (go1.6) there was dependency issue when ofnet was vendored into netplugin. Did you get a chance to test out netplugin with the vendoring ?

@unclejack
Copy link
Contributor Author

@abhinandanpb: I'll try this out and post a reply. The Godeps workspace was broken without this PR. I can imagine that's what was breaking it before.

@abhi
Copy link
Member

abhi commented Mar 28, 2017

what was broken ? We have been using godeps forever with bunch of dependency brought in and out. We havent had any issues with godeps in ofnet.

@unclejack
Copy link
Contributor Author

@abhinandanpb: How are you using godeps to update dependencies in ofnet? I get errors.

@unclejack
Copy link
Contributor Author

@abhinandanpb: Please let me know if there's anything else you'd like me to do or look into.

@unclejack unclejack removed request for abhi and jojimt May 12, 2017 17:47
@unclejack
Copy link
Contributor Author

This PR is rebased on top of master.

I haven't changed the version of the Vagrant box. We have to address some failures with Go 1.7 in a separate PR.

The libOpenflow library is also not upgraded or modified in any way in this PR. That's to be done in a separate PR.

@DivyaVavili @gkvijay @rhim: We need this PR. PTAL

rhim
rhim approved these changes Jun 12, 2017
Copy link
Contributor

@dvavili dvavili left a comment

Choose a reason for hiding this comment

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

Please check this against contiv/netplugin. The last I remember we had issues when we migrated to vendoring way of handling dependencies when used with netplugin (Not aware of the specific details of failure). Let us know the systemtest results of contiv/netplugin. If everything looks good there, we can merge this PR.

@dvavili
Copy link
Contributor

dvavili commented Jun 12, 2017

Also, what is the recommended way of moving to vendor when it is used in other repositories? Will it even make a difference?

@dseevr
Copy link
Contributor

dseevr commented Jun 12, 2017

@DivyaVavili it doesn't make a difference as to how the code is used under vendor... run this in netplugin and you'll see we still have one dependency using the legacy _workspace dir with our modern vendoring: find vendor -type d -name _workspace

@unclejack
Copy link
Contributor Author

@DivyaVavili: There's nothing to check with netplugin in this case. ofnet itself is functioning properly and it's brought in with all of its dependencies. The difference is that we won't be running into errors any more when we try to bump dependencies.

We need to make progress and improve the code, but this is a major roadblock.

@dseevr
Copy link
Contributor

dseevr commented Jun 12, 2017

The full netplugin CI suite will be run when netplugin's Godeps are updated to use the new version of this code.

We need to switch to vendor. It's been the ordained way to manage dependencies in Go projects for almost 1.5 years, and our code no longer compiles with any version of Go which does not support vendoring, and _workspace support is gone as of 1.8

We should merge this ASAP so that we can open the PR to update this dependency in netplugin itself

@unclejack
Copy link
Contributor Author

I've tested this with netplugin. ofnet was bumped properly. There's some work left to be done when we bump this in netplugin itself. This work which needs to be done isn't something which should block this PR, though. It should be safe to proceed at this point.

@dvavili
Copy link
Contributor

dvavili commented Jun 12, 2017

Thanks for checking this. LGTM with respect to this change. But when we are including it into contiv/netplugin, let's check it rigorously before merging in for the next major release so that we don't run into any dependency issues.

@unclejack unclejack merged commit 491b344 into contiv:master Jun 12, 2017
@unclejack unclejack deleted the move_to_vendor branch June 12, 2017 20:34
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

Successfully merging this pull request may close these issues.

5 participants