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

Go module migration #131

Closed
wants to merge 9 commits into from
Closed

Conversation

vaniisgh
Copy link
Contributor

#126
TO-DO:

  • fix-ci
  • test builds

WIP openebs#126

- add go.mod file
- delete gopkg.lock & gopkg.toml
- make changes for sirupsen dependency
- remove vendor folder

Signed-off-by: Vani Singh <vanisingh@live.co.uk>
Signed-off-by: Vani Singh <vanisingh@live.co.uk>
- changes in docs
- data type change

Signed-off-by: Vani Singh <vanisingh@live.co.uk>
@pawanpraka1
Copy link
Contributor

@prateekpandey14 can you take a look, it is still in draft because of the issues. Can you help resolving those issues?

@pawanpraka1
Copy link
Contributor

@vaniisgh, why you are changing the travis.yaml?

@vaniisgh
Copy link
Contributor Author

@vaniisgh, why you are changing the travis.yaml?

hey so, I run an OSX system and didn't want to run a VirtualBox VM to check my changes so I thought I could do the same by making some fixes in the Travis ci file and test them that way.
But the ci will fail for sure because of this part:

install:
  - if [ "$TRAVIS_BUILD_DIR" != "$GOPATH/src/github.com/openebs/zfs-localpv" ]; then
    mkdir -p $GOPATH/src/github.com/openebs/;
    mv $TRAVIS_BUILD_DIR $GOPATH/src/github.com/openebs;
    cd $GOPATH/src/github.com/openebs/zfs-localpv;

since the plan is to switch to gomodules, this wont work.

not sure I am right but that was my reasoning :)
thanks again :)

@kmova kmova added this to RC1 - Due: Jun 5 2020 in 1.11 Release Tracker - Due June 15th. Jun 3, 2020
@vaniisgh vaniisgh marked this pull request as ready for review June 4, 2020 02:05
- change in buildscripts tobring notice to an error
- move repo aout of GOPATH/src wherever referenced

Signed-off-by: vaniisgh <vanisingh@live.co.uk>
@vaniisgh vaniisgh changed the title [wip] Go module migration Go module migration Jun 4, 2020
Signed-off-by: vaniisgh <vanisingh@live.co.uk>
Signed-off-by: vaniisgh <vanisingh@live.co.uk>
Signed-off-by: vaniisgh <vanisingh@live.co.uk>
.travis.yml Outdated
Comment on lines 26 to 29
- if [ "$TRAVIS_BUILD_DIR" != "$HOME/openebs/zfs-localpv" ]; then
mkdir -p $HOME/openebs/;
mv $TRAVIS_BUILD_DIR $HOME/openebs;
cd $HOME/openebs/zfs-localpv;
Copy link
Member

Choose a reason for hiding this comment

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

i think we don't need this anymore , we can remove this , travis handles the gopath correctly now.

Copy link
Contributor Author

@vaniisgh vaniisgh Jun 4, 2020

Choose a reason for hiding this comment

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

can I just remove it completely then.i.e all lines from 26-29?

Copy link
Member

Choose a reason for hiding this comment

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

yes, please

k8s.io/kube-openapi v0.0.0-20190816220812-743ec37842bf // indirect
k8s.io/kubernetes v1.15.3
k8s.io/utils v0.0.0-20190829053155-3a4a5477acf8 // indirect
sigs.k8s.io/controller-runtime v0.2.0
Copy link
Member

Choose a reason for hiding this comment

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

we are not using controller-runtime , we can remove this

k8s.io/kubelet => k8s.io/kubelet v0.0.0-20190620085838-f1cb295a73c9
k8s.io/legacy-cloud-providers => k8s.io/legacy-cloud-providers v0.0.0-20190620090156-2138f2c9de18
k8s.io/metrics => k8s.io/metrics v0.0.0-20190620085625-3b22d835f165
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.0.0-20190620085408-1aef9010884e
Copy link
Member

Choose a reason for hiding this comment

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

same as above comment , sample-apiserver is not getting used, we can remove this as well.
Run the command go mod tidy & go mod verify to remove some of unused dependencies.

Copy link
Contributor Author

@vaniisgh vaniisgh Jun 4, 2020

Choose a reason for hiding this comment

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

I do run a tidy, I run in the makefile as well. (if those changes look ok this shouldn't be left in ... I'll check it out again. sorry )
should I include a verify too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

also, it gives me the same issue as the Maya repo. Heres the link to the issue that made me think I needed to add all these dependencies: kubernetes/kubernetes#90358

Signed-off-by: vaniisgh <vanisingh@live.co.uk>
…-localpv into go_module_migration

Signed-off-by vaniisgh <vanisingh@live.co.uk>
@vaniisgh vaniisgh mentioned this pull request Jun 5, 2020
@vaniisgh vaniisgh closed this Jun 5, 2020
1.11 Release Tracker - Due June 15th. automation moved this from RC1 - Due: Jun 5 2020 to Done Jun 5, 2020
@vaniisgh vaniisgh deleted the go_module_migration branch June 27, 2020 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants