Go Minor Version Upgrade: 1.26 → 1.27.1
Current version: 1.26 (preferred toolchain: 1.26.7)
Module compatibility floor: 1.26.0
Target version: 1.27.1 (1.27.1-azurelinux3.0)
MCR image: mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
Image digest: sha256:78388dc19e5cc1d2262ecee3f34dbc0dc0c38547223bcec0ac5a7cd1bfcb7122
Instructions for Copilot Agent
Use the acn-go-version-bump skill (.github/skills/acn-go-version-bump/SKILL.md).
Step 0 (MANDATORY): Analyze MS Go Documentation
Before making ANY code changes, read the pre-cached MS Go docs for version 1.27:
# Read pre-cached docs (fetched by copilot-setup-steps before firewall)
cat .github/ms-go-docs/README.md
cat .github/ms-go-docs/NocgoOpenSSL.md
cat .github/ms-go-docs/MigrationGuide.md
cat .github/ms-go-docs/UserGuide.md
cat .github/ms-go-docs/AdditionalFeatures.md
# Fallback if cache is missing (may fail behind firewall):
# gh api "repos/microsoft/go/contents/docs/go1.27.md?ref=microsoft/main" --jq '.content' | base64 -d
Produce a Requirements Matrix that cross-references the docs against this repo:
- Build environment: GOEXPERIMENT rules per CGO setting, build flags, GOTOOLCHAIN behavior
- Runtime: required system libraries, base image requirements, architecture limits
- Crypto/FIPS: which backend is selected, CGO requirements, API behavior changes
- Compatibility: deprecated APIs, module system changes, dependency support
Include the Requirements Matrix in your PR description.
Step 1: Execute Changes (based on your analysis)
- Update
build/images.mk: GO_IMG → mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0
- Update the preferred
toolchain in every module; raise a module's go compatibility floor only when required by source or dependencies
- Do NOT run
go mod tidy — it times out in the agent environment. Existing go.sum files are valid.
- Apply FIPS/crypto changes per your doc analysis (do NOT blindly reuse previous version's rules)
- Update all SHA references (install-go.sh, bpf-prog, npm Dockerfiles)
- Run
make dockerfiles
- Run
go build ./... and go vet ./...
Key dependency check: Verify controller-runtime, client-go, and cilium support Go 1.27
⚠️ FIPS / System Crypto Requirements
Go 1.27+ changes the system crypto story relative to 1.26. Do NOT assume the 1.26 rules still apply.
Determine from the pre-cached MS Go docs (README.md, NocgoOpenSSL.md, MigrationGuide.md) which of the following is true for 1.27, and act accordingly:
- Which crypto backend is selected by default on Linux for
CGO_ENABLED=0 and CGO_ENABLED=1
- Whether
GOEXPERIMENT=systemcrypto / ms_nocgo_opensslcrypto / nosystemcrypto are still valid values in 1.27, or whether they have been removed (setting a removed experiment is a build error)
Then:
- If the experiments still exist and are required → set the correct value in ALL Dockerfile templates, pipeline build scripts, and Makefiles per CGO setting
- If the experiments were removed in 1.27 → remove
GOEXPERIMENT=systemcrypto and GOEXPERIMENT=ms_nocgo_opensslcrypto from ALL Dockerfile templates, pipeline build scripts, and Makefiles
- Handle
MS_GO_NOSYSTEMCRYPTO=1 in the npm Dockerfiles consistently with your finding
- Ensure
MARINER_DISTROLESS_IMG in build/images.mk is distroless/base
- Update
bpf-prog/ipv6-hp-bpf/linux.Dockerfile runtime base to azurelinux/distroless/base:3.0
State your conclusion and cite the doc line(s) that support it in the PR description.
Pre-cached resources (from copilot-setup-steps.yml)
The agent firewall blocks proxy.golang.org and mcr.microsoft.com. These are pre-cached for you:
- Go 1.27 toolchain — pre-installed and on
PATH
- Module dependencies — pre-downloaded (
go build / go vet work offline)
- Target image digests —
.github/image-digests/go-next-minor.txt, .github/image-digests/go-next-patch-debian.txt
- MS Go docs —
.github/ms-go-docs/
If a command fails due to a network/DNS block, do NOT silently give up and open an empty PR — report the blocker in the PR description.
Before you commit
Audit the working tree for build artifacts. go build can drop ELF binaries into module directories; these must NOT be committed:
Known offenders: azure-ip-masq-merger/azure-ip-masq-merger, azure-iptables-monitor/azure-iptables-monitor, cilium-log-collector/cilium-log-collector, tools/azure-npm-to-cilium-validator/azure-npm-to-cilium-validator.
Also verify your branch is non-empty before updating the PR description:
git diff --quiet master...HEAD && echo "ERROR: branch has no changes"
Acceptance Criteria
Backport to release/v1.7
After the master PR is complete, create a second PR targeting release/v1.7:
- Check out
release/v1.7
- Apply the same Go version + SHA changes
- If
release/v1.7 is missing prerequisites (based on your analysis), add those too
- Run
make dockerfiles and go mod tidy on that branch
- Title:
chore(release/v1.7): upgrade Go 1.26 → 1.27.1
- Verify
go build ./... passes on release branch
Note: The release branch may have different dependency versions than master.
Run go mod tidy separately and resolve any conflicts specific to that branch.
Go Minor Version Upgrade: 1.26 → 1.27.1
Current version:
1.26(preferred toolchain:1.26.7)Module compatibility floor:
1.26.0Target version:
1.27.1(1.27.1-azurelinux3.0)MCR image:
mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0Image digest:
sha256:78388dc19e5cc1d2262ecee3f34dbc0dc0c38547223bcec0ac5a7cd1bfcb7122Instructions for Copilot Agent
Use the
acn-go-version-bumpskill (.github/skills/acn-go-version-bump/SKILL.md).Step 0 (MANDATORY): Analyze MS Go Documentation
Before making ANY code changes, read the pre-cached MS Go docs for version 1.27:
Produce a Requirements Matrix that cross-references the docs against this repo:
Include the Requirements Matrix in your PR description.
Step 1: Execute Changes (based on your analysis)
build/images.mk:GO_IMG→mcr.microsoft.com/oss/go/microsoft/golang:1.27-azurelinux3.0toolchainin every module; raise a module'sgocompatibility floor only when required by source or dependenciesgo mod tidy— it times out in the agent environment. Existing go.sum files are valid.make dockerfilesgo build ./...andgo vet ./...Key dependency check: Verify controller-runtime, client-go, and cilium support Go 1.27
Go 1.27+ changes the system crypto story relative to 1.26. Do NOT assume the 1.26 rules still apply.
Determine from the pre-cached MS Go docs (
README.md,NocgoOpenSSL.md,MigrationGuide.md) which of the following is true for 1.27, and act accordingly:CGO_ENABLED=0andCGO_ENABLED=1GOEXPERIMENT=systemcrypto/ms_nocgo_opensslcrypto/nosystemcryptoare still valid values in 1.27, or whether they have been removed (setting a removed experiment is a build error)Then:
GOEXPERIMENT=systemcryptoandGOEXPERIMENT=ms_nocgo_opensslcryptofrom ALL Dockerfile templates, pipeline build scripts, and MakefilesMS_GO_NOSYSTEMCRYPTO=1in the npm Dockerfiles consistently with your findingMARINER_DISTROLESS_IMGinbuild/images.mkisdistroless/basebpf-prog/ipv6-hp-bpf/linux.Dockerfileruntime base toazurelinux/distroless/base:3.0State your conclusion and cite the doc line(s) that support it in the PR description.
Pre-cached resources (from
copilot-setup-steps.yml)The agent firewall blocks
proxy.golang.organdmcr.microsoft.com. These are pre-cached for you:PATHgo build/go vetwork offline).github/image-digests/go-next-minor.txt,.github/image-digests/go-next-patch-debian.txt.github/ms-go-docs/If a command fails due to a network/DNS block, do NOT silently give up and open an empty PR — report the blocker in the PR description.
Before you commit
Audit the working tree for build artifacts.
go buildcan drop ELF binaries into module directories; these must NOT be committed:Known offenders:
azure-ip-masq-merger/azure-ip-masq-merger,azure-iptables-monitor/azure-iptables-monitor,cilium-log-collector/cilium-log-collector,tools/azure-npm-to-cilium-validator/azure-npm-to-cilium-validator.Also verify your branch is non-empty before updating the PR description:
Acceptance Criteria
tools.go.mod)go build ./...passesmake dockerfilesoutput matches committed filesreplacedirectives (unless necessary and explained)release/v1.7Backport to
release/v1.7After the master PR is complete, create a second PR targeting
release/v1.7:release/v1.7release/v1.7is missing prerequisites (based on your analysis), add those toomake dockerfilesandgo mod tidyon that branchchore(release/v1.7): upgrade Go 1.26 → 1.27.1go build ./...passes on release branch