ci: teach Renovate to bump the Dockerfile ARG PNPM_VERSION - #128
Conversation
Renovate already bumps pnpm in package.json's packageManager field and in the pnpm/action-setup version inputs across the workflows, but the Dockerfile's ARG PNPM_VERSION was invisible to it — PR #125 moved everything to 11.12.0 while the ARG stayed 11.1.2, exactly the drift the Dockerfile comment warns about. Docker builds then bootstrap an old pnpm that self-switches to the packageManager version at build time (non-hermetic, and it crashed outright on the broken pnpm@11.12.0). Add a customManagers regex entry that treats the ARG as the npm `pnpm` package. No packageRules change needed: the existing "all non-major" group has no manager filter, so the ARG bump lands in the same single grouped PR, and major bumps park on the Dependency Dashboard like the rest. The regex requires the literal `=` so the value-less ARG redeclaration inside the build stage is not matched. Verified: regex extraction against the current Dockerfile (one match, currentValue=11.1.2), renovate-config-validator --strict, Biome on renovate.json. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Dry-run verification — triggered the Renovate workflow via Run: https://github.com/privacykey/privacytracker/actions/runs/29712772410 1. The custom manager extracts the ARGManager stats now include the 2. The dep resolves and lands in the grouped branchpnpm 3. The Dockerfile is in the would-commit file listThe raw commit info for that branch (which is open PR #125) lists Notes
🤖 Generated with Claude Code |
Summary
Renovate bumps pnpm in
package.json'spackageManagerfield and in thepnpm/action-setupversion:inputs across the workflows, but the Dockerfile'sARG PNPM_VERSIONwas invisible to it. PR #125 showed the resulting drift: everything moved to 11.12.0 while the ARG stayed 11.1.2 — exactly what the Dockerfile's own lockstep comment warns about. Docker builds then bootstrap an old pnpm which self-switches to thepackageManagerversion at build time (non-hermetic, and it crashed outright when the target was the broken pnpm@11.12.0 release).This adds a
customManagersregex entry torenovate.jsonthat treats the ARG as the npmpnpmpackage:managerFilePatterns: ["/^Dockerfile$/"],matchStrings: ["ARG PNPM_VERSION=(?<currentValue>.*)"],datasource=npm,packageName=pnpm,versioning=npm(same semantics as thepackageManagerbump).packageRuleschange needed: the existing "all non-major dependencies" group has no manager/datasource filter, so the ARG bump lands in the same single grouped non-major PR on the stable branch, and a major pnpm bump parks on the Dependency Dashboard like everything else.=, so the value-lessARG PNPM_VERSIONstage redeclaration on line 18 is not matched.Also updates the Dockerfile lockstep comment and the AGENTS.md Renovate section to note the ARG is now automated.
Verification
currentValue = "11.1.2"; the value-less redeclaration doesn't match;/^Dockerfile$/matches the root Dockerfile only.renovate-config-validator --strict renovate.json(renovate v46 generation, matching the pinnedrenovatebot/github-actionv46.1.18): validated successfully, no deprecation warnings (uses the currentmanagerFilePatternsfield, not the deprecatedfileMatch).pnpm exec biome check renovate.json: clean. (The repo-widepnpm lintchecks 0 files from inside a.claude/worktrees/checkout becausebiome.jsoncexcludes**/.claude— worktree artifact, not a repo issue.)🤖 Generated with Claude Code