Skip to content

Commit

Permalink
call SyncFlowCleanup during SetupFlow (#2464)
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal authored Jan 20, 2025
1 parent 99b8b8f commit 304f4f1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions flow/activities/flowable.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ func (a *FlowableActivity) SetupMetadataTables(ctx context.Context, config *prot
return fmt.Errorf("failed to setup metadata tables: %w", err)
}

// this should have been done by DropFlowDestination
// but edge case due to late context cancellation
if err := dstConn.SyncFlowCleanup(ctx, config.FlowName); err != nil {
a.Alerter.LogFlowError(ctx, config.FlowName, err)
return fmt.Errorf("failed to clean up destination before mirror setup: %w", err)
}

return nil
}

Expand Down

0 comments on commit 304f4f1

Please sign in to comment.