Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions cmd/ci-images-mirror/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,20 @@ func (s *supplementalCIImagesServiceWithMirrorStore) Mirror(m map[string]quayioc
continue
}

// Skip if digests match
// Skip if digests match (both must be non-empty to compare)
// If target doesn't exist (empty digest), we need to sync
if targetInfo.Digest != "" && sourceInfo.Digest != "" && targetInfo.Digest == sourceInfo.Digest {
s.logger.WithField("target", targetImage).WithField("digest", targetInfo.Digest).Debug("Image already in sync, skipping")
s.logger.WithField("target", targetImage).WithField("source", source).
WithField("sourceDigest", sourceInfo.Digest).WithField("targetDigest", targetInfo.Digest).
Debug("Image already in sync, skipping")
continue
}

// Log sync needed with digest details for debugging
s.logger.WithField("source", source).WithField("target", targetImage).
WithField("sourceDigest", sourceInfo.Digest).WithField("targetDigest", targetInfo.Digest).
Info("Image needs sync")

s.logger.WithField("source", source).WithField("target", targetImage).
WithField("sourceDigest", sourceInfo.Digest).WithField("targetDigest", targetInfo.Digest).
Info("Image needs sync")
Expand Down