From bec75f143582e9842477df701c37baca4c6cf8c0 Mon Sep 17 00:00:00 2001 From: senke Date: Tue, 14 Apr 2026 17:02:09 +0200 Subject: [PATCH] ci: bump Go to 1.25 and fix goimports drift in 3 files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit golangci-lint v2.11.4 requires Go >= 1.25. With the workflow on 1.24, setup-go would silently trigger an in-job auto-toolchain download (observed in run #71: 'go: github.com/golangci/golangci-lint/v2@v2.11.4 requires go >= 1.25.0; switching to go1.25.9') adding ~3 min to every Backend (Go) run. Bump setup-go to 1.25 in ci.yml, backend-ci.yml, go-fuzz.yml so the prebuilt Go is already the right version. Also lint-fix three files that golangci-lint's goimports checker flagged — goimports sorts/groups imports and removes unused ones, which plain gofmt leaves alone: - veza-backend-api/cmd/api/main.go - veza-backend-api/internal/api/handlers/chat_handlers.go - veza-backend-api/internal/handlers/auth_integration_test.go --- .github/workflows/backend-ci.yml | 4 ++-- .github/workflows/ci.yml | 2 +- .github/workflows/go-fuzz.yml | 2 +- veza-backend-api/cmd/api/main.go | 1 + veza-backend-api/internal/api/handlers/chat_handlers.go | 1 - veza-backend-api/internal/handlers/auth_integration_test.go | 3 --- 6 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/backend-ci.yml b/.github/workflows/backend-ci.yml index ddf21f7a2..bb0e9cebb 100644 --- a/.github/workflows/backend-ci.yml +++ b/.github/workflows/backend-ci.yml @@ -28,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: "1.24" + go-version: "1.25" cache: true cache-dependency-path: veza-backend-api/go.sum @@ -153,7 +153,7 @@ jobs: - name: Set up Go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: "1.24" + go-version: "1.25" cache: true cache-dependency-path: veza-backend-api/go.sum diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67c18cd33..3ecec8279 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: - name: Set up Go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: "1.24" + go-version: "1.25" cache: true # go.mod/go.sum live under veza-backend-api, not repo root. # Without this, setup-go warns "Dependencies file is not diff --git a/.github/workflows/go-fuzz.yml b/.github/workflows/go-fuzz.yml index fdf6c309b..2762d8ca6 100644 --- a/.github/workflows/go-fuzz.yml +++ b/.github/workflows/go-fuzz.yml @@ -24,7 +24,7 @@ jobs: - name: Set up Go uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0 with: - go-version: "1.24" + go-version: "1.25" cache: true - name: Download deps diff --git a/veza-backend-api/cmd/api/main.go b/veza-backend-api/cmd/api/main.go index 2525c61ac..85f455ba7 100644 --- a/veza-backend-api/cmd/api/main.go +++ b/veza-backend-api/cmd/api/main.go @@ -5,6 +5,7 @@ import ( "fmt" "log" "net/http" + // SECURITY(REM-027): pprof removed from production — use build tag or dedicated debug binary instead. // To enable: go build -tags debug ./cmd/api "os" diff --git a/veza-backend-api/internal/api/handlers/chat_handlers.go b/veza-backend-api/internal/api/handlers/chat_handlers.go index de7a473c6..bd61c0eae 100644 --- a/veza-backend-api/internal/api/handlers/chat_handlers.go +++ b/veza-backend-api/internal/api/handlers/chat_handlers.go @@ -10,7 +10,6 @@ import ( "strconv" "github.com/gin-gonic/gin" - "github.com/google/uuid" "go.uber.org/zap" "veza-backend-api/internal/services" diff --git a/veza-backend-api/internal/handlers/auth_integration_test.go b/veza-backend-api/internal/handlers/auth_integration_test.go index aeda648b1..e83ac4fa2 100644 --- a/veza-backend-api/internal/handlers/auth_integration_test.go +++ b/veza-backend-api/internal/handlers/auth_integration_test.go @@ -5,13 +5,11 @@ package handlers import ( "bytes" - "context" "encoding/json" "net/http" "net/http/httptest" "strings" "testing" - "time" "veza-backend-api/internal/core/auth" "veza-backend-api/internal/database" @@ -26,7 +24,6 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "go.uber.org/zap" "go.uber.org/zap/zaptest" "gorm.io/driver/sqlite" "gorm.io/gorm"