Skip to content

🌱 Align v1beta2 field doc comments with the lowercase JSON name convention - #2308

Merged
Rivaldito merged 6 commits into
mainfrom
sa/2061
Oct 9, 2026
Merged

Rivaldito merged 6 commits into
mainfrom
sa/2061

Conversation

@Rivaldito

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:
The api/v1beta2 types were copied from api/v1beta1, so most field doc comments still started with the capitalized Go field name (e.g. // Host is the hostname…). The Cluster API v1beta2 convention is to start a field comment with the lowercase JSON name (// host is the hostname…), because the comment becomes the field description in the generated CRD.

This PR rewrites the first word of each such comment to the field's JSON name (about 150 comments across 12 files in api/v1beta2) and regenerates the CRDs in config/crd/bases. Comments that started with a different word (e.g. controlPlaneRegions, hetznerSecretRef, hcloud, the Storage and NIC fields, and the metadata/status fields of the template types) were fixed by hand.

Which issue(s) this PR fixes:
Fixes #2061

@github-actions github-actions Bot added size/XL Denotes a PR that changes 800-2000 lines, ignoring generated files. area/api Changes made in the api directory labels Sep 30, 2026
@Rivaldito Rivaldito self-assigned this Sep 30, 2026

@abdullah599 abdullah599 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR #2298 added CustomProvisioner.Swraid on main with // Swraid defines ..., so that one needs the same fix after a rebase. Otherwise only small things, LGTM :)

Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hetznerbaremetalhost_types.go Outdated
Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hetznerbaremetalmachine_types.go Outdated
@Rivaldito
Rivaldito removed the request for review from Dhairya-Arora01 October 9, 2026 08:00
@Rivaldito
Rivaldito requested a review from abdullah599 October 9, 2026 08:46

@abdullah599 abdullah599 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

thanks, only the new fields from main are left else LGTM :)

Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hcloudmachine_types.go Outdated
Comment thread api/v1beta2/hcloudmachine_types.go Outdated
@Rivaldito
Rivaldito requested a review from abdullah599 October 9, 2026 11:09
@Rivaldito
Rivaldito merged commit df753bd into main Oct 9, 2026
7 checks passed
@Rivaldito
Rivaldito deleted the sa/2061 branch October 9, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/api Changes made in the api directory size/XL Denotes a PR that changes 800-2000 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align field doc comments in the v1beta2 API package with the lowercase JSON name convention

2 participants