Conversation
|
/test iam-controller-test |
- Update docstring unit tests to validate tab placement - Update GetDocumentation() to apply indentation to each comment line
|
/LGTM |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gustavodiaz7722, knottnt The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest |
|
@knottnt: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
|
/override acm-controller-test |
Issue #, if available:
Description of changes:
Regenerating a controller on Go 1.27+ produced spurious diffs in apis/*.go (and helm/crds) versus controllers generated on Go ≤1.26. The code-generator emits struct-field doc comments at column 0 with * list bullets. build-controller.sh then runs gofmt, and gofmt ≤1.26 reformatted those column-1 field comments (rewriting *→- and re-indenting), while gofmt 1.27+ leaves them alone (Go go/printer commit c1f0b9b, fixing golang/go#52605 — field comments aren't top-level doc comments). Result: output depended on which Go toolchain the contributor had installed.
Fix: Emit generated doc comments with a leading tab so they start past column 1. gofmt's doc-comment reformatting only triggers on column-1 comments, so now both Go 1.26 and 1.27 leave the bullets untouched, with no requirement for contributors to be on a specific Go version.
Note: As a result of this change the generated CRDs under
helm/crdswill still be altered to match the CRDs underconfig/crd/bases. This PR just makes that behavior consistent between Go toolchain versions.Verified: Regenerated glue-controller under gofmt 1.26.5 and 1.27.1 — all generated apis/*.go files byte-identical across both; output idempotent under re-gofmt.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.