chore: update Go tools and resolve golangci-lint warnings#8740
chore: update Go tools and resolve golangci-lint warnings#8740zirain merged 2 commits intoenvoyproxy:mainfrom
Conversation
Signed-off-by: Shahar Harari <shahar.harari@sap.com>
✅ Deploy Preview for cerulean-figolla-1f9435 canceled.
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8740 +/- ##
==========================================
+ Coverage 74.30% 74.32% +0.01%
==========================================
Files 245 245
Lines 38811 38801 -10
==========================================
- Hits 28839 28838 -1
+ Misses 7967 7962 -5
+ Partials 2005 2001 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Shahar Harari <shahar.harari@sap.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Go tooling dependencies under tools/ and applies a set of follow-up refactors/regenerations across the repo to clear golangci-lint warnings triggered by the upgrade (including regenerated client/informer code and updated Helm golden outputs).
Changes:
- Bump toolchain/module versions in
tools/go.mod/tools/go.sum. - Regenerate/update Kubernetes client/informer code and CRD/Helm rendered outputs to match updated generator/tooling.
- Apply targeted lint fixes (prealloc, avoid
fmt.Sprintfallocations, adoptslices.Clone/Concat, and add scoped#nosecsuppressions in tests/utilities).
Reviewed changes
Copilot reviewed 47 out of 64 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/go.mod | Updates tool module requirements to newer versions. |
| tools/go.sum | Updates tool dependency checksums to match the upgraded toolchain. |
| test/utils/build.go | Adds gosec suppression for trusted env-provided filesystem path usage. |
| test/helm/gateway-crds-helm/envoy-gateway-crds.out.yaml | Updates golden output (controller-gen version + formatting/newlines). |
| test/helm/gateway-crds-helm/e2e.out.yaml | Updates golden output (controller-gen version + formatting/newlines). |
| test/helm/gateway-crds-helm/all.out.yaml | Updates golden output (controller-gen version + formatting/newlines). |
| test/helm/gateway-addons-helm/e2e.out.yaml | Updates golden output (adds opencensus: null, checksum change). |
| test/helm/gateway-addons-helm/default.out.yaml | Updates golden output (adds opencensus: null, checksum change). |
| test/gobench/translate_test.go | Replaces fmt.Sprintf+WriteString with fmt.Fprintf to avoid allocations. |
| test/e2e/tests/udproute.go | Preallocates parents slice capacity. |
| test/e2e/tests/tcproute.go | Preallocates parents slice capacity. |
| test/e2e/tests/oidc_testclient.go | Adds gosec suppression for test-client HTTP requests. |
| test/e2e/tests/credential_injection.go | Adds gosec suppression for test-only credential header. |
| test/e2e/tests/credential_injection-backend-filter.go | Adds gosec suppression for test-only credential header. |
| test/conformance/suite.go | Suppresses prealloc where capacity depends on runtime branching. |
| test/benchmark/suite/markdown.go | Uses fmt.Fprintf to reduce intermediate string allocations. |
| pkg/client/informers/externalversions/factory.go | Comment/doc formatting and fixes example snippet to be correct (context.WithCancel). |
| pkg/client/informers/externalversions/api/v1alpha1/securitypolicy.go | Adopts cache.ToListWatcherWithWatchListSemantics(...) for updated informer semantics. |
| pkg/client/informers/externalversions/api/v1alpha1/httproutefilter.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/envoyproxy.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/envoypatchpolicy.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/envoyextensionpolicy.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/clienttrafficpolicy.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/backendtrafficpolicy.go | Same WatchList semantics update for informer. |
| pkg/client/informers/externalversions/api/v1alpha1/backend.go | Same WatchList semantics update for informer. |
| pkg/client/clientset/versioned/fake/clientset_generated.go | Updates fake clientset watch reactor var name and adds watchlist-semantics signaling hook. |
| internal/xds/utils/utils.go | Preallocates message slice capacity. |
| internal/xds/translator/translator.go | Adds targeted govet suppression for nilness false positive. |
| internal/xds/translator/jwt.go | Preallocates claimToHeaders slice capacity. |
| internal/xds/translator/extproc.go | Uses slices.Clone for attribute/namespace copies (cleaner + avoids extra allocations). |
| internal/wasm/httpserver.go | Adds gosec suppression for intentional background context usage on shutdown path. |
| internal/utils/test/cmp.go | Simplifies option construction via a single append. |
| internal/utils/jsonpatch/jsonpathtopointer_test.go | Simplifies test slice construction. |
| internal/provider/kubernetes/controller_offline.go | Uses slices.Concat to build allExtensions. |
| internal/metrics/register.go | Suppresses prealloc where capacity depends on runtime config. |
| internal/infrastructure/kubernetes/ratelimit/resource.go | Adds gosec suppression for Kubernetes secret volume reference. |
| internal/infrastructure/kubernetes/proxy/resource_provider_test.go | Adds gosec suppression for test-only secret names; simplifies infraList initialization. |
| internal/infrastructure/host/proxy_infra.go | Adds gosec suppression for stored cancel function usage. |
| internal/gatewayapi/translator_test.go | Refactors test case construction to reduce mutation boilerplate. |
| internal/gatewayapi/status/conditions.go | Avoids repeatedly indexing into updates slice; uses local copy consistently. |
| internal/gatewayapi/securitypolicy_test.go | Adds gosec suppression for test-only htpasswd hashes. |
| internal/gatewayapi/route.go | Preallocates perHostRoutes slice capacity. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_securitypolicies.yaml | Updates generated CRD annotation version and formatting. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_httproutefilters.yaml | Updates generated CRD annotation version and formatting. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyproxies.yaml | Updates generated CRD annotation version and formatting/newlines. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoypatchpolicies.yaml | Updates generated CRD annotation version and formatting. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_envoyextensionpolicies.yaml | Updates generated CRD annotation version and formatting. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml | Updates generated CRD annotation version and formatting/newlines. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml | Updates generated CRD annotation version and formatting/newlines. |
| charts/gateway-helm/charts/crds/crds/generated/gateway.envoyproxy.io_backends.yaml | Updates generated CRD annotation version and formatting. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_securitypolicies.yaml | Updates chart template CRD annotation version and formatting. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_httproutefilters.yaml | Updates chart template CRD annotation version and formatting. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyproxies.yaml | Updates chart template CRD annotation version and formatting/newlines. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoypatchpolicies.yaml | Updates chart template CRD annotation version and formatting. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_envoyextensionpolicies.yaml | Updates chart template CRD annotation version and formatting. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_clienttrafficpolicies.yaml | Updates chart template CRD annotation version and formatting/newlines. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backendtrafficpolicies.yaml | Updates chart template CRD annotation version and formatting/newlines. |
| charts/gateway-crds-helm/templates/generated/gateway.envoyproxy.io_backends.yaml | Updates chart template CRD annotation version and formatting. |
| api/v1alpha1/envoyproxy_tracing_types.go | Doc formatting adjustments around deprecated fields. |
| api/v1alpha1/envoyproxy_metric_types.go | Doc formatting adjustments around deprecated fields. |
| api/v1alpha1/envoyproxy_accesslogging_types.go | Doc formatting adjustments around deprecated fields. |
| api/v1alpha1/envoygateway_types.go | Doc formatting adjustments around deprecated fields. |
| api/v1alpha1/clienttrafficpolicy_types.go | Adds blank line in deprecation docs for consistency. |
| api/v1alpha1/backendtrafficpolicy_types.go | Adds blank line in deprecation docs for consistency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
/retest |
…#8740) * chore: update Go tools and resolve golangci-lint warnings Signed-off-by: Shahar Harari <shahar.harari@sap.com> * gen + update grpc Signed-off-by: Shahar Harari <shahar.harari@sap.com> --------- Signed-off-by: Shahar Harari <shahar.harari@sap.com> Signed-off-by: Jake Oliver <jake@truelayer.com>
What this PR does / why we need it:
tools/go.mod,tools/go.sum) to latest versions.Which issue(s) this PR fixes:
N/A
Release Notes: No