Update Go to 1.26.4 and bump golang.org/x/crypto and golang.org/x/net#8651
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Consolidate the repo-wide Go version sync logic into a single 'mage updateGoVersion <version>' target, removing the duplicated PowerShell and bash scripts that could drift apart. Repoint the validate-go-version workflow hint and document the target in AGENTS.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Address PR review feedback: require a bare X.Y.Z version in the mage updateGoVersion target to guard against typos, and embed 'cd cli/azd' in the validate-go-version error hint so it can be pasted directly from the CI log. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
📋 Prioritization NoteThanks for the contribution! The linked issue isn't in the current milestone yet. |
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s pinned Go toolchain version and related dependency pins, and moves the Go-version sync logic to a cross-platform Mage target (replacing the removed PowerShell helper). This keeps validate-go-version aligned with the canonical Go version in cli/azd/go.mod and reduces drift across modules, CI templates, Dockerfiles, and devcontainer configuration.
Changes:
- Bump the pinned Go version from 1.26.1 → 1.26.4 across
cli/azd/**/go.mod, the sample Dockerfile, ADOsetup-go.yml, and the devcontainer Go feature. - Update
golang.org/xdependencies incli/azd/go.mod/go.sum(including required transitive bumps). - Replace the version-sync script with
mage updateGoVersion <version>and update workflow/documentation guidance accordingly.
Reviewed changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| eng/scripts/Update-GoVersion.ps1 | Removes the legacy PowerShell-only Go-version sync script in favor of the Mage target. |
| eng/pipelines/templates/steps/setup-go.yml | Updates the ADO pipeline GoVersion parameter to 1.26.4. |
| cli/azd/test/functional/testdata/samples/containerappjob/src/job/go.mod | Updates the sample module’s go directive to 1.26.4. |
| cli/azd/test/functional/testdata/samples/containerappjob/src/job/Dockerfile | Updates the sample golang: base image tag to 1.26.4. |
| cli/azd/magefile.go | Adds UpdateGoVersion Mage target to sync pinned Go versions across all enforced locations. |
| cli/azd/go.sum | Updates checksums for bumped golang.org/x/* dependencies and transitive requirements. |
| cli/azd/go.mod | Bumps Go version and updates golang.org/x/crypto, golang.org/x/net, and related indirect pins. |
| cli/azd/extensions/microsoft.azd.concurx/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.coding-agent/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.appservice/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.training/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.toolboxes/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.skills/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.routines/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.projects/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.models/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.inspector/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.finetune/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.connections/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/extensions/azure.ai.agents/go.mod | Updates extension go directive to 1.26.4. |
| cli/azd/AGENTS.md | Documents mage updateGoVersion <version> as the single source of truth for version syncing. |
| .github/workflows/validate-go-version.yml | Updates remediation hint to use cd cli/azd && mage updateGoVersion $EXPECTED. |
| .devcontainer/devcontainer.json | Updates devcontainer Go feature version to 1.26.4. |
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
|
/check-enforcer override |
Reopen for #8630
Fixes #8595
This PR updates the pinned Go toolchain and the two
golang.org/xdependencies flagged as out of date in the linked issue.golang.org/x/cryptogolang.org/x/netThe Go bump is applied everywhere the version is pinned so the
validate-go-versioncheck stays green: everycli/azdgo.mod(core, extensions, and testdata samples), the ADOsetup-gotemplate, the containerappjobDockerfile, and the devcontainer Go feature. Thecrypto/netbumps also pull in their required minimum transitive versions (x/sync,x/sys,x/term,x/text) viago mod tidy.While here, the version-sync logic is consolidated into a single
mage updateGoVersion <version>target (run fromcli/azd), replacing the PowerShell-onlyUpdate-GoVersion.ps1. A single Go target avoids the cross-platform script duplication problem, works without PowerShell, and is the one place to maintain when new pinned locations are added. Thevalidate-go-versionworkflow hint andcli/azd/AGENTS.mdnow point at the target.