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

🐛 Allow CLI binaries to set a version #1049

Merged
merged 4 commits into from
Sep 11, 2024

Conversation

josvazg
Copy link
Contributor

@josvazg josvazg commented Sep 4, 2024

Solves #1046 so that controller-gen binaries can show a proper version


Local testing:

% go build -ldflags "-X sigs.k8s.io/controller-tools/pkg/version.version=1.2.4" ./cmd/controller-gen
% ./controller-gen --version
Version: 1.2.4

Signed-off-by: jose.vazquez <jose.vazquez@mongodb.com>
Copy link

linux-foundation-easycla bot commented Sep 4, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Sep 4, 2024
@k8s-ci-robot
Copy link
Contributor

Welcome @josvazg!

It looks like this is your first PR to kubernetes-sigs/controller-tools 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/controller-tools has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @josvazg. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 4, 2024
@sbueringer
Copy link
Member

/ok-to-test

Please check the CLA

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Sep 9, 2024
@josvazg josvazg requested a review from sbueringer September 10, 2024 09:19
@josvazg josvazg force-pushed the allow-binary-versioning branch from 710ac27 to 53b8fdb Compare September 10, 2024 12:52
pkg/version/version.go Outdated Show resolved Hide resolved
@sbueringer
Copy link
Member

Last nit from my side, apart from the CLA.

I'll test this PR on my fork by cutting a release there

Co-authored-by: Stefan Büringer <4662360+sbueringer@users.noreply.github.com>
@sbueringer sbueringer added the tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges. label Sep 10, 2024
@sbueringer
Copy link
Member

All good. Here is a test release: https://github.com/sbueringer/controller-tools/releases/tag/v0.16.3-beta.0

Checked the controller-gen-darwin-arm64 binary:

 ./controller-gen-darwin-amd64 --version
Version: v0.16.3-beta.0

@sbueringer
Copy link
Member

/lgtm

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

LGTM label has been added.

Git tree hash: e21b5f1262222c613e4ae65ac702e640eb641a2b

@josvazg
Copy link
Contributor Author

josvazg commented Sep 10, 2024

Hopefully the CLA will be sorted out soon now, maybe tomorrow.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Sep 11, 2024
@josvazg
Copy link
Contributor Author

josvazg commented Sep 11, 2024

CLA sorted, we can proceed now I guess.

@josvazg josvazg requested a review from sbueringer September 11, 2024 08:51
@sbueringer
Copy link
Member

Nice, thank you!

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: josvazg, sbueringer

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 Sep 11, 2024
@k8s-ci-robot k8s-ci-robot merged commit 715d27e into kubernetes-sigs:main Sep 11, 2024
12 checks passed
shanduur referenced this pull request in registry-operator/registry-operator Sep 21, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[sigs.k8s.io/controller-tools](https://github.com/kubernetes-sigs/controller-tools)
| `v0.16.2` -> `v0.16.3` |
[![age](https://developer.mend.io/api/mc/badges/age/go/sigs.k8s.io%2fcontroller-tools/v0.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/go/sigs.k8s.io%2fcontroller-tools/v0.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/go/sigs.k8s.io%2fcontroller-tools/v0.16.2/v0.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/go/sigs.k8s.io%2fcontroller-tools/v0.16.2/v0.16.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>kubernetes-sigs/controller-tools
(sigs.k8s.io/controller-tools)</summary>

###
[`v0.16.3`](https://github.com/kubernetes-sigs/controller-tools/releases/tag/v0.16.3)

[Compare
Source](https://github.com/kubernetes-sigs/controller-tools/compare/v0.16.2...v0.16.3)

Published binaries on previous v0.16.x releases were reporting an
incorrect version.

#### What's Changed

- 🐛 Allow CLI binaries to set a version by
[@&#8203;josvazg](https://github.com/josvazg) in
[https://github.com/kubernetes-sigs/controller-tools/pull/1049](https://github.com/kubernetes-sigs/controller-tools/pull/1049)
- ✨ Allow customizing generated webhook configuration's name by
[@&#8203;davidxia](https://github.com/davidxia) in
[https://github.com/kubernetes-sigs/controller-tools/pull/1002](https://github.com/kubernetes-sigs/controller-tools/pull/1002)

#### Dependencies

- 🌱 Bump github.com/onsi/gomega from 1.34.1 to 1.34.2 in the
all-go-mod-patch-and-minor group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/kubernetes-sigs/controller-tools/pull/1047](https://github.com/kubernetes-sigs/controller-tools/pull/1047)
- 🌱 Bump tj-actions/changed-files from 45.0.0 to 45.0.1 in the
all-github-actions group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/kubernetes-sigs/controller-tools/pull/1048](https://github.com/kubernetes-sigs/controller-tools/pull/1048)
- 🌱 Bump peter-evans/create-pull-request from 6.1.0 to 7.0.1 in
the all-github-actions group by
[@&#8203;dependabot](https://github.com/dependabot) in
[https://github.com/kubernetes-sigs/controller-tools/pull/1052](https://github.com/kubernetes-sigs/controller-tools/pull/1052)

#### New Contributors

- [@&#8203;josvazg](https://github.com/josvazg) made their
first contribution in
[https://github.com/kubernetes-sigs/controller-tools/pull/1049](https://github.com/kubernetes-sigs/controller-tools/pull/1049)
- [@&#8203;davidxia](https://github.com/davidxia) made their
first contribution in
[https://github.com/kubernetes-sigs/controller-tools/pull/1002](https://github.com/kubernetes-sigs/controller-tools/pull/1002)

**Full Changelog**:
kubernetes-sigs/controller-tools@v0.16.2...v0.16.3

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/registry-operator/registry-operator).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC44MC4wIiwidXBkYXRlZEluVmVyIjoiMzguODAuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXJlYS9kZXBlbmRlbmN5Il19-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. tide/merge-method-squash Denotes a PR that should be squashed by tide when it merges.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants