Add blank lines around long CSILimits field for stable gofmt output

gofmt in go1.26.5 formats this literal differently on amd64 and arm64,
and each build rejects the form the other wants. This breaks
verify-gofmt in ci-kubernetes-verify-master-canary, the only verify job
that runs on arm64 nodes. Blank lines around the long field keep it out
of the gofmt alignment groups, and gofmt from go1.26.5 on amd64 and
arm64, and from go1.27rc2, all accept this form.
This commit is contained in:
Davanum Srinivas
2026-07-31 08:29:17 -04:00
parent 8e608f6b90
commit 01ebd34fb5

View File

@@ -622,6 +622,8 @@ func NewCSI(_ context.Context, _ runtime.Object, handle fwk.Handle, fts feature.
}
csiTranslator := csitrans.New()
// The blank lines around the long field keep gofmt output the same
// on all architectures, see issue #141074.
return &CSILimits{
csiManager: handle.SharedCSIManager(),
pvLister: pvLister,
@@ -630,7 +632,9 @@ func NewCSI(_ context.Context, _ runtime.Object, handle fwk.Handle, fts feature.
vaLister: vaLister,
csiDriverLister: csiDriverLister,
enableVolumeLimitScaling: fts.EnableVolumeLimitScaling,
enableInPlacePodVerticalScalingSchedulerPreemption: fts.EnableInPlacePodVerticalScalingSchedulerPreemption,
randomVolumeIDPrefix: rand.String(32),
translator: csiTranslator,
vaIndexer: vaInformer.GetIndexer(),