ci: read the provider's drift paths from its build graph - #306
Merged
rldyourmnd merged 3 commits intoAug 31, 2026
Conversation
config/provider-derivative.yaml promises that binary_sha256 is what this tree builds, and two jobs enforce it: one decides whether the provider changed at all, the other refuses a release whose source commit no longer matches HEAD. Both asked a hand-written list of directories. That list named eight packages. `go list -deps ./cmd/garm-provider-incus-nddev` reports eighteen. internal/cachebroker and internal/queueintent are both real provider dependencies and both absent, so a change to either skipped the reproducible-build job entirely and shipped under a manifest digest that no longer described main. It is how v0.1.5-nddev.95 came to be stamped against a commit whose provider bytes main no longer produces: building the released source gives f7a76eaf, building main gives ba2df150. scripts/provider-package-directories.sh reads the set from the same graph the compiler walks, so it cannot fall behind a new import. Both jobs use it. A test file is still ignored; go.mod and go.sum still count.
v0.1.5-nddev.95 is stamped against 541be59, whose provider bytes main no longer produces: the log-injection fix that followed it changed internal/cachebroker, a real provider dependency that the old drift list did not name. Building the released source gives f7a76eaf; building main gives ba2df150, and no gate said so. This release stamps main. The drift gate in the preceding commit now reads its path set from `go list -deps`, so the next one cannot slip the same way.
TestProviderDerivativeExcludesObserverOnlyRetryReader checked that five path strings appeared somewhere in ci.yml. That passed for as long as the list named eight of the provider's eighteen packages, which is how a change to internal/cachebroker reached a release unnoticed. It now runs the same script CI runs and asserts what the boundary must contain and must not: every package the binary links, including cachebroker and queueintent, and never the observer-only providerretry. A second test holds the workflow to actually consulting it, because a boundary nothing reads classifies every change as provider=false.
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.
config/provider-derivative.yamlpromises thatbinary_sha256is what this tree builds, and two jobs enforce it — one decides whether the provider changed at all, the other refuses a release whose source commit no longer matches HEAD. Both asked a hand-written list of directories.That list named eight packages.
go list -deps ./cmd/garm-provider-incus-nddevreports eighteen. Missing, among others:Both
cachebrokerandqueueintentare real provider dependencies, so a change to either skipped the reproducible-build job entirely and shipped under a manifest digest that no longer describedmain. That is howv0.1.5-nddev.95came to be stamped against a commit whose provider bytesmainno longer produces — building the released source givesf7a76eaf…, buildingmaingivesba2df150…, and nothing said so. I found it by building the release locally before deploying it.The fix.
scripts/provider-package-directories.shreads the set from the same graph the compiler walks, so it cannot fall behind a new import. Both jobs consume it. A_test.gofile is still ignored;go.mod/go.sumstill count.The contract test was part of the problem. It asserted that five path strings appeared somewhere in ci.yml — which stayed green the whole time the list was missing ten packages. It now runs the same script and asserts the boundary itself: every package the binary links, never the observer-only
internal/providerretry. A second test holds the workflow to actually consulting it, since a boundary nothing reads classifies every change asprovider=false.v0.1.5-nddev.96stampsmain, so the deployed provider matches a manifest again.