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

✨ Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins #4572

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

Conversation

sarthaksarthak9
Copy link
Contributor

@sarthaksarthak9 sarthaksarthak9 commented Feb 21, 2025

Fixes: #4433

  • Fixed issue where 'kubebuilder alpha generate' failed if PROJECT contained go.kubebuilder.io/v3.
  • Automatically updates outdated plugin references (v3 → v4) to support scaffolding.
  • Added a warning to notify users before modifying the PROJECT file.

image


image


image

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Feb 21, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @sarthaksarthak9. 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 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 Feb 21, 2025
@sarthaksarthak9 sarthaksarthak9 changed the title (:sparkles:) Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins (:sparkles:): Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins Feb 21, 2025
@sarthaksarthak9 sarthaksarthak9 changed the title (:sparkles:): Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins (:sparkles:)Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins Feb 21, 2025
@sarthaksarthak9 sarthaksarthak9 changed the title (:sparkles:)Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins ✨ Ensure 'kubebuilder alpha generate' rescaffolds with outdated plugins Feb 21, 2025
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.

Really great job 🥇 🎉
I added some comments, and I think we need to add a test for this case.
Otherwise, it is all amazing !!!

@sarthaksarthak9
Copy link
Contributor Author

sarthaksarthak9 commented Feb 22, 2025

@camilamacedo86 I noticed that updating the plugin list in getInitArgs() automatically updates the PROJECT file, even though I don’t explicitly see a save function. How is this happening? Could you help me confirm where the file update is triggered?. Also, is there still a need for updateProjectFileForAlphaGenerate() in this case?

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 25, 2025
@k8s-ci-robot k8s-ci-robot added size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 26, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sarthaksarthak9
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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

1 similar comment
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: sarthaksarthak9
Once this PR has been reviewed and has the lgtm label, please assign camilamacedo86 for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 26, 2025
@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Feb 26, 2025
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Mar 1, 2025
@sarthaksarthak9
Copy link
Contributor Author

sarthaksarthak9 commented Mar 3, 2025

I'm not very experienced at writing tests. I tried implementing the test, but ran into problems that I couldn't resolve. Could we go with test in some other pr?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

kubebuilder alpha generate fails to rescaffold if PROJECT contains go.kubebuilder.io/v3
3 participants