Skip to content

build: require Go 1.27 (go.mod, Dockerfile builder, README) - #133

Merged
Shashank Mittal (shashank-iitbhu) merged 3 commits into
mainfrom
fix/dockerfile-go-1.25
Oct 22, 2026
Merged

Shashank Mittal (shashank-iitbhu) merged 3 commits into
mainfrom
fix/dockerfile-go-1.25

Conversation

@shashank-iitbhu

@shashank-iitbhu Shashank Mittal (shashank-iitbhu) commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Moves the module and the Docker build to Go 1.27. Go 1.25 is out of support; go.dev lists 1.27 and 1.26 as the supported releases, and the latest is go1.27.3.

It also fixes docker build -f build/Dockerfile ., which fails on main:

go: go.mod requires go >= 1.25.0 (running go 1.24.7; GOTOOLCHAIN=local)

The builder stage uses golang:1.24.7-alpine. The official golang images set GOTOOLCHAIN=local, so Go won't download a newer toolchain and the build stops.

Changes

  • go.mod: go 1.25.0 → go 1.27.0. Every build (local, CI, Docker) now needs a supported toolchain.
    • No toolchain line. go 1.27.0 already accepts any 1.27.x. A toolchain go1.27.x line would make machines with GOTOOLCHAIN=auto download that exact patch, and someone would have to keep bumping it.
    • go mod tidy (go1.27.3) only regrouped go.mod. It merged the third require block into the usual direct and indirect blocks. The modules, versions and // indirect markers are unchanged (I diffed the sorted require lists), and go.sum did not change. go mod tidy -diff is clean and go mod verify passes.
  • build/Dockerfile: builder golang:1.24.7-alpine → golang:1.27-alpine. The runtime stage is unchanged: alpine:3.20 plus librdkafka, with no ENTRYPOINT.
  • README.md: the Go prerequisite now says "Go 1.27 or later (the version in go.mod)".
  • Other Go pins: the repo has no .tool-versions, the makefile doesn't pin a version, and there are no other Dockerfiles or docs that do. The go-version pins in .github/workflows/* are updated in ci: publish a linux/arm64 release binary and a multi-arch Docker image, run tests on PRs #134.

Merge order

This PR and #134 don't depend on each other, so either can merge first. If this one lands first, the existing ci.yaml and release.yaml (setup-go with 1.24.7) still work: GOTOOLCHAIN defaults to auto there, so Go downloads go1.27.0. That's how CI passes today with the go 1.25.0 directive; the log shows go: downloading go1.25.0. #134 then installs 1.27.x directly.

Validation done locally

All checks used golang:1.27-bookworm (go1.27.3, --platform linux/arm64, GOTOOLCHAIN=local):

  • go build ./... passes.
  • go test ./... passes, including with -race. The only tests are in internal/pkg/pipeline, internal/pkg/pipeline/ack and internal/pkg/pipeline/task, and none need external services. main with Go 1.27 gives the same results.
  • go vet ./... reports three copylocks findings, and main reports the same three with Go 1.27, so this PR doesn't introduce them. They come from copying a task struct that embeds task.Base (which holds an atomic.Int64, and a sync.RWMutex before fix(task): stop locking Base.SendData so concurrent workers run in parallel #132): archive.go:81, compress.go:46 and file.go:223. With -copylocks=false, go vet passes. Fixing them is out of scope here.
  • I also merged this branch with the current main (fix(task): stop locking Base.SendData so concurrent workers run in parallel #132) locally. Build, vet (without copylocks) and test -race pass there too.
  • docker build --platform linux/arm64 -f build/Dockerfile . succeeds.
    • docker image inspect shows Entrypoint=null Cmd=["/bin/sh"], so there's still no ENTRYPOINT.
    • docker run <image> /caterpillar -conf test/pipelines/hello_name.yaml prints the greetings and exits 0.
    • file /caterpillar reports ELF 64-bit LSB executable, ARM aarch64 ... interpreter /lib/ld-musl-aarch64.so.1.
  • Not verified locally: the linux/amd64 image. This Mac can't build x86-64 natively.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation and I have updated the documentation accordingly.
  • I have added tests to cover my changes.

🤖 Generated with Claude Code

go.mod requires go >= 1.25.0 and the golang images set GOTOOLCHAIN=local, so the golang:1.24.7-alpine builder failed at go build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 21, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Comment thread build/Dockerfile Outdated
@@ -1,4 +1,4 @@
FROM golang:1.24.7-alpine AS builder
FROM golang:1.25-alpine AS builder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

1.25 has already reached EOL, lets consider migrating to 1.27

Go 1.25 is out of support (go.dev lists 1.27 and 1.26). go.mod keeps
go 1.25.0 as the minimum language version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shashank-iitbhu Shashank Mittal (shashank-iitbhu) changed the title fix(build): build with Go 1.25 fix(build): build with Go 1.27 Oct 22, 2026
Comment thread README.md Outdated
### Prerequisites

- Go 1.24.7 or later
- Go 1.25 or later (the version in `go.mod`)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we want to update this as well? 1.27?

Go 1.25 is out of support; go.dev lists 1.27 and 1.26 as the supported
releases. Raise the go directive from 1.25.0 to 1.27.0 so every build
(local, CI, Docker) uses a supported toolchain, matching the Dockerfile's
golang:1.27-alpine builder.

go mod tidy with go1.27.3 merges the third require block into the usual
direct and indirect blocks. The required modules, versions and indirect
markers are unchanged, and go.sum is untouched. No toolchain line is
added: go 1.27.0 already selects any 1.27.x, and a toolchain line would
force a specific patch download wherever GOTOOLCHAIN=auto.

README's Go prerequisite now says 1.27.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shashank-iitbhu Shashank Mittal (shashank-iitbhu) changed the title fix(build): build with Go 1.27 build: require Go 1.27 (go.mod, Dockerfile builder, README) Oct 22, 2026
@shashank-iitbhu
Shashank Mittal (shashank-iitbhu) merged commit 9cbea1e into main Oct 22, 2026
7 checks passed
@shashank-iitbhu
Shashank Mittal (shashank-iitbhu) deleted the fix/dockerfile-go-1.25 branch October 22, 2026 10:16
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