Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1250 from weaveworks/actually-skip-on-zero-timestamp
Browse files Browse the repository at this point in the history
*actually* skip image update on zero CreatedAt
  • Loading branch information
squaremo authored Jul 25, 2018
2 parents 6420bf7 + 20b5bfc commit b369533
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/images.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ func (d *Daemon) pollForNewImages(logger log.Logger) {
logger.Log("warning", "untagged image in available images", "action", "skip container")
continue containers
}
newImage := currentImageID.WithNewTag(latest.ID.Tag)
changes.Add(service.ID, container, newImage)
currentCreatedAt := ""
for _, info := range filteredImages {
if info.CreatedAt.IsZero() {
Expand All @@ -71,6 +69,8 @@ func (d *Daemon) pollForNewImages(logger log.Logger) {
currentCreatedAt = "filtered out or missing"
logger.Log("warning", "current image not in filtered images", "action", "proceed anyway")
}
newImage := currentImageID.WithNewTag(latest.ID.Tag)
changes.Add(service.ID, container, newImage)
logger.Log("info", "added update to automation run", "new", newImage, "reason", fmt.Sprintf("latest %s (%s) > current %s (%s)", latest.ID.Tag, latest.CreatedAt, currentImageID.Tag, currentCreatedAt))
}
}
Expand Down

0 comments on commit b369533

Please sign in to comment.