Skip to content

refactor(generators): migrate custom generators to gengo v2 - #793

Merged
thxCode merged 1 commit into
mainfrom
gengo-v2-migration
Oct 25, 2026
Merged

thxCode merged 1 commit into
mainfrom
gengo-v2-migration

Conversation

@thxCode

@thxCode thxCode commented Oct 25, 2026

Copy link
Copy Markdown
Collaborator

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=0 settings 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 test passes (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?

NONE

Signed-off-by: thxCode <thxcode0824@gmail.com>
@gpustack-code-review

Copy link
Copy Markdown

✅ OpenCodeReview: Review skipped: no items were selected.

@thxCode
thxCode merged commit 12c90d2 into main Oct 25, 2026
11 checks passed
@thxCode
thxCode deleted the gengo-v2-migration branch October 25, 2026 19:40
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.

1 participant