[BUG] SHA comparison issue with match-regex.version-checker.io
#228
Labels
bug
Something isn't working
match-regex.version-checker.io
#228
Describe the bug
version-checker seems to not do the comparison properly sometimes, leading to the metrics stating it's not the latest while it is.
I haven't tested with other registries, but it happens with docker.io, and the annotation
match-regex.version-checker.io
.Here is a simple pod to test that scenario:
docker.io/busybox:1.36.1-glibc
is currently the latest of the-glibc
suffix.The produced metric has the following labels, and its value is
0
:First thing to note is the
current_version
andlatest_version
contains the sha, so I assume it compares using the sha in that case, instead of just the tag. From my tests, I concluded that when the semVer doesn't match, version-checker immediately states it's not the latest (which makes sense). But when it matches, version-checker then compares using the sha. I'm not sure if I'm right about the behavior, nor if it's expected.In any case, when the semVer match, and sha is compared, both values are differents. Looking in docker hub, the "current_version" is matching the "Index digest", while "latest_version" is matching "Manifest digest", which are both different for the same image. I suppose that's why the metrics returns 0.
To Reproduce
See above
Expected behavior
version-checker should return current version match the latest
Screenshots
Environment (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: