From cc8e3ad3336923f227aeda631accbe9ff8257ea0 Mon Sep 17 00:00:00 2001 From: Dennis Jakobsen Date: Mon, 14 Sep 2026 09:59:13 +0200 Subject: [PATCH] build: bump Go toolchain to 1.27.1 (Alpine runtime unchanged at 3.20) Resumes the Go-only half of PR #22 (bump-docker-to-alpine-3.24), which combined a Go toolchain bump with an Alpine runtime bump. Per decision, the Go bump proceeds first here; the Alpine runtime bump is deferred to a separate, later task. PR #22 and its external feature branch are not touched. - Dockerfile / Dockerfile.go builder stage: golang:1.22-alpine -> golang:1.27.1-alpine3.24, pinned by digest (sha256:cf6fca6641884b8433441b2b0652976f975e1d0fdd26d177eaaf8596087f3125, re-verified live against the registry immediately before this commit). - .github/workflows/deploy.yml: all three actions/setup-go steps (go-test, e2e-test, release-artifacts) go-version '1.22' -> '1.27.1', step names updated to match. - Runtime base (`FROM alpine:3.20`, Dockerfile line 60 / Dockerfile.go line 24) is untouched. go.mod/go.sum, application code, database schema and config are untouched. - #51's fork-guard `if:` conditions in deploy.yml are untouched; cmd/server/fork_guard_workflow_test.go and release_fast_path_workflow_test.go both pass unmodified against the edited deploy.yml. Verified in isolation (origin/master @ 6b70e94a, Docker Desktop 27.4.0/BuildKit, linux/arm64 native): - go build + go vet clean across all 15 Go modules, both golang:1.22.12 and golang:1.27.1 toolchains (bookworm images, for glibc/-race parity with CI). - cmd/server full suite incl. -race: PASS on both toolchains. - TestPruneOldNeighborMetrics (#33) alone, -race -count=10: PASS on both toolchains, 0 races -- the pruning-test fix holds under 1.27.1. - cmd/ingestor repeated 10x per toolchain (no -race): 5/10 failed on BOTH 1.22.12 and 1.27.1, every failure a member of the pre-existing, already-documented TestBackfillTxLastSeen_* family from #33. Same rate, same tests, on both toolchains -- not introduced or worsened by this change. Not fixed here (out of scope). - Native arm64 image build (both variants) + amd64 cross-compile (builder-stage export only, NOT a runtime test) succeed; all 6 binaries carry the correct go version via `go version -m` (go1.22.12 baseline / go1.27.1 candidate) and CGO_ENABLED=0. - Runtime base identical byte-for-byte between variants: `apk list -I` and /etc/alpine-release match exactly (alpine 3.20.10). - arm64 runtime smoke (both variants, --network none, no MQTT/DB traffic): all 4 supervisor programs (mosquitto, ingestor, server, caddy) reach RUNNING, /api/stats responds 200 with engine:"go", corescope-decrypt --version runs, clean stop (~6s, exit 0, no OOM). - Dockerfile.go fails identically on both variants at `go mod download` (missing internal/ COPY lines) -- pre-existing (#33-documented), unrelated to Go version, not fixed here. - gofmt: no .go files touched. git diff --check: clean. deploy.yml: valid YAML. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/deploy.yml | 12 ++++++------ Dockerfile | 2 +- Dockerfile.go | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 6a4d51f15..2f083c4e5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -46,10 +46,10 @@ jobs: - name: Clean Go module cache run: rm -rf ~/go/pkg/mod 2>/dev/null || true - - name: Set up Go 1.22 + - name: Set up Go 1.27.1 uses: actions/setup-go@v6 with: - go-version: '1.22' + go-version: '1.27.1' cache-dependency-path: | cmd/server/go.sum cmd/ingestor/go.sum @@ -266,10 +266,10 @@ jobs: - name: Clean Go module cache run: rm -rf ~/go/pkg/mod 2>/dev/null || true - - name: Set up Go 1.22 + - name: Set up Go 1.27.1 uses: actions/setup-go@v6 with: - go-version: '1.22' + go-version: '1.27.1' cache-dependency-path: cmd/server/go.sum - name: Build Go server @@ -669,10 +669,10 @@ jobs: - name: Checkout code uses: actions/checkout@v5 - - name: Set up Go 1.22 + - name: Set up Go 1.27.1 uses: actions/setup-go@v6 with: - go-version: '1.22' + go-version: '1.27.1' - name: Build corescope-decrypt (static, linux/amd64) run: | diff --git a/Dockerfile b/Dockerfile index 8294c4262..8d39bb7e0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,7 +3,7 @@ # BUILDPLATFORM is auto-set by buildx; default to linux/amd64 so plain # `docker build` (without buildx) doesn't fail on an empty platform string. ARG BUILDPLATFORM=linux/amd64 -FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder +FROM --platform=$BUILDPLATFORM golang:1.27.1-alpine3.24@sha256:cf6fca6641884b8433441b2b0652976f975e1d0fdd26d177eaaf8596087f3125 AS builder ARG APP_VERSION=unknown ARG GIT_COMMIT=unknown diff --git a/Dockerfile.go b/Dockerfile.go index 77e0329a8..5cd8e5cac 100644 --- a/Dockerfile.go +++ b/Dockerfile.go @@ -1,4 +1,4 @@ -FROM golang:1.22-alpine AS builder +FROM golang:1.27.1-alpine3.24@sha256:cf6fca6641884b8433441b2b0652976f975e1d0fdd26d177eaaf8596087f3125 AS builder RUN apk add --no-cache build-base