diff --git a/pkg/app/ops/platformprovidermigration/runner.go b/pkg/app/ops/platformprovidermigration/runner.go index f87a206ba9..6b50435cb2 100644 --- a/pkg/app/ops/platformprovidermigration/runner.go +++ b/pkg/app/ops/platformprovidermigration/runner.go @@ -16,6 +16,7 @@ package platformprovidermigration import ( "context" + "fmt" "time" "go.uber.org/zap" @@ -51,10 +52,13 @@ func (r *Runner) Migrate(ctx context.Context) error { // Run migration task once on start this ops migration. cursor, err := r.migrate(ctx, "") - if err != nil { - r.logger.Error("unable to finish application platform provider migration task in first run", zap.Error(err)) + if err == nil { + r.logger.Info("application migration task finished successfully") + return nil } + r.logger.Error("unable to finish application platform provider migration task in first run", zap.Error(err)) + taskRunTicker := time.NewTicker(migrationRunInterval) defer taskRunTicker.Stop() @@ -110,6 +114,8 @@ func (r *Runner) migrate(ctx context.Context, cursor string) (string, error) { return "", nil } + r.logger.Info(fmt.Sprintf("migrate platform provider value for %d application(s)", len(apps))) + for _, app := range apps { if app.PlatformProvider != "" { continue