fix(ci): key the lint cache on the toolchain and drop the prefix fallback - #374
Merged
Conversation
staticcheck only knows t.Fatalf terminates when the testing package facts are part of the run; with a restored golangci-lint cache they are not always there, and SA5011 fires on the deref that follows. Moving it into an else branch makes the guard structural. Signed-off-by: Devin Buhl <devin@buhl.casa>
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Jul 30, 2026
…back golangci-lint caches analyzer facts, so a stale or partial entry does not just cost time: it turns staticcheck's SA5011 into a false positive on untouched code, which is what went red in the merge queue. The key now covers .mise/mise.lock, so a golangci-lint or Go bump starts fresh instead of inheriting the previous binary's facts, and restore-keys is gone so a miss starts cold instead of falling back to the newest entry under a bare prefix; that fallback is what let one bad entry outlive its own commit. With the input fixed, the test goes back to the file's own short-circuit idiom instead of the else branch added in the previous commit: it needs no rationale comment and matches the other condition assertions in the package. It also compares the status exactly rather than folding Unknown in with False, and reports every node instead of aborting on whichever the randomized map order reached first. Also in the workflow: cancelled now counts as failed in the Build Success gate. !cancelled() still runs that job when individual needs were cancelled but the run was not, so a required job that never reached a verdict could clear branch protection. And the surrounding topology and agent code the failure led through: - Eventf passed an already-formatted message as the printf format string in two places. client-go does fmt.Sprintf(note, args...), so every PoolUsageHigh warning reached operators as "pool 85%!f(MISSING)ull (warn at 80%!)(MISSING)". - AddressConflict never set ObservedGeneration, leaving a stale True indistinguishable from a current one. - One node's failed status update aborted the whole conflict pass, leaving every later node unstamped and so invisible to placement. Per-node errors are now collected and joined, as the sibling node group reconciler already does. - The node group enqueue map func swallowed its List error, dropping the event with no requeue and no trace. Signed-off-by: Devin Buhl <devin@buhl.casa>
gabrielcosi
pushed a commit
to gabrielcosi/home-ops
that referenced
this pull request
Jul 31, 2026
….11.13 ➔ 0.11.14) (#197) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts/miroir](https://github.com/home-operations/miroir) | patch | `0.11.13` → `0.11.14` | --- ### Release Notes <details> <summary>home-operations/miroir (ghcr.io/home-operations/charts/miroir)</summary> ### [`v0.11.14`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01114-2026-07-30) [Compare Source](home-operations/miroir@0.11.13...0.11.14) ##### Features - **go:** update module google.golang.org/grpc (v1.82.1 → v1.83.0) ([#​375](home-operations/miroir#375)) ([572e629](home-operations/miroir@572e629)) ##### Bug Fixes - **ci:** key the lint cache on the toolchain and drop the prefix fallback ([#​374](home-operations/miroir#374)) ([789e990](home-operations/miroir@789e990)) </details> --- ### Configuration 📅 **Schedule**: (in timezone Europe/Berlin) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4wLjAiLCJ1cGRhdGVkSW5WZXIiOiI0NC4wLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvcGF0Y2giXX0=--> Reviewed-on: https://git.xcd.dev/gabrielcosi/home-ops/pulls/197
eleboucher
pushed a commit
to eleboucher/homelab
that referenced
this pull request
Jul 31, 2026
….11.12 ➔ 0.11.15) (#1764) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts/miroir](https://github.com/home-operations/miroir) | patch | `0.11.12` → `0.11.15` | --- ### Release Notes <details> <summary>home-operations/miroir (ghcr.io/home-operations/charts/miroir)</summary> ### [`v0.11.15`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01115-2026-07-31) [Compare Source](home-operations/miroir@0.11.14...0.11.15) ##### Bug Fixes - **csi:** log retryable status codes below error level ([#​380](home-operations/miroir#380)) ([4774d21](home-operations/miroir@4774d21)) - **snapshot:** lift possibly-set barrier on failed suspend-io and sweep mid-runtime ([#​382](home-operations/miroir#382)) ([09e3aa7](home-operations/miroir@09e3aa7)) ### [`v0.11.14`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01114-2026-07-30) [Compare Source](home-operations/miroir@0.11.13...0.11.14) ##### Features - **go:** update module google.golang.org/grpc (v1.82.1 → v1.83.0) ([#​375](home-operations/miroir#375)) ([572e629](home-operations/miroir@572e629)) ##### Bug Fixes - **ci:** key the lint cache on the toolchain and drop the prefix fallback ([#​374](home-operations/miroir#374)) ([789e990](home-operations/miroir@789e990)) ### [`v0.11.13`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01113-2026-07-29) [Compare Source](home-operations/miroir@0.11.12...0.11.13) ##### Bug Fixes - **csi:** refuse to reformat a restore whose device reads blank ([#​373](home-operations/miroir#373)) ([b7ab14b](home-operations/miroir@b7ab14b)) ##### Continuous Integration - split the conformance leg and build the e2e images once ([#​371](home-operations/miroir#371)) ([3d58054](home-operations/miroir@3d58054)) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xMDEuMSIsInVwZGF0ZWRJblZlciI6IjQzLjEwMS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL3BhdGNoIl19--> Reviewed-on: https://git.erwanleboucher.dev/eleboucher/homelab/pulls/1764
doonga
pushed a commit
to greyrock-labs/home-ops
that referenced
this pull request
Jul 31, 2026
….11.13 ➔ 0.11.15) (#215) This PR contains the following updates: | Package | Update | Change | |---|---|---| | [ghcr.io/home-operations/charts/miroir](https://github.com/home-operations/miroir) | patch | `0.11.13` → `0.11.15` | --- ### Release Notes <details> <summary>home-operations/miroir (ghcr.io/home-operations/charts/miroir)</summary> ### [`v0.11.15`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01115-2026-07-31) [Compare Source](home-operations/miroir@0.11.14...0.11.15) ##### Bug Fixes - **csi:** log retryable status codes below error level ([#​380](home-operations/miroir#380)) ([4774d21](home-operations/miroir@4774d21)) - **snapshot:** lift possibly-set barrier on failed suspend-io and sweep mid-runtime ([#​382](home-operations/miroir#382)) ([09e3aa7](home-operations/miroir@09e3aa7)) ### [`v0.11.14`](https://github.com/home-operations/miroir/blob/HEAD/CHANGELOG.md#01114-2026-07-30) [Compare Source](home-operations/miroir@0.11.13...0.11.14) ##### Features - **go:** update module google.golang.org/grpc (v1.82.1 → v1.83.0) ([#​375](home-operations/miroir#375)) ([572e629](home-operations/miroir@572e629)) ##### Bug Fixes - **ci:** key the lint cache on the toolchain and drop the prefix fallback ([#​374](home-operations/miroir#374)) ([789e990](home-operations/miroir@789e990)) </details> --- ### Configuration 📅 **Schedule**: (in timezone America/New_York) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4wLjAiLCJ1cGRhdGVkSW5WZXIiOiI0NC4wLjAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbInJlbm92YXRlL2NvbnRhaW5lciIsInR5cGUvcGF0Y2giXX0=--> Reviewed-on: https://git.greyrock.io/greyrock-labs/home-ops/pulls/215
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.
Go Lintfailed intermittently on a staticcheck false positive in a test that was already correct:t.Fatalfdoes terminate, but staticcheck only knows that when thetestingpackage's facts are part of the run, and with a restored~/.cache/golangci-lintthey are not reliably there. The result is nondeterministic on byte-identical trees: on #364's branch the same restored cache key (Linux-golangci-lint-8214272e…) produced0 issuesin a 40s run (job 90625750155) and2 issuesin two 15s runs (job 90580644762, job 90653049615 — the latter blocking the merge queue).The fix is the cache, not the test
The first pass at this reshaped the assertion, which treats the symptom. The key hashes only
go.sumand.golangci.yml, so the poisoned entry survives any commit that does not touch those two files, and the bare-prefixrestore-keyshands it to every subsequent run until GitHub's 7-day eviction. A different cache state simply selects a different package to fail on, and there are several othert.Fatal-then-deref sites for it to land on.So:
.mise/mise.lock, so a golangci-lint or Go bump starts fresh instead of handing a new binary the old one's factsrestore-keysis gone: a miss must start cold rather than fall back to the newest entry under the prefix, which is what let one bad entry outlive its own commitWith the input fixed, the test goes back to the file's own
cond == nil || cond.Status != wantidiom rather than theelsebranch. Both are structurally SA5011-proof, but the short-circuit form matches the other condition assertions in the package and needs no rationale comment to survive a future cleanup pass.Also in this PR
Reviewing the surrounding code turned up four unrelated defects on the same paths.
cancelleddid not fail the merge gate (Build Success).if: !cancelled()still runs that job when individualneedswere cancelled but the run was not;needs.*.resultthen containscancelled, notfailure, soAny jobs failed?was skipped andAll jobs passed or skipped?exited 0. A required job that never reached a verdict could clear branch protection.Two
Eventfcalls passed an already-formatted message as the printf format string. client-go doesfmt.Sprintf(note, args...), so everyPoolUsageHighwarning reached operators aspool 85%!f(MISSING)ull (warn at 80%!)(MISSING)while the stored condition message was correct.AddressConflictnever setObservedGeneration, so a staleTrueon a node whose address was just edited is indistinguishable from a current one. The siblingNodeGroupReconcilersets it on both of its conditions.One node's failed status update aborted the whole conflict pass, leaving every later node unstamped and so invisible to placement. A 409 is routine here: each agent rewrites its own MiroirNode status every 60s. Per-node errors are now collected and joined, as
NodeGroupReconcileralready does.The node group enqueue map func swallowed its
Listerror, dropping the event with no requeue and no trace.Tests
Two new (
TestConflictOneBadNodeDoesNotBlockTheFleet,TestConflictConditionRecordsObservedGeneration) and three strengthened:TestConflictEventFiresOncePerFreshConflictran both passes over a byte-identical fixture, soSetStatusConditionreturned false and the!wasConflictedgate it exists to protect was never reached. It now adds a third node on the shared address, so pass 2 rewrites the peer list of an existing conflict.TestConflictSinglePassCoversAllNodescomparedcond.Status == ConditionTrueas a bool, which passes onUnknownas readily as onFalse. It now compares the status exactly, and usest.Errorfso a multi-node regression reports all three rather than whichever the randomized map order reached first.TestPoolStatsPublisherRaisesHighDataUsagedrained the event channel without inspecting the note; it now asserts the note carries the condition message verbatim.Each new assertion was checked against a reverted fix to confirm it fails.
Verified:
mise run test, andgolangci-lint runagainst a coldGOLANGCI_LINT_CACHE.#364's branch still carries the
elseform of the assertion and will want the same treatment when it comes out of draft.