Skip to content

Commit

Permalink
sync: don't return on fail to sync
Browse files Browse the repository at this point in the history
Signed-off-by: Olivier FAURAX <olivier.faurax@eu.equinix.com>
  • Loading branch information
ofaurax committed Apr 29, 2024
1 parent 495411e commit 35c26d3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/vendors/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,13 @@ func NewSyncer(
func (s *Syncer) Sync(ctx context.Context) (err error) {
for _, firmware := range s.firmwares {
if err = s.syncFirmware(ctx, firmware); err != nil {
msg := fmt.Sprintf("failed to sync firmware %s", firmware.Filename)
return errors.Wrap(err, msg)
// Log error without returning, to sync other firmwares
s.logger.WithError(err).
WithField("firmware", firmware.Filename).
WithField("vendor", firmware.Vendor).
WithField("version", firmware.Version).
WithField("url", firmware.UpstreamURL).
Error("Failed to sync firmware")
}
}

Expand Down

0 comments on commit 35c26d3

Please sign in to comment.