fix: missing index step when new sources added to configuration
1 file changed, 7 insertions(+), 2 deletions(-)
changed files
M internal/importer/main.go → internal/importer/main.go
@@ -61,7 +61,7 @@ return nil } - imp.options.Logger.Debug("starting importer", "timeout", imp.config.Importer.Timeout.Duration) + imp.options.Logger.Debug("starting fetch", "timeout", imp.config.Importer.Timeout.Duration) importCtx, cancelImport := context.WithTimeout( ctx, imp.config.Importer.Timeout.Duration,@@ -152,7 +152,12 @@ false, newSources, ) if err != nil { - return fault.Wrap(err, fmsg.With("Failed to update index with new sources")) + return fault.Wrap(err, fmsg.With("Failed to fetch new sources")) + } + + err = imp.Index(ctx, newSources) + if err != nil { + return fault.Wrap(err, fmsg.With("Failed to index new sources")) } } if len(retiredSources) > 0 {