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

⚠️ cleanup/refactor: Alpha Generate command #4180

Merged

Conversation

camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Sep 22, 2024

  • Refactored the code implementation to improve error handling, encapsulate logic, and streamline execution flow.
  • Moved the code implementation from pkg to the CLI since it pertains directly to a command.
  • Additionally, moved the implementation to internal to prevent exposing the Generate code and avoid unintentional extensions on this alpha feature.

Motivation
Ensure better maintenance ability
Not allow unintentional extensions on this alpha feature.

@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 22, 2024
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Sep 22, 2024
@camilamacedo86 camilamacedo86 marked this pull request as ready for review September 22, 2024 07:40
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 22, 2024
@camilamacedo86 camilamacedo86 changed the title Ref rescaffold 🌱 cleanup/refactory : Re-Generate Alpha Command Sep 22, 2024
@camilamacedo86
Copy link
Member Author

/test pull-kubebuilder-e2e-k8s-1-31-0

@camilamacedo86 camilamacedo86 force-pushed the ref-rescaffold branch 2 times, most recently from 1a4f851 to 9f0bcd3 Compare September 23, 2024 08:32
@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 Sep 23, 2024
@camilamacedo86 camilamacedo86 changed the title 🌱 cleanup/refactory : Re-Generate Alpha Command 🌱 cleanup/refactory Alpha Generate Command Sep 23, 2024
Copy link
Member Author

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

@varshaprasad96

We have now very compreensive e2e tests see: https://github.com/kubernetes-sigs/kubebuilder/blob/master/test/e2e/alphagenerate/generate_test.go

So, if pass on the tests the changes are OK.

But I would like your input / review here if you have time.
Just to ensure that you agree with the changes and mainly about we are moving the code implementation. The pkg does not seems a good place for we add the code implementation for commands like that.

I mean, we are not really want to provide it as pkg/api method right
we probably either should use internal dir here to not export.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Sep 23, 2024
@camilamacedo86 camilamacedo86 changed the title 🌱 cleanup/refactory Alpha Generate Command 🌱 cleanup/refactor: Alpha Generate command Sep 23, 2024
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 1, 2024
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 2, 2024
@camilamacedo86 camilamacedo86 changed the title 🌱 cleanup/refactor: Alpha Generate command ⚠️ cleanup/refactor: Alpha Generate command Oct 10, 2024
@varshaprasad96
Copy link
Member

Hey @camilamacedo86 - Really sorry for the delay in reply. The refactor looks good, especially moving the code to internal dir. Have no doubts on this! Thank you!

/lgtm
/approve

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

@Kavinjsir Kavinjsir left a comment

Choose a reason for hiding this comment

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

Looks good to me! 👍🏼

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86, Kavinjsir, varshaprasad96

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:
  • OWNERS [Kavinjsir,camilamacedo86,varshaprasad96]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

- Refactored the code implementation to improve error handling, encapsulate logic, and streamline execution flow.
- Moved the code implementation from `pkg` to the CLI since it pertains directly to a command.
- Additionally, moved the implementation to `internal` to prevent exposing the `Generate` code and avoid unintentional extensions on this alpha feature.
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 11, 2024
@camilamacedo86 camilamacedo86 merged commit eedee67 into kubernetes-sigs:master Oct 11, 2024
10 of 16 checks passed
@camilamacedo86 camilamacedo86 deleted the ref-rescaffold branch October 11, 2024 11:57
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. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants