Conversation
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
mage gobuild to a mise task
|
Link to code coverage report (posted by coverbot 🤖) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Moves
mage gobuildto 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 forversionanddocker-build.Jira ID
DT-4635
Notes for your reviewers
Gobuildturned out to be fully shell-portable, so no Go code was added;Gobuildand the helpers only it used (readSecret,getAppVersion,getAppName,getLDFlagsStringFromMap) are removed from the mage codebase.make gobuildbecomes a deprecation-warning wrapper aroundmise run build:go, matching the existingversion/docker-buildpattern.make buildandmake devspacecall the mise task directly so they don't pay that warning's delay.mise run build:godirectly instead of throughmake build.get_cgo_enabledhelper inshell/lib/bootstrap.sh, used by bothshell/cgo-enabled.shand the new task, so it computes a correct default even for callers (like the CircleCI job above) that bypass the Makefile.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.cmd/devbasevia 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