| name | go-upgrade |
| description | Upgrade macOS Go and all module dependencies in TFx via task go:upgrade, then verify build and tests. Use when the user asks to upgrade Go, update dependencies, bump go.mod, or refresh packages. |
| disable-model-invocation | true |
Go Upgrade
Upgrade the local Go toolchain and all module dependencies, then verify the repo still builds and tests pass.
Prerequisites
- macOS with Homebrew
- Run from repo root
- If tools may be missing:
task development:doctor (install with brew install go goreleaser go-task)
Upgrade
Run the Taskfile task (see DEVELOPMENT.md § Upgrading Dependencies):
task go:upgrade
This upgrades go and goreleaser via Homebrew, syncs go.mod to the installed Go version, runs go get -u ./..., go mod tidy, and updates the README Go version badge.
Files touched: go.mod, go.sum, README.md (badge only), CHANGELOG.md. CI reads Go version from go.mod via go-version-file.
If brew upgrade go reports already latest, the task still refreshes module dependencies.
Verify
Match CI (.github/workflows/build.yml):
go build ./...
go test ./...
Some client/ tests call the TFE API — run with network access if the sandbox blocks them.
On failure: diagnose and fix compile or test issues from breaking dependency bumps. Do not downgrade Go without asking the user.
Optional smoke check:
task go:build && ./tfx version
Integration tests are out of scope unless requested (secrets/.env-int required):
task test:integration-data
task test:integration-cmd
Changelog
Update CHANGELOG.md after a successful upgrade. This repo uses Keep a Changelog with unreleased sections titled ## [vX.Y.Z] - Unreleased (not a bare [Unreleased] heading).
-
Read the top of CHANGELOG.md and look for a section matching ## [vX.Y.Z] - Unreleased.
-
If it exists: add a bullet under Changed (create a **Changed** subsection if missing):
* Upgraded Go to X.Y.Z and refreshed module dependencies
Replace X.Y.Z with the version from go version. Do not duplicate the entry if an equivalent bullet is already present.
-
If it does not exist: insert a new unreleased section immediately after the Keep a Changelog intro (before the first dated release). Derive the version label from the latest git tag:
git describe --tags --abbrev=0 --match "v[0-9]*.[0-9]*.[0-9]*"
Bump the patch segment (e.g. v0.3.3 → v0.3.4) and add:
## [v0.3.4] - Unreleased
**Changed**
* Upgraded Go to X.Y.Z and refreshed module dependencies
Report
- Show
git diff --stat for go.mod, go.sum, README.md, and CHANGELOG.md
- Draft commit message (do not commit unless asked):
chore: upgrade Go to X.Y.Z and refresh module dependencies
Replace X.Y.Z with the version from go version.
Default: stop before git
Do not create a branch, commit, or open a PR unless the user explicitly asks.
Optional: branch, commit, and PR
When the user asks to commit and/or open a PR (e.g. "upgrade go and open a PR"):
- Create branch:
git checkout -b chore/go-upgrade-<version>
- Stage only:
go.mod, go.sum, README.md, CHANGELOG.md
- Commit with HEREDOC message (use draft above)
- Push:
git push -u origin HEAD
- Open PR:
gh pr create with Summary and Test plan (note local go build ./... and go test ./... passed)
Do not push or commit unless explicitly requested.