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

Simplify go.mod #113424

Merged
merged 4 commits into from Oct 31, 2022
Merged

Simplify go.mod #113424

merged 4 commits into from Oct 31, 2022

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Oct 28, 2022

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Stops adding explicit replace directives for all dependencies. This was needed in the early days of go.mod to ensure we had a consistent root view of the required dependency versions and to keep spurious changes from happening to go.mod, but both of those issues have been resolved since go1.17.

A nice side effect is that dependency updates should no longer require several pin/update-vendor/lint cycles.

This also fixes up the unwanted-dependencies scanner to work with the expanded go mod graph output that results from dropping the forced pins to specific versions.

Requires depstat fix in kubernetes-sigs/depstat#65 before CI will pass on this PR

NONE

/cc @dims
/area code-organization

@k8s-ci-robot k8s-ci-robot added release-note-none Denotes a PR that doesn't merit a release note. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. area/code-organization Issues or PRs related to kubernetes code organization cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. approved Indicates a PR has been approved by an approver from all required OWNERS files. area/dependency Issues or PRs related to dependency changes labels Oct 28, 2022
go.mod Show resolved Hide resolved
@dims
Copy link
Member

dims commented Oct 28, 2022

I like it! good direction @liggitt. thanks!

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2022
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 28, 2022
@liggitt
Copy link
Member Author

liggitt commented Oct 28, 2022

rebased, fixed lint error with unused method

it looks like check-dependency-stats has the same issue with the expanded graph, will dig into that

@k8s-ci-robot k8s-ci-robot added area/cloudprovider sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Oct 28, 2022
@liggitt
Copy link
Member Author

liggitt commented Oct 28, 2022

depstat fix in kubernetes-sigs/depstat#65

This was originally added in the early days of go.mod in order to ensure that the root k8s.io/kubernetes
go.mod file reflected all the versions of dependencies we were using, and to ensure that go commands didn't spuriously
increment these versions.

With module pruning in go1.17+ and go defaulting to mod=readonly mode in go1.16+, this is no longer necessary.
@dims
Copy link
Member

dims commented Oct 31, 2022

/retest

@dims
Copy link
Member

dims commented Oct 31, 2022

/test check-dependency-stats

@liggitt liggitt changed the title WIP: Simplify go.mod Simplify go.mod Oct 31, 2022
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 31, 2022
@dims
Copy link
Member

dims commented Oct 31, 2022

/triage accepted
/priority important-soon

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. labels Oct 31, 2022
@dims
Copy link
Member

dims commented Oct 31, 2022

/approve
/lgtm

Thanks @liggitt

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dims, liggitt

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 f9bfa37 into kubernetes:master Oct 31, 2022
@k8s-ci-robot k8s-ci-robot added this to the v1.26 milestone Oct 31, 2022
@liggitt liggitt deleted the simplify-go.mod branch November 26, 2022 22:51
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. area/cloudprovider area/code-organization Issues or PRs related to kubernetes code organization area/dependency Issues or PRs related to dependency changes cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. release-note-none Denotes a PR that doesn't merit a release note. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants