chore: bump Go 1.26.0 to 1.26.1 and add version management tooling#7488
chore: bump Go 1.26.0 to 1.26.1 and add version management tooling#7488
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the go version directive from 1.26.0 to 1.26.1 to align Go versioning across the azd core module and several first-party extension modules.
Changes:
- Bump
cli/azd/go.modgodirective to1.26.1 - Bump
godirectives to1.26.1across six extension modules undercli/azd/extensions/
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| cli/azd/go.mod | Updates azd core module Go version directive to 1.26.1 |
| cli/azd/extensions/azure.ai.agents/go.mod | Aligns extension module Go version directive to 1.26.1 |
| cli/azd/extensions/azure.ai.finetune/go.mod | Aligns extension module Go version directive to 1.26.1 |
| cli/azd/extensions/azure.ai.models/go.mod | Aligns extension module Go version directive to 1.26.1 |
| cli/azd/extensions/azure.appservice/go.mod | Aligns extension module Go version directive to 1.26.1 |
| cli/azd/extensions/azure.coding-agent/go.mod | Aligns extension module Go version directive to 1.26.1 |
| cli/azd/extensions/microsoft.azd.concurx/go.mod | Aligns extension module Go version directive to 1.26.1 |
Update go directive in all 7 go.mod files to align with Go 1.26.1. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update setup-go.yml default GoVersion from 1.26.0 to 1.26.1 - Update CONTRIBUTING.md prerequisite to specify Go 1.26.1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add eng/scripts/Update-GoVersion.ps1 bump script that updates all go.mod files and the ADO pipeline template in one command - Add validate-go-version.yml CI workflow that checks all go.mod files and the ADO template use the same Go version (source of truth: cli/azd/go.mod) - Switch GitHub Actions workflows from hardcoded go-version to go-version-file reading from cli/azd/go.mod (single source of truth) To bump Go version in the future: pwsh eng/scripts/Update-GoVersion.ps1 -NewVersion 1.27.0 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Bump testdata containerappjob go.mod (1.23 -> 1.26.1) and Dockerfile - Remove testdata exclusion from Update-GoVersion.ps1 - Add Dockerfile golang:<version> updates to bump script - Add Dockerfile validation to CI workflow Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
781aa41 to
1e7230a
Compare
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
vhvb1989
left a comment
There was a problem hiding this comment.
update devcontainer too
https://github.com/Azure/azure-dev/blob/main/.devcontainer/devcontainer.json
nit. Use this PR to create a SKILL to bump go version in all the expected places
Summary
Bumps Go from 1.26.0 to 1.26.1 across all modules and adds tooling to prevent version drift in the future.
Go version bump
Updates the
godirective in all go.mod files and the ADO pipeline template:cli/azd/go.modcli/azd/extensions/azure.ai.agents/go.modcli/azd/extensions/azure.ai.finetune/go.modcli/azd/extensions/azure.ai.models/go.modcli/azd/extensions/azure.appservice/go.modcli/azd/extensions/azure.coding-agent/go.modcli/azd/extensions/microsoft.azd.concurx/go.modcli/azd/test/functional/testdata/samples/containerappjob/src/job/go.mod(was at 1.23)cli/azd/test/functional/testdata/samples/containerappjob/src/job/Dockerfile(golang:1.23 -> 1.26.1)eng/pipelines/templates/steps/setup-go.yml(GoVersion default)cli/azd/CONTRIBUTING.md(prereqs section)Version management tooling (new)
Previously, bumping Go required manually finding and editing 10+ files. Now:
Bump script -
eng/scripts/Update-GoVersion.ps1Updates all go.mod files, Dockerfiles with
golang:<version>base images, and the ADO pipeline template in one command.CI validation -
.github/workflows/validate-go-version.ymlRuns on PRs touching
**/go.mod,**/Dockerfile, oreng/pipelines/templates/steps/setup-go.yml. Checks all go.mod files, Dockerfiles, and the ADO template match the source of truth (cli/azd/go.mod). Fails with actionable error messages showing the fix command.Single source of truth - GitHub Actions workflows now use
go-version-file: cli/azd/go.modinstead of hardcoded"^1.26". Changed workflows:.github/workflows/lint-go.yml- reusable workflow input changed fromgo-versiontogo-version-file.github/workflows/ext-registry-ci.yml.github/workflows/copilot-setup-steps.ymlContext
PR #7400 (microsoft.azd.exec extension) already targets Go 1.26.1. This PR aligns the rest of the project.