fmartinou / whats-up-docker

What's up Docker ( aka WUD ) gets you notified when a new version of your Docker Container is available.
https://fmartinou.github.io/whats-up-docker
MIT License
921 stars 29 forks source link

Incorrect detection of new version #375

Closed Manuki-San closed 3 months ago

Manuki-San commented 3 months ago

WUD (version 6.3.0) detects that container based on image emby/embyserver can be updated from 4.9.0.12 to 4.9.0.9 (which is a lower version) despite the tag format being defined as ^\d+.\d+.\d+.\d+$

image

I suspect that the comparison between the 2 versions is done lexicographically (the "1" of ".12" < ".9") instead of numerically as recommended by the tag format.

fmartinou commented 3 months ago

Hi,

This behavior is consistent with the semver specification. I.e. Numeric identifiers only exist for major, minor and patch. The part at the right is considered as a "prerelease" or a "build"so it must be compared lexically.

Please notice that the includeTags regex is just here to filter candidates; using \d doesn't play a role for the semver comparison/resolution.

I am sorry for you but the main issue there, is that Emby tags are not semver compliant ;) You can try to discuss with the Emby dev team to see if they can make them compliant with the spec 🤷‍♂️

Manuki-San commented 3 months ago

thank you for the explanation