Skip to content

feat: migrate mage gobuild to a mise task - #1223

Draft
malept wants to merge 3 commits into
mainfrom
malept-claude/nice-clarke-monr0l
Draft

malept wants to merge 3 commits into
mainfrom
malept-claude/nice-clarke-monr0l

Conversation

@malept

@malept malept commented Sep 30, 2026 •

Copy link
Copy Markdown
Member

What this PR does / why we need it

Moves mage gobuild to a mise task so that building a service's binary no longer depends on mage. This is part of retiring mage in favor of mise tasks, continuing the same migration already done for version and docker-build.

Jira ID

DT-4635

Notes for your reviewers

  • Gobuild turned out to be fully shell-portable, so no Go code was added; Gobuild and the helpers only it used (readSecret, getAppVersion, getAppName, getLDFlagsStringFromMap) are removed from the mage codebase.
  • make gobuild becomes a deprecation-warning wrapper around mise run build:go, matching the existing version/docker-build pattern. make build and make devspace call the mise task directly so they don't pay that warning's delay.
  • The CircleCI cache-warming job now calls mise run build:go directly instead of through make build.
  • CGO_ENABLED detection is deduplicated into a new get_cgo_enabled helper in shell/lib/bootstrap.sh, used by both shell/cgo-enabled.sh and the new task, so it computes a correct default even for callers (like the CircleCI job above) that bypass the Makefile.
  • Secret reads (honeycomb/apiKey, telefork/api-keys/default) are best-effort, matching the old mage behavior: a warning is logged and the build continues if either is missing.
  • Manually verified end-to-end in a container matching CI's image: built cmd/devbase via the new task, ran the resulting binary, and confirmed the embedded version/ldflags are correct with no stray output leaking into them.

🤖 Generated with Claude Code

https://claude.ai/code/session_014x7tHL2QpGrPgZDfzLKXyp

Move mage's `Gobuild` target to a new mise task, `.mise/tasks/build/go`,
as plain shell backed by shell/lib helpers (get_app_version,
get_cgo_enabled, read_local_secret, get_box_field) -- the same pattern
already used for the `version` and `docker-build` migrations. No Go
code was needed for this migration, so `Gobuild` and the helpers only
it used (readSecret, getAppVersion, getAppName,
getLDFlagsStringFromMap) are removed from the mage codebase.

`make gobuild` becomes a deprecation-warning wrapper around
`mise run build:go`, matching the existing version/docker-build
pattern; `make build` and `make devspace` call the mise task directly
so they don't pay that warning's delay. The CircleCI cache-warming job
now calls `mise run build:go` directly instead of through `make build`.

CGO_ENABLED detection is deduplicated into a new
shell/lib/bootstrap.sh helper, get_cgo_enabled, used by both
shell/cgo-enabled.sh and the new task.

Refs: DT-4635

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014x7tHL2QpGrPgZDfzLKXyp
Match the convention used by other executable shell entrypoints
(e.g. .mise/tasks/stencil/post/circleci-orb-sync) by sourcing
shell/lib/shell.sh and calling ensure_bash_5_or_greater before running
any logic.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014x7tHL2QpGrPgZDfzLKXyp
@malept malept changed the title refactor: migrate Go build from Mage to mise task feat: migrate mage gobuild to a mise task Sep 30, 2026
@malept malept changed the title feat: migrate mage gobuild to a mise task feat: migrate mage gobuild to a mise task Sep 30, 2026
@getoutreach-ci-2

Copy link
Copy Markdown

Link to code coverage report (posted by coverbot 🤖)

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.

2 participants