build: Build 19-3-stable on Go 1.26

What does this MR do?

Moves 19-3-stable CI to Go 1.26, and fixes the test failures that Go 1.26 surfaces.

Go 1.26 is required on supported branches for a Go security fix (the eMudhra CA issue), tracked in https://gitlab.com/gitlab-org/release/tasks/-/work_items/28131. This MR is needed for that on its own.

It is also a prerequisite for !9470 (merged), which backports gocloud.dev v0.47.0. That release declares go 1.26.0 in its go.mod, so the module cannot build under Go 1.25.

Why

With go_default: "1.25", pipelines build with Go 1.25 and GOTOOLCHAIN=local. Once go.mod requires go 1.26.0, those jobs fail with:

go.mod requires go >= 1.26.0 (running go 1.25.14; GOTOOLCHAIN=local)

This branch previously supported Go 1.25 only. v0.47.0 cannot build on 1.25, so 1.25 is dropped from go_supported.

Building under Go 1.26 then surfaces pre-existing issues that 1.25 tolerated. These are fixed here to match master:

  • go vet's printf analyzer is stricter and flags three format-verb mismatches.
  • context.Cause() was reordered to call Err() on its argument first, which made testhelper.timeoutContext.Err() recurse into a stack overflow in every test using ContextWithSimulatedTimeout() (e.g. internal/limiter).
  • time.ParseDuration() now returns a different concrete error type, breaking a structural error comparison in TestGetDuration.

The last two fixes are a backport of !9116 (merged), which 19-4-stable already carries but this branch predates.

Contents

  • .gitlab-ci.yml: go_default 1.25 to 1.26, go_supported ["1.25"] to ["1.26"], and ubi 9.5 to 9.7 (no ubi-9.5-golang-1.26 image is published; 19-4-stable and 19-5-stable already use 9.7).
  • .gitlab-ci.yml: cap FIPS test parallelism with -p=8 (cherry-pick of 8d1f8fd649, #6296 (closed)). FIPS runners default to GOMAXPROCS=32, and each concurrent package writes its own set of Gitaly binaries into the 10GB TEST_TMP_DIR tmpfs, so 32 at once exhaust it and tests fail with ENOSPC. 19-4-stable and 19-5-stable already carry this; this branch predated it.
  • internal/git/gitpipe/catfile_info.go: %q of a bytes.Buffer now uses stderr.String().
  • internal/gitaly/storage/storagemgr/partition/transaction_manager.go: %q of an int enum changed to %d.
  • internal/transaction/voting/phase.go: %q of an int enum changed to %d.
  • internal/testhelper/testhelper.go: resolve the context cause via the embedded context to avoid the Go 1.26 Err()/Cause() recursion.
  • internal/helper/env/env_test.go: compare duration-parse error messages instead of error values.

go vet ./... is clean, and the previously failing internal/limiter and internal/helper/env tests pass under Go 1.26.

Edited by Stan Hu

Merge request reports

Loading
Loading