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

Add go modules files #75

Merged
merged 1 commit into from
Jul 18, 2019
Merged

Add go modules files #75

merged 1 commit into from
Jul 18, 2019

Conversation

vincepri
Copy link
Member

@vincepri vincepri commented Jul 9, 2019

Signed-off-by: Vince Prignano vincepri@vmware.com

What this PR does / why we need it:
This PR adds go.mod and go.sum files that get added if you have modules enabled locally.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Special notes for your reviewer:

Please confirm that if this PR changes any image versions, then that's the sole change this PR makes.

Release note:


Signed-off-by: Vince Prignano <vincepri@vmware.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jul 9, 2019
@pohly
Copy link

pohly commented Jul 16, 2019

Do we need these extra files, i.e. what is the drawback if we don't add them?

@vincepri
Copy link
Member Author

If you have go modules enabled, it'll auto-generate these when running go get or any other command, given that k/k has moved to modules in 1.15 I assumed we'd want to do the same here

@pohly
Copy link

pohly commented Jul 16, 2019

We could also add these files to .gitignore. What advantage does it have for users of this package if we add them to the repo? What kind of maintenance do we need to do on these files to ensure that users really benefit from them?

@vincepri
Copy link
Member Author

vincepri commented Jul 16, 2019

I don't think we should ignore these files, Go modules will be on by default in Go 1.13, users updating this repository and adding dependencies will need to add them in here using standard tools for modules, which seems rare.

@pohly
Copy link

pohly commented Jul 17, 2019

users updating this repository and adding dependencies will need to add them in here

Not if we have the files in .gitignore...

Sorry, I'm really just trying to understand what difference it makes for users of this package or developers whether we have go.mod and go.sum in the repo. Consider it a chance to educate me 😄

As an experiment, I just created a dumb test project which uses Go modules and I could add this package with go get k8s.io/klog just fine. So for users I don't think this PR makes any difference.

It might be relevant at some point if we start to add dependencies for which we want to record the minimal version, but the files can also be added then.

@neolit123: any opinion?

@neolit123
Copy link
Member

nowadays, it's a standard practice to enable go modules across k8s repositories.
given klog only depends on logr it allows us to pin a specific version of logr which is still viable.

i'm +1 for adding the go files.

@pohly
Copy link

pohly commented Jul 17, 2019

Okay, so let's get onto the bandwagon even if it is just for the sake of it 😄

/lgtm
/approve

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

pohly commented Jul 17, 2019

/assign @DirectXMan12

@dims
Copy link
Member

dims commented Jul 18, 2019

/approve
/lgtm

@k8s-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, pohly, vincepri

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 added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2019
@k8s-ci-robot k8s-ci-robot merged commit 640c1bd into kubernetes:master Jul 18, 2019
@Katharine
Copy link
Member

/hold

github search is busted and tide is stuck trying to merge this already-merged PR forever.

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 18, 2019
@vincepri
Copy link
Member Author

/close

@k8s-ci-robot
Copy link

@vincepri: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

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. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants