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

Kubernetes 1.32 libraries #650

Merged
merged 7 commits into from
Dec 19, 2024
Merged

Conversation

ash2k
Copy link
Member

@ash2k ash2k commented Dec 16, 2024

No description provided.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 16, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 16, 2024
@ash2k
Copy link
Member Author

ash2k commented Dec 16, 2024

/retest

@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 17, 2024
Makefile Outdated
lint: "$(MYGOBIN)/golangci-lint"
"$(MYGOBIN)/golangci-lint" run ./...
lint:
go run github.com/golangci/golangci-lint/cmd/[email protected] run ./...
Copy link
Contributor

Choose a reason for hiding this comment

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

Why condense this and not just bump the version in the other command?

Copy link
Member Author

Choose a reason for hiding this comment

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

I recently had an issue where some project (not cli-utils) installed an old version of golangci-lint into my GOBIN and it was crashing. I thought I'm using the brew-managed version but then found out that I'm not.

There is no need to install it, we can just go run the required version and avoid any clashes with what the user has installed. I can undo this change if you prefer to keep it as-is, but go run is more hermetic vs go install.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think my preferred solution for this is larger than we would want in this PR, but if you want to tackle it in another PR, I'd take it.

What we do in the kpt-config-sync repo is go install into an gitignored /.output/go/bin/ directory inside the repo using a GOPATH passed to the go install command. Then the binary can be executed directly using the $(GOBIN)/binary-name alias in the makefile.

Either way tho, I would suggest just updating the version in this PR to minimize other changes.

Copy link
Contributor

Choose a reason for hiding this comment

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

It's a little convoluted, but the Makefile basically adds the repo-local GOBIN in front of the PATH and also sets GOLANGCI_LINT to the path of the binary. So you can call the binary raw in scripts and still use "$(GOLANGCI_LINT)" as a make target dependency to make sure it got installed first. Then since it's not on the regular PATH, it doesn't affect any other projects.

We should probably do something similar here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I decided that it'd be easier to just bump the version vs refactoring things even further.

Copy link
Contributor

@karlkfi karlkfi left a comment

Choose a reason for hiding this comment

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

/lgtm

Thanks!

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ash2k, karlkfi

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 Dec 19, 2024
@k8s-ci-robot k8s-ci-robot merged commit 8c2dae2 into kubernetes-sigs:master Dec 19, 2024
5 checks passed
@ash2k ash2k deleted the k8s-1.32 branch December 19, 2024 06:53
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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants