Repository navigation
refactor(generators): migrate custom generators to gengo v2 - #793
Merged
Merged
Conversation
Signed-off-by: thxCode <thxcode0824@gmail.com>
|
✅ OpenCodeReview: Review skipped: no items were selected. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
/kind cleanup
/area testing
What this PR does / why we need it:
Migrate the custom API registration, CRD and webhook generators to the existing gengo/v2 dependency. Adapt target construction, package loading and import tracking, and add alias/comment fixtures. Remove the unused direct gengo v1 requirement and obsolete
gotypesalias=0settings from generation and both test paths, together with the CRD golden-test skip guard.The migration preserves generated schemas and behavior. Complete generation with the compiler currently declared by the module changes only import aliases in two API-service files and the worker webhook file.
Which issue(s) this PR links to:
None. This is the generator checkpoint preceding the Go/Kubernetes dependency upgrade.
Special notes for your reviewer:
Validation: generator race tests pass with Go 1.26.9 and Go 1.27.3; full
make testpasses (100 packages); full lint passes under the current Go 1.26.9 compiler on the final source. Alias-marker fixtures verify that markers on a reachable non-root alias do not configure CRD columns, while placing the same marker on the CRD root does. Two complete generations from the exact source checkpoint under Go 1.26.9 produce identical content and modes across 1,881 paths. The complete generated scope was synchronized and all 1,613 file hashes verified.Complete Go 1.27.3 generation is also repeatable. It adds 705 empty comment lines across 226 apply-configuration files through the upstream formatter; the same difference exists with the previous custom generators. Those compiler-dependent outputs belong with the subsequent Go 1.27 module/CI switch. This PR retains the current compiler and Kubernetes pins. The pinned linter's existing Go 1.27 export-data failure is recorded; the core upgrade must make that gate green.
Does this PR introduce a user-facing change?