fix(master): review fixes for newer-tag suggestions (#11)

This commit is contained in:
2026-10-13 11:56:03 +02:00
parent c9cb1103ad
commit a5d0d1a070
11 changed files with 111 additions and 38 deletions
+9 -5
View File
@@ -249,17 +249,21 @@ func followsNoTag(svc model.Service) bool {
// newerTag returns the tag of the service's newer-tag suggestion, or "" when
// there is none or it no longer holds. The poller writes the suggestion once
// per cycle, so after the service moved to another tag the stored value can
// be stale until the next cycle; checking again here hides it meanwhile.
// be stale until the next cycle; checking again here hides it meanwhile. A
// suggestion from another repo than the service follows now is hidden too.
func newerTag(s model.Service) string {
if s.RemovedAt != nil || s.NewerRef == "" {
return ""
}
tag := imageref.Parse(s.NewerRef).Tag
followed := imageref.Parse(jobs.FollowedRef(s.ActualRef)).Tag
if _, ok := tagver.Newer(followed, []string{tag}); !ok {
newer := imageref.Parse(s.NewerRef)
repo, followed := poller.Followed(s)
if newer.Repo != repo {
return ""
}
return tag
if _, ok := tagver.Newer(followed, []string{newer.Tag}); !ok {
return ""
}
return newer.Tag
}
// versionRow is an image version as shown on the service page.