Skip to content

ci(renovate): fix the invalid go constraint and skip indirect digest updates - #2952

Merged
vmaerten merged 1 commit into
mainfrom
ci/fix-renovate-constraint-filtering
Aug 3, 2026
Merged

ci(renovate): fix the invalid go constraint and skip indirect digest updates#2952
vmaerten merged 1 commit into
mainfrom
ci/fix-renovate-constraint-filtering

Conversation

@vmaerten

@vmaerten vmaerten commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #2951. The constraintsFiltering: "strict" rule added there never took effect — #2943 still bumps the go directive after a rebase, and Renovate now reports a repository problem:

⚠️ Invalid constraint used with strict constraintsFiltering

Two cumulative causes.

The configured constraint is invalid. Before filtering, Renovate validates each configured constraint against the datasource versioning — semver for Go modules (datasource/common.ts#L248). Our "go": "1.25" has no patch component, so isValid() rejects it, Renovate logs the warning and continues, 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 %goMod key (manager/gomod/extract.ts#L89), and the go datasource compares candidate releases against that same key (releases-goproxy.ts#L350). So constraintsFiltering works with no constraint configured at all — constraints.go only 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/vtprotobuf reaches us as a digest update — an indirect dep pinned to a pseudo-version, tracked against upstream HEAD:

| github.com/planetscale/vtprotobuf | indirect | digest | 0393e58 → 8ae5a48 |

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

Notes

Digest updates on direct deps are untouched, so mvdan.cc/sh keeps tracking upstream as intended. charmbracelet/ultraviolet, indirect and digest-tracked, will now hold until bubbletea moves it.

Neither rule is a hard guarantee: a transitive bump via MVS could still raise the directive, since gomodTidy runs regardless of what Renovate proposes. Dropping gomodTidy from postUpdateOptions would be the only airtight fix, at the cost of no longer tidying automatically. Worth revisiting if this recurs.

…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.
@vmaerten
vmaerten merged commit 5ecb947 into main Aug 3, 2026
31 of 32 checks passed
@vmaerten
vmaerten deleted the ci/fix-renovate-constraint-filtering branch August 3, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant