Skip to content

chore: update Go tools and resolve golangci-lint warnings#8740

Merged
zirain merged 2 commits intoenvoyproxy:mainfrom
shahar-h:update-go-tools
Apr 13, 2026
Merged

chore: update Go tools and resolve golangci-lint warnings#8740
zirain merged 2 commits intoenvoyproxy:mainfrom
shahar-h:update-go-tools

Conversation

@shahar-h
Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

  • Updated Go tools (tools/go.mod, tools/go.sum) to latest versions.
  • Resolved all golangci-lint warnings introduced by the upgrade.

Which issue(s) this PR fixes:
N/A

Release Notes: No

Signed-off-by: Shahar Harari <shahar.harari@sap.com>
@shahar-h shahar-h requested a review from a team as a code owner April 13, 2026 18:50
@netlify
Copy link
Copy Markdown

netlify Bot commented Apr 13, 2026

Deploy Preview for cerulean-figolla-1f9435 canceled.

Name Link
🔨 Latest commit 5cc472e
🔍 Latest deploy log https://app.netlify.com/projects/cerulean-figolla-1f9435/deploys/69dd3ed09aaeaa0008343cc5

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.32%. Comparing base (d938c3c) to head (5cc472e).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Signed-off-by: Shahar Harari <shahar.harari@sap.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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.Sprintf allocations, adopt slices.Clone/Concat, and add scoped #nosec suppressions 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.

Comment thread pkg/client/clientset/versioned/fake/clientset_generated.go
@shahar-h
Copy link
Copy Markdown
Contributor Author

/retest

@zirain zirain merged commit fa31928 into envoyproxy:main Apr 13, 2026
58 of 63 checks passed
@shahar-h shahar-h deleted the update-go-tools branch April 14, 2026 02:23
skos-ninja pushed a commit to skos-ninja/envoy-gateway that referenced this pull request May 1, 2026
…#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>
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.

4 participants