ci(renovate): fix the invalid go constraint and skip indirect digest updates - #2952
Merged
Conversation
…pdates The constraintsFiltering rule from #2951 never took effect, for two cumulative reasons. First, Renovate validates every configured constraint against the datasource versioning (semver for Go modules) before filtering. Our `go: "1.25"` has no patch component, so isValid() rejects it, Renovate logs 'Invalid constraint used with strict constraintsFiltering' as a repository problem, and skips filtering entirely. Aligning the value on the go.mod directive fixes that. Note the constraint was never the one doing the filtering anyway: the gomod manager already extracts the go directive itself under the reserved '%goMod' key, which is what the go datasource compares releases against. The setting keeps its other role, picking the Go binary Renovate runs. Second, filtering only ever sees releases. github.com/planetscale/ vtprotobuf reaches us as a digest update - an indirect dep pinned to a pseudo-version, tracked against upstream HEAD - so no constraint metadata is available to filter on. Stop chasing HEAD for indirect deps; they move when the direct dep pulling them in moves.
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.
Summary
Follow-up to #2951. The
constraintsFiltering: "strict"rule added there never took effect — #2943 still bumps thegodirective after a rebase, and Renovate now reports a repository problem:Two cumulative causes.
The configured constraint is invalid. Before filtering, Renovate validates each configured constraint against the datasource versioning —
semverfor Go modules (datasource/common.ts#L248). Our"go": "1.25"has no patch component, soisValid()rejects it, Renovate logs the warning andcontinues, skipping filtering altogether. Aligning the value on the go.mod directive fixes it.Worth noting: that constraint was never the one doing the filtering. The gomod manager already extracts the directive itself under the reserved
%goModkey (manager/gomod/extract.ts#L89), and the go datasource compares candidate releases against that same key (releases-goproxy.ts#L350). SoconstraintsFilteringworks with no constraint configured at all —constraints.goonly ever governed which Go binary Renovate runs, which is why it is corrected here rather than removed.Filtering only ever sees releases.
github.com/planetscale/vtprotobufreaches us as adigestupdate — an indirect dep pinned to a pseudo-version, tracked against upstream HEAD:There is no release metadata to inspect, so no constraint-based mechanism can ever intercept it. Hence the second rule: stop chasing upstream HEAD for indirect deps. They still move whenever the direct dep pulling them in moves.
Test plan
renovate.jsonparsesgo.modstays atgo 1.25.10Notes
Digest updates on direct deps are untouched, so
mvdan.cc/shkeeps tracking upstream as intended.charmbracelet/ultraviolet, indirect and digest-tracked, will now hold untilbubbleteamoves it.Neither rule is a hard guarantee: a transitive bump via MVS could still raise the directive, since
gomodTidyruns regardless of what Renovate proposes. DroppinggomodTidyfrompostUpdateOptionswould be the only airtight fix, at the cost of no longer tidying automatically. Worth revisiting if this recurs.