Skip to content
Merged
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
10 changes: 8 additions & 2 deletions pkg/app/ops/platformprovidermigration/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ package platformprovidermigration

import (
"context"
"fmt"
"time"

"go.uber.org/zap"
Expand Down Expand Up @@ -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()

Expand Down Expand Up @@ -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
Expand Down