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

Automate zz_generated.deepcopy.go updates with make codegen #1735

Merged
merged 1 commit into from
Dec 13, 2024

Conversation

kahirokunn
Copy link
Contributor

@kahirokunn kahirokunn commented Dec 10, 2024

Description

Problem

There was no provided method to update zz_generated.deepcopy.go. As a result, updating related code required additional manual steps, increasing both effort and the potential for errors.

Solution

This PR modifies the code generation process to allow updating zz_generated.deepcopy.go by simply running make codegen. This automation streamlines the workflow, reducing manual intervention and improving developer efficiency.

Changes

  • Updated hack/update-codegen.sh to include helper generation for zz_generated.deepcopy.go.
  • Modified the Makefile to ensure make codegen handles the generation process effectively.

Benefits

  • Simplifies the maintenance of zz_generated.deepcopy.go.
  • Reduces manual effort and minimizes the risk of inconsistencies.

@kahirokunn kahirokunn changed the title chore(codegen): add helper generation to codegen script feat: Automate zz_generated.deepcopy.go updates with make codegen Dec 10, 2024
@kahirokunn kahirokunn changed the title feat: Automate zz_generated.deepcopy.go updates with make codegen Automate zz_generated.deepcopy.go updates with make codegen Dec 10, 2024
@kahirokunn kahirokunn force-pushed the add-helper-gen branch 3 times, most recently from 7efe552 to f15d2b5 Compare December 10, 2024 02:38
Copy link
Member

@aryan9600 aryan9600 left a comment

Choose a reason for hiding this comment

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

lgtm! thank you @kahirokunn 🙇

could you please squash this into one commit?

@kahirokunn
Copy link
Contributor Author

Okay. I will.

chore(gatewayapi/v1beta1): add deepcopy-gen annotations
run `make codegen`

Signed-off-by: kahirokunn <[email protected]>
@kahirokunn
Copy link
Contributor Author

@aryan9600
Thank you for the review! 🙇
I've squashed the commits into one as requested. Please let me know if there's anything else! 😊

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2024

Codecov Report

Attention: Patch coverage is 64.00000% with 9 lines in your changes missing coverage. Please review.

Project coverage is 39.27%. Comparing base (8f83838) to head (febc327).
Report is 26 commits behind head on main.

Files with missing lines Patch % Lines
...g/apis/gatewayapi/v1beta1/zz_generated.deepcopy.go 64.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1735      +/-   ##
==========================================
+ Coverage   35.08%   39.27%   +4.18%     
==========================================
  Files         283      284       +1     
  Lines       24653    22379    -2274     
==========================================
+ Hits         8650     8789     +139     
+ Misses      15063    12643    -2420     
- Partials      940      947       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@stefanprodan stefanprodan 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 @kahirokunn

@stefanprodan stefanprodan merged commit a85887d into fluxcd:main Dec 13, 2024
17 checks passed
@kahirokunn kahirokunn deleted the add-helper-gen branch December 16, 2024 01:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants