Repository navigation
🔧 chore(dev): pin the local dev toolchain with mise - #348
Merged
Merged
Conversation
Add a committed mise.toml at the repository root so a contributor's local toolchain matches the versions CI actually installs. Go is deliberately NOT listed under [tools]: idiomatic_version_file_enable_tools makes mise read the version straight out of go.mod, which is exactly what .github/actions/go-cache/action.yml does via actions/setup-go's go-version-file. Restating the number here would drift on the next Go bump. task (3.51.1), node (22) and python (3.12) mirror the setup-task, setup-node and setup-python pins in .github/workflows/. The Makefile-managed Go tools (kustomize, controller-gen, setup-envtest, operator-sdk, golangci-lint) and the hack/install-*.sh tools are deliberately absent: they already have exactly one source of truth each, and duplicating them here would create a second one. Documented in docs/development/setup.md, which states that CI remains the source of truth for every version.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
The mise.toml literals had no mechanism binding them to CI. renovate.json's own comment records that failure mode -- "they land in different groups and drift apart -- which is exactly how release.yaml reached v3.21.4 while CI stayed on v3.17.3" -- and two live vectors applied here: Renovate's go-task customManager scans only .github/(actions|workflows)/, so a setup-task bump would leave mise.toml behind; and no manager at all touches the node-version/python-version inputs while Renovate's mise manager does understand core node/python, so mise.toml could equally run AHEAD of CI. Add hack/test/dev_mise_pin_drift_test.sh: it compares mise.toml's task/node/ python against every setup-task/setup-node/setup-python pin under .github/ (workflows and composite actions, so CI disagreeing with itself also reds), and locks the Go arrangement -- go absent from [tools], the idiomatic setting present, go.mod still carrying a go line. A go entry under [tools] would win over go.mod and reintroduce the drift the design removed. Every extraction is guarded against finding nothing; an empty scan set is a hard failure, not a quiet pass. The self-test proves both directions on throwaway trees each run, including that each vacuity guard fires. Wired into the ci.yaml lint job next to the sibling meta-tests, and the gate asserts its own wiring so dropping the step reds rather than silently disarming. renovate.json now moves the mise.toml task pin in the same PR as the workflow bump (same file-pattern manager, same depName, so the existing 'pinned build tools' group covers both) and disables Renovate's mise manager so this file can never be bumped ahead of CI independently. The gate is the fail-closed backstop if any of that stops matching. Also ignore mise.local.toml / .mise.local.toml -- mise's personal-override files and the natural place a contributor would put an [env] block next to .envrc -- and correct the mise.toml comment attributing the git-cliff and helm-docs pins: those live in Taskfile.yml vars, not in the hack/install-*.sh scripts, which take the version as an argument.
Renovate compiles matchStrings against whole-file content without the multiline flag, so `^`/`$` anchor to the start and end of the file, not of a line -- the pattern matched nothing. Every sibling manager in this config establishes context with literal \n instead of anchors; follow that. Verified against the real mise.toml content: the anchored form returns NO MATCH, the newline-anchored form captures 3.51.1, and `task = "` appears nowhere else in the files this manager scans, so there is nothing for it to collide with.
|
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
Adds a committed
mise.tomlat the repository root so a contributor's local toolchain matchesthe versions CI actually installs, plus a short section in
docs/development/setup.md.Traceability — every pin maps to a real pin in this repo
[tools]— read fromgo.modviaidiomatic_version_file_enable_tools = ["go"]go.mod:3(go 1.26.6), consumed by.github/actions/go-cache/action.yml:16-18(go-version-file: go.mod), which every Go job inci.yamluses — including the requiredtestandkind-smokechecks.release.yaml:146/docs.yaml:114usego-version-file: go.moddirectly.3.51.1go-task/setup-taskversion: 3.51.1— all 17 occurrences acrossci.yaml,docs.yaml,preflight.yaml,changelog-sync.yaml,sonarcloud.yaml,e2e-nightly.yamlagree.22node-version: "22"—docs.yaml:106andpreflight.yaml:37.3.12python-version: "3.12"—docs.yaml:118.Go is deliberately not restated as a literal. mise reads
go.moddirectly, so the twostructurally cannot drift — the same mechanism CI uses. If a future mise ignored that setting,
Go simply becomes unmanaged by mise; it can never become mis-pinned.
Deliberately excluded
No second source of truth is created for anything that already has one:
bin/:kustomize(v5.8.1),controller-gen(v0.20.1),operator-sdk(v1.42.3),golangci-lint(v2.11.4), and the computedENVTEST_VERSION.hack/install-*.sh/ Taskfile-fetched:shellcheck,helm(v3.21.4),helm-docs(v1.14.2),git-cliff(v2.13.1),gitleaks,polaris,kubeaudit.kind— pinned inhack/kind/common.sh(KIND_VERSION).Notes
mise.tomlsets no environment variables, so it cannot conflict with the existingdirenv.envrcsetup..envrcwas not read, modified or committed.mise trustis required for the config (including its[settings]block) to apply at all —documented.
mise.tomlis not matched by.gitignoreand is not in the CIpaths-ignorelist, so this PRtriggers CI and the required
test/kind-smokechecks report.