Skip to content

fix: match golang depType in Renovate preset for go directive updates#416

Open
marcusburghardt wants to merge 1 commit into
complytime:mainfrom
marcusburghardt:fix/renovate-match-golang-deptype
Open

fix: match golang depType in Renovate preset for go directive updates#416
marcusburghardt wants to merge 1 commit into
complytime:mainfrom
marcusburghardt:fix/renovate-match-golang-deptype

Conversation

@marcusburghardt

Copy link
Copy Markdown
Member

Summary

The go-toolchain-patches.json Renovate preset only matched depType: "toolchain", which targets the toolchain directive in go.mod. None of the org repositories include that directive — they only use the go directive (e.g., go 1.26.0), which Renovate classifies as depType: "golang".

This caused Renovate to report all repos as "up to date" with zero PRs created, since the re-enable rule never fired and all gomod deps remained disabled by the first catch-all rule.

This PR adds "golang" alongside "toolchain" in matchDepTypes for both the re-enable and suppress rules, so Renovate will:

  • Create patch-bump PRs for the go directive (current repos)
  • Remain forward-compatible with repos that add a toolchain directive in the future

Related Issues

  • Identified from Renovate run #14

Review Hints

  • Single file change in go-toolchain-patches.json — two matchDepTypes arrays updated from ["toolchain"] to ["golang", "toolchain"], plus description text clarifications.

  • The renovate-report artifact from run ci(deps): Bump actions/setup-python from 5.3.0 to 6.0.0 #14 confirms all Go version deps are depType: "golang" with skipReason: "disabled", and no depType: "toolchain" exists in any repo.

  • To validate, trigger a dry-run of the Renovate workflow after merge and confirm PRs are proposed for repos with outdated Go patch versions.

The go-toolchain-patches.json preset only matched depType 'toolchain',
which targets the 'toolchain' directive in go.mod. None of the org
repositories include that directive — they only use the 'go' directive,
which Renovate classifies as depType 'golang'.

Add 'golang' alongside 'toolchain' in matchDepTypes for both the
re-enable and suppress rules so Renovate creates patch-bump PRs for
the go directive while remaining forward-compatible with repos that
add a toolchain directive in the future.

Assisted-by: OpenCode (claude-opus-4-6)
Signed-off-by: Marcus Burghardt <maburgha@redhat.com>
@marcusburghardt marcusburghardt requested a review from a team as a code owner July 13, 2026 12:32
@marcusburghardt marcusburghardt enabled auto-merge (rebase) July 13, 2026 12:33

@trevor-vaughan trevor-vaughan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LLM Assisted Review

I would recommend fixing the following so that we don't run into the same issue later before closing out this PR.

Code Review — PR #416

The code change is correct. Adding "golang" alongside "toolchain" in both matchDepTypes arrays fixes the silent no-op and maintains the patch-only invariant through rule ordering. The ci_renovate.yml jq filter (line 98) already references depType == "golang", confirming this was the intended depType all along.

No correctness bugs found. Seven documentation consistency findings below.


Finding 1 — docs/RENOVATE_GO_TOOLCHAIN.md:110 (medium)

The manual testing command still uses matchDepTypes:["toolchain"]. A developer copy-pasting it will reproduce the exact silent failure this PR fixes — zero matches, zero PRs, "everything up to date."

Finding 2 — go-toolchain-patches.json:3 (medium)

The top-level description field still says "Go toolchain patch updates only" but the preset now covers both golang and toolchain depTypes. The internal rule descriptions were updated; this one was missed.

Findings 3–5 — docs/RENOVATE_GO_TOOLCHAIN.md lines 37, 46, 192 (low)

Several prose sections describe the preset as "toolchain patches only" or "restricting to toolchain patches." These become inaccurate after this change.

Finding 6 — AGENTS.md:69 (low)

The "Recent Changes" entry states the preset "restricts to gomod toolchain patches only." This text is loaded into AI agent system prompts as project context, so it will actively misinform automated tooling about the preset's scope. The same text appears in CLAUDE.md:38.

Finding 7 — altitude observation

Both go and toolchain directives share depName: "go" in Renovate. Using matchDepNames: ["go"] instead of matchDepTypes: ["golang", "toolchain"] would cover both without enumeration — simpler, and it would have prevented the original bug. The Renovate gomod docs show matchDepNames: ["go"] in their own examples. Worth considering as a follow-up to avoid repeating this class of error if Renovate introduces new depTypes (e.g., tool for Go 1.24+).

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.

2 participants