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 from dep to go mod #3878

Merged
merged 1 commit into from
Jun 12, 2019

Conversation

eloyekunle
Copy link
Contributor

Since Go 1.11 there is a new way to structure packages, which don't require the project to live under $GOPATH, and provides version management.

go mod could superseed dep, given it is builtin on the core tooling of the language and requires less dependencies to contribute.

This commit follows the migration instructions to adopt go mod.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 6, 2019
@maciaszczykm
Copy link
Member

Great! Looking forward to merging this. Could you take a look at the errors in the CI?

@maciaszczykm
Copy link
Member

Master is broken, not this PR. You can take a look on it if you have some time.

cc @floreks @jeefy

@shu-mutou
Copy link
Contributor

At least, before tests or building image that use vendor directory, we need to set GO111MODULE and run go mod like follow.

export GO111MODULE=on
go mod download
go mod vendor

We can run almost tests on local. See https://github.com/kubernetes/dashboard/wiki/Getting-started#to-run-npm-commands-as-you-want . It's almost same as on travis. Please run test locally at first.

@eloyekunle
Copy link
Contributor Author

The backend tests pass currently when I run it locally. This current broken build is from master, not the go modules migration.

@floreks
Copy link
Member

floreks commented Jun 11, 2019

Rebase please to fix travis.

@eloyekunle eloyekunle changed the title Migrate from dep -> go mod Migrate from dep to go mod Jun 11, 2019
@codecov
Copy link

codecov bot commented Jun 11, 2019

Codecov Report

Merging #3878 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3878      +/-   ##
==========================================
- Coverage   46.57%   46.56%   -0.02%     
==========================================
  Files         173      173              
  Lines        8066     8066              
  Branches       59       59              
==========================================
- Hits         3757     3756       -1     
- Misses       4079     4080       +1     
  Partials      230      230
Impacted Files Coverage Δ
...p/backend/integration/metric/common/aggregation.go 89.09% <0%> (-1.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 40c9f6f...355738c. Read the comment docs.

@eloyekunle
Copy link
Contributor Author

I've rebased @floreks

@shu-mutou
Copy link
Contributor

For now, I couldn't find why vendor directory [1] that were used by tests and build becomes unnecessary. But we need to clean up the use of vendor directory, if vendor is really unused. Could you clean up them?
[1] https://github.com/kubernetes/dashboard/search?q=vendor&unscoped_q=vendor

@maciaszczykm
Copy link
Member

/approve

Please solve conflicts and answer to @shu-mutou comment.

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 12, 2019
@eloyekunle
Copy link
Contributor Author

eloyekunle commented Jun 12, 2019

@shu-mutou The vendor directory is still used during build and is still necessary. By running go mod vendor locally, the appropriate packages are added to the vendor directory.

@shu-mutou
Copy link
Contributor

/lgtm
Great! And thank you for your answer. I think, we need to memo somewhere how to build container image, but I could confirm that we can launch the dashboard, the CI checks is passing and we can fix concerns later.

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jun 12, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: eloyekunle, maciaszczykm, shu-mutou

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit f661b8a into kubernetes:master Jun 12, 2019
@eloyekunle eloyekunle deleted the refactor/dep-to-modules branch June 12, 2019 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants