From 4b5e31a582697c78b42d47128669ebe0b75410bd Mon Sep 17 00:00:00 2001 From: Joris Baum Date: Tue, 24 Feb 2026 17:04:45 +0100 Subject: [PATCH] Reuse installed ginkgo and use cleaner binary check Also: * also fix lint issue with dualstack --- scripts/subtests/lint | 8 ++------ scripts/subtests/spec-test | 5 +---- src/internal/cfauthproxy/cf_auth_proxy.go | 1 - src/internal/routing/routing_table.go | 2 +- src/internal/syslog/server.go | 2 +- 5 files changed, 5 insertions(+), 13 deletions(-) diff --git a/scripts/subtests/lint b/scripts/subtests/lint index bc83445e5..7332e7217 100755 --- a/scripts/subtests/lint +++ b/scripts/subtests/lint @@ -5,14 +5,10 @@ set -o pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -set +e -golangci_lint_executable=$(which golangci-lint) -set -e -if [ -z "${golangci_lint_executable}" ] || [ ! -x "${golangci_lint_executable}" ]; then +if ! command -v golangci-lint &> /dev/null; then go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest fi pushd "${SCRIPT_DIR}/../../src" > /dev/null golangci-lint run ./... -popd > /dev/null - +popd > /dev/null \ No newline at end of file diff --git a/scripts/subtests/spec-test b/scripts/subtests/spec-test index d8c8313e4..0cd3756b1 100755 --- a/scripts/subtests/spec-test +++ b/scripts/subtests/spec-test @@ -5,10 +5,7 @@ set -o pipefail SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" -set +e -bundler_executable=$(which bundle) -set -e -if [ -z "${bundler_executable}" ] || [ ! -x "${bundler_executable}" ]; then +if ! command -v bundle &> /dev/null; then gem install bundler fi diff --git a/src/internal/cfauthproxy/cf_auth_proxy.go b/src/internal/cfauthproxy/cf_auth_proxy.go index cd4447af2..d9c284c7f 100644 --- a/src/internal/cfauthproxy/cf_auth_proxy.go +++ b/src/internal/cfauthproxy/cf_auth_proxy.go @@ -183,7 +183,6 @@ func NewTransportWithRootCA(rootCACertPool *x509.CertPool) *http.Transport { DialContext: (&net.Dialer{ Timeout: 30 * time.Second, KeepAlive: 30 * time.Second, - DualStack: true, }).DialContext, MaxIdleConns: 100, IdleConnTimeout: 90 * time.Second, diff --git a/src/internal/routing/routing_table.go b/src/internal/routing/routing_table.go index 51b4bb667..5d531fc96 100644 --- a/src/internal/routing/routing_table.go +++ b/src/internal/routing/routing_table.go @@ -47,7 +47,7 @@ func (t *RoutingTable) Lookup(item string) []int { node := t.hasher.Hash(hashValue) var result []int - var replicationFactor = int(t.replicationFactor) //#nosec G115 + var replicationFactor = int(t.replicationFactor) for n := 0; n < replicationFactor; n++ { result = append(result, (node+n*replicationFactor)%len(t.addresses)) } diff --git a/src/internal/syslog/server.go b/src/internal/syslog/server.go index ee309bf38..b4b21a5ca 100644 --- a/src/internal/syslog/server.go +++ b/src/internal/syslog/server.go @@ -267,7 +267,7 @@ func (s *Server) convertMessage(env *loggregator_v2.Envelope, msg *rfc5424.Syslo env.Message = &loggregator_v2.Envelope_Log{ Log: &loggregator_v2.Log{ Payload: []byte(payload), - Type: s.typeFromPriority(int(*msg.Priority)), //#nosec G115 + Type: s.typeFromPriority(int(*msg.Priority)), }, }