Repository navigation
apm SHA pins that follow a branch (#<sha> # main) never update
#46877
Closed
MPV
started this conversation in
Suggest an Idea
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.
Uh oh!
There was an error while loading. Please reload this page.
Tell us more.
APM pins a dependency to a commit as
owner/repo#<sha>. WithpinDigests, the apm manager keeps such a pin current when a trailing comment names a release tag,owner/repo#<sha> # v2.0.0, the waygithub-actionsdoes foruses: owner/action@<sha> # v4.Many repositories that publish agent skills have no tags, so a commit is the only reproducible pin and the natural comment is the branch it follows. For example, anthropics/skills has no tags:
These pins never move. The apm manager looks the dependency up with
github-tags.mainisn't a version, so lookup skips the releases and asks for the digest ofmain.github-tagstreats that value as a tag (findCommitOfTag), finds no tag namedmainand returns null. No PR is opened, and the Dependency Dashboard reports a failed lookup.Minimal reproduction: https://github.com/MPV/renovate-apm-branch-sha-pin. On the Mend app (44.134.1), its Dependency Dashboard shows:
Warning
Renovate failed to look up the following dependencies:
Could not determine new digest for update (github-tags package anthropics/skills).Files affected:
apm.ymlIts "Detected Dependencies" section lists the pin with the branch as its version:
github-actionsalready handles this. When the ref, or the comment of a SHA pin, doesn't look like a version (/^v?\d+/), it uses thegithub-digestdatasource withexactversioning. That datasource returns tags and branches, souses: owner/action@<sha> # maingets digest updates for the head ofmain.Proposal
Do the same in the apm manager. When the ref or the comment of a SHA pin doesn't look like a version, use:
github-digestwithexactversioning on GitHub hosts;git-refson other hosts.Then
#<sha> # mainfollows the head ofmain, and withpinDigestsa plain#mainpin gets pinned to its commit, with the branch kept as the comment.Without
pinDigests, a plain branch pin would get no update, asuses: owner/action@maindoes. APM's lockfile records its commit, and lock file maintenance moves it.Questions for maintainers
github-actionstest for "version-like" (/^v?\d+/), or check validity under the default versioning? A tag such asrelease-2024would go togithub-digestunder the first, and stay ongithub-tagsunder the second.github-tags'getDigestfall back to a branch when no tag matches? That would fix this for every manager usinggithub-tags, but it changes shared behaviour.All reactions