action-dependabot-auto-merge icon indicating copy to clipboard operation
action-dependabot-auto-merge copied to clipboard

Parsing version for Docker PRs

Open ttshivers opened this issue 3 years ago • 5 comments

Parsing the version from the dependabot docker image tags would be useful, but it does seem like it would require more work. One nice observation is that many of the official images have a tag scheme like:

SEMVER-stuff

https://github.com/docker-library/official-images#tags-and-aliases

I think it would be reasonable to fail parsing if no obvious version could be detected.

Here is an example PR: https://github.com/synclounge/syncloungeserver/pull/63

ttshivers avatar Oct 15 '20 15:10 ttshivers

I think ... this should be working, maybe something missed in the parsing .. since the -stuff is valid semver...

will test and verify

ahmadnassri avatar Oct 15 '20 18:10 ahmadnassri

so, the interesting thing here, the tag syntax used by node, is actually a valid semver string according to the semver spec...

and since it's parsed as a whole, it's valid semver, and actuall translates to a preminor change, NOT a minor.

image

sounds like something the Node team need to consider in their decision of docker tagging.

ahmadnassri avatar Oct 15 '20 19:10 ahmadnassri

I opened an issue in the official node repo: https://github.com/nodejs/docker-node/issues/1369

ahmadnassri avatar Oct 15 '20 19:10 ahmadnassri

I do see the point about the tags actually being a valid semver but not in the way it's intended. Is there any way to get more information from dependabot? If so, it might be possible to parse the version differently if the dependency is an official docker image.

ttshivers avatar Oct 16 '20 04:10 ttshivers

I wish there was a better way to get info from dependabot (like an API!)

the current mechanism this action uses is actually not great: it parses the pull request title and attempts to figure out what the package is, what version it's updated from / to ...

sometimes dependabot doesn't even use the same title format ... (see #31)

it's ... not fun.

ahmadnassri avatar Oct 16 '20 14:10 ahmadnassri