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 update-vendor.sh to use go work sync #123627

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

liggitt
Copy link
Member

@liggitt liggitt commented Mar 1, 2024

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

Followup to #123529

Removes a lot of unnecessary logic from update-vendor.sh:

  • Syncing all modules to the same minimum versions of dependencies is now done by go work sync
  • Topological sort before tidying is no longer required since go 1.17 prunes out unused require directives
  • Collapses the workspace update / verify scripts into the update-vendor / verify-vendor scripts

cc @dims @thockin

NONE

@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/L Denotes a PR that changes 100-499 lines, ignoring generated files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. 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. area/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kube-proxy area/kubectl area/kubelet sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. and removed do-not-merge/needs-sig Indicates an issue or PR lacks a `sig/foo` label and requires one. labels Mar 1, 2024
@k8s-ci-robot k8s-ci-robot requested a review from andrewsykim March 1, 2024 22:48
@@ -180,210 +142,98 @@ function add_generated_comments() {
go mod edit -fmt
}

function add_staging_replace_directives() {
Copy link
Member Author

Choose a reason for hiding this comment

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

this is moved from Phase 2 and made a function we can apply to the root and staging modules, rather than our previous approach of messing with the root go.mod, copying it to all staging dirs, then fixing it up for the staging dirs

Copy link
Member

Choose a reason for hiding this comment

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

sounds good!

@k8s-ci-robot k8s-ci-robot requested review from andyzhangx and a team March 1, 2024 22:48
@k8s-ci-robot k8s-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 10, 2024
@liggitt liggitt changed the title WIP - simplify update-vendor.sh to use go work sync simplify update-vendor.sh to use go work sync Oct 10, 2024
@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 10, 2024
@liggitt
Copy link
Member Author

liggitt commented Oct 10, 2024

@dims this is ready

@dims
Copy link
Member

dims commented Oct 10, 2024

Glad we are getting rid of the "extra" scripts for go-workspace.

hack/update-vendor.sh Outdated Show resolved Hide resolved
@liggitt liggitt force-pushed the go-workspaces-update-vendor branch from ad78f2d to 27c41e7 Compare October 10, 2024 21:59
@dims
Copy link
Member

dims commented Oct 10, 2024

Looks way better than before! tried a few scenarios and they look good.

/approve
/lgtm

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

LGTM label has been added.

Git tree hash: 48ec8036e7765f044f13b4ea6ad7e890082006ea

@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
Copy link
Contributor

k8s-ci-robot commented Oct 10, 2024

@liggitt: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kubernetes-node-e2e-containerd-1-7-dra f0a86fa link false /test pull-kubernetes-node-e2e-containerd-1-7-dra

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@dims
Copy link
Member

dims commented Oct 11, 2024

/retest

@liggitt
Copy link
Member Author

liggitt commented Oct 11, 2024

e2e's are getting flaky :-/

[sig-network] Services [It] should implement NodePort and HealthCheckNodePort correctly when ExternalTrafficPolicy changes [sig-network] in https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/123627/pull-kubernetes-e2e-gce/1844537338676383744

[sig-storage] PersistentVolumes-local [Volume type: blockfswithoutformat] One pod requesting one prebound PVC should be able to mount volume and write from pod1 timeout in https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/123627/pull-kubernetes-e2e-gce/1844498026740060160

@liggitt
Copy link
Member Author

liggitt commented Oct 11, 2024

/test pull-kubernetes-e2e-gce

@dims
Copy link
Member

dims commented Oct 11, 2024

e2e's are getting flaky :-/

/pony sad

@k8s-ci-robot
Copy link
Contributor

@dims: pony image

In response to this:

e2e's are getting flaky :-/

/pony sad

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-sigs/prow repository.

Copy link
Member

@thockin thockin left a comment

Choose a reason for hiding this comment

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

Based purely on LOC deleted in my least-favorite shell script (sorry!):

/lgtm

local path_to_staging_k8s_io="$1"
# Prune
go mod edit -json \
| jq -r '.Require[]? | select(.Version == "v0.0.0") | "-droprequire \(.Path)"' \
Copy link
Member

Choose a reason for hiding this comment

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

why the whitespace? Is it significant?

Copy link
Member Author

Choose a reason for hiding this comment

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

not significant... I think this was snipped out of a function that used to run multiple of these and I was trying to align the common parts of the parallel lines (https://github.com/kubernetes/kubernetes/pull/123627/files#diff-b6ed2d0e481e37c6d38a9c0da57141de5245f4a4b58ee5d49ca95f7f2f7b010dL210-L215)? hard to remember, I started this 6 months ago

@k8s-ci-robot k8s-ci-robot merged commit 05b076b into kubernetes:master Oct 11, 2024
14 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.32 milestone Oct 11, 2024
@seans3
Copy link
Contributor

seans3 commented Oct 15, 2024

/triage accepted

@k8s-ci-robot k8s-ci-robot added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Oct 15, 2024
@liggitt liggitt deleted the go-workspaces-update-vendor branch December 13, 2024 12:49
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/apiserver area/cloudprovider area/code-generation area/dependency Issues or PRs related to dependency changes area/kube-proxy area/kubectl area/kubelet 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. needs-priority Indicates a PR lacks a `priority/foo` label and requires one. release-note-none Denotes a PR that doesn't merit a release note. sig/api-machinery Categorizes an issue or PR as relevant to SIG API Machinery. sig/architecture Categorizes an issue or PR as relevant to SIG Architecture. sig/auth Categorizes an issue or PR as relevant to SIG Auth. sig/cli Categorizes an issue or PR as relevant to SIG CLI. sig/cloud-provider Categorizes an issue or PR as relevant to SIG Cloud Provider. sig/cluster-lifecycle Categorizes an issue or PR as relevant to SIG Cluster Lifecycle. sig/instrumentation Categorizes an issue or PR as relevant to SIG Instrumentation. sig/network Categorizes an issue or PR as relevant to SIG Network. sig/node Categorizes an issue or PR as relevant to SIG Node. sig/storage Categorizes an issue or PR as relevant to SIG Storage. 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
Archived in project
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants