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

Mark staging go module files as generated, add script to lint dependencies #76197

Merged
merged 3 commits into from Apr 8, 2019

Conversation

@liggitt
Copy link
Member

liggitt commented Apr 5, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

  • Prunes unused go.mod replace directives in staging go.mod files
  • Makes diffs appear neater when they involve go.mod/go.sum changes in staging repos
  • Fixes the pin-dependency.sh script to use go list to find the resolved version (when pinning to the naturally preferred version of a transitive dependency, the require directive is superfluous and is not included in the go.mod file explicitly, so go mod edit can't find it)
  • Adds a script to list pinned dependencies that aren't used or do not match the natural preferred version, so we can see which should be updated
NONE

/cc @dims @cblecker

@k8s-ci-robot k8s-ci-robot requested review from cblecker and dims Apr 5, 2019

@liggitt liggitt force-pushed the liggitt:generated-vendor branch 2 times, most recently from 2386103 to 783107d Apr 5, 2019

@liggitt liggitt force-pushed the liggitt:generated-vendor branch from 783107d to a4a28b5 Apr 5, 2019

@dims

This comment has been minimized.

Copy link
Member

dims commented Apr 5, 2019

LGTM hack/lint-dependencies.sh | grep pin- | bash works great!

@liggitt liggitt force-pushed the liggitt:generated-vendor branch from a4a28b5 to 9ef2ed0 Apr 5, 2019

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Apr 5, 2019

fixed shellcheck nit

Show resolved Hide resolved hack/pin-dependency.sh Outdated
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Apr 8, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 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

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Apr 8, 2019

added pruning of unused replace directives for staging repos to hack/update-vendor.sh. this will greatly reduce the size most PRs that bump dependencies, since most staging go.mod files will not need to change

@@ -54,12 +54,37 @@ if [[ -z "${dep}" || -z "${sha}" ]]; then
exit 1
fi

_tmp="${KUBE_ROOT}/_tmp"

This comment has been minimized.

Copy link
@dims

dims Apr 8, 2019

Member

yay to _tmp like @cblecker asked for!

Show resolved Hide resolved hack/update-vendor.sh Outdated
@dims

This comment has been minimized.

Copy link
Member

dims commented Apr 8, 2019

/lgtm
/hold

for @cblecker to peek at

@liggitt liggitt force-pushed the liggitt:generated-vendor branch from 4a050d0 to e1ba00d Apr 8, 2019

@k8s-ci-robot k8s-ci-robot removed the lgtm label Apr 8, 2019

@liggitt liggitt force-pushed the liggitt:generated-vendor branch from e1ba00d to 5ddc58f Apr 8, 2019

@dims

This comment has been minimized.

Copy link
Member

dims commented Apr 8, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 8, 2019

@liggitt liggitt force-pushed the liggitt:generated-vendor branch from 5ddc58f to ce3dad9 Apr 8, 2019

@k8s-ci-robot k8s-ci-robot removed the lgtm label Apr 8, 2019

@dims

This comment has been minimized.

Copy link
Member

dims commented Apr 8, 2019

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Apr 8, 2019

@dims

This comment has been minimized.

Copy link
Member

dims commented Apr 8, 2019

/hold cancel

looks like that tmp was the only change @cblecker asked for... so we should be good.

@liggitt

This comment has been minimized.

Copy link
Member Author

liggitt commented Apr 8, 2019

/retest

@k8s-ci-robot k8s-ci-robot merged commit 8a2f8e6 into kubernetes:master Apr 8, 2019

17 checks passed

cla/linuxfoundation liggitt authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-conformance-image-test Skipped.
pull-kubernetes-cross Skipped.
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-kubemark-e2e-gce-big Job succeeded.
Details
pull-kubernetes-local-e2e Skipped.
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped.
tide In merge pool.
Details

@liggitt liggitt deleted the liggitt:generated-vendor branch Apr 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.