github-actions: mise-action version+sha256 update fails when a comment mentions the current version ("Error updating branch: update failure") #45281
Unanswered
dmccaffery
asked this question in
Request Help
Replies: 1 comment
|
Sounds legit. PR is welcome with your suggested fix. Thanks! |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How are you running Renovate?
Self-hosted,
ghcr.io/renovatebot/renovate:44(44.29.5) viarenovatebot/github-action, platformgithub, withplatformCommit: enabled.Describe the bug
Since #44876, the
github-actionsmanager updatesjdx/mise-action'sversion:andsha256:inputs together (thesha256is extracted ascurrentDigest). If the workflow file also contains the current version string in a nearby comment — e.g. a comment documenting which asset the sha256 belongs to — the branch fails every run with only the generic:Reproduction
Removing
v2026.7.3from the comment makes the update succeed; adding it back reproduces the failure.Debug logs
Analysis
The dep's
replaceStringis just the version value, so indoAutoReplace(lib/workers/repository/update/branch/auto-replace.ts) the digest substitution intonewStringcan't apply ("currentDigest not found in string to replace"), and the update falls through to thereplaceWithoutReplaceStringscan. That loop replaces the firstcurrentValuehit (theversion:input), then encounters the second hit (the comment) whilevalueReplacedis already true, treats it as ambiguity, resets state, and restarts from the next candidate index. Because the comment occurrence sits between theversion:andsha256:lines, no starting position can replace exactly one version occurrence plus the digest before tripping the duplicate, so every attempt resets and the update ultimately throws.Expected behavior
Either tolerate extra occurrences of
currentValueonce the value+digest pair has been consistently replaced (e.g. attemptconfirmIfDepUpdatedbefore discarding on a duplicate hit), or extract areplaceString/autoReplaceStringTemplatespanning theversion:…sha256:block so the digest replacement happens inside the template path. Failing that, surfacing the underlying auto-replace error instead of the genericError updating branch: update failureWARN would make this much easier to diagnose — the failure happens before any platform interaction, but the message reads like a push/permissions problem.Note the lookup side works correctly (the right
newDigestis computed); #44876's integration test covers lookup but not the file rewrite, which is why this wasn't caught.All reactions