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

✨ (API, CLI, go/v4) Add cliVersion field to the PROJECT file configuration to store the CLI binary version used to scaffold projects. #4621

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

vitorfloriano
Copy link
Contributor

@vitorfloriano vitorfloriano commented Mar 19, 2025

This PR adds a new field to the PROJECT file: cliVersion.

Additionally, it updates the documentation in the Project Configuration Reference to include the new cliVersion field.

It also updates the PROJECT file scaffolded in the docs and in testdata.

Closes: #4398

Test Steps:

  1. Build a snapshot release using GoReleaser:
~/kubebuilder$ goreleaser release --snapshot --skip=publish -f ./build/.goreleaser.yml
  1. Create a new test project directory:
mkdir -p ~/projects/test-project-file && cd ~/projects/test-project-file
  1. Initialize the test project using the Kubebuilder snapshot:
~/kubebuilder/dist/kubebuilder_linux_amd64_v1/kubebuilder init --domain example.com --repo github.com/test/example-operator
  1. Verify the generated PROJECT file:
$ cat PROJECT 
# Code generated by tool. DO NOT EDIT.
# This file is used to track the info used to scaffold your project
# and allow the plugins properly work.
# More info: https://book.kubebuilder.io/reference/project-config.html
cliVersion: 4.5.1-SNAPSHOT-6ab4d371b
domain: example.com
layout:
- go.kubebuilder.io/v4
projectName: test-project-file
repo: github.com/test/example-operator
version: "3"

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 19, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @vitorfloriano. 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.

Copy link
Member

@camilamacedo86 camilamacedo86 left a comment

Choose a reason for hiding this comment

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

Terrific 🎉 . Thank you a lot for your contribution 🥇

@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch 3 times, most recently from dff6ef1 to 6ab4d37 Compare March 21, 2025 02:46
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from 6ab4d37 to 23c1e26 Compare March 22, 2025 01:30
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 22, 2025
@vitorfloriano vitorfloriano changed the title ✨ Add kubebuilderVersion field to PROJECT file ✨ Add cliVersion field to PROJECT file Mar 22, 2025
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch 3 times, most recently from edb23a1 to 3aeef07 Compare March 22, 2025 02:42
@knabben
Copy link
Member

knabben commented Mar 24, 2025

needs rebase, do a git pull from main locally, git rebase on your branch and solve any conflict..

@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from 3aeef07 to 1319415 Compare March 25, 2025 00:27
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 25, 2025
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from 1319415 to 28ff872 Compare March 25, 2025 01:07
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from 28ff872 to a28a293 Compare March 26, 2025 02:20
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from a28a293 to d1c79bb Compare March 28, 2025 00:38
camilamacedo86

This comment was marked as outdated.

@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 Mar 28, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, vitorfloriano

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 Mar 28, 2025
@camilamacedo86 camilamacedo86 changed the title ✨ Add cliVersion field to PROJECT file ✨ (API, CLI, go/v4) Add cliVersion field to the PROJECT file configuration to store the CLI binary version used to scaffold projects. Mar 28, 2025
@camilamacedo86 camilamacedo86 removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 28, 2025
@camilamacedo86
Copy link
Member

Hi @vitorfloriano IMO it is very close to fly 🚀
Just a couple of details see above the latest comments and then I am OK with.

This commit adds a new field to the PROJECT file: cliVersion.

Additionally, it updates the documentation in the Project Configuration Reference
to include the new cliVersion field.

It also updates the PROJECT file scaffolded in the docs and in testdata.
@vitorfloriano vitorfloriano force-pushed the feature/4398-add-kubebuilderVersion branch from d1c79bb to 2fcc548 Compare March 29, 2025 00:56
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 29, 2025
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. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add kubebuilderVersion Field in PROJECT File for Tracking Kubebuilder CLI Version
6 participants