Skip to content

Commit 9ed543c

Browse files
authored
fix: Don't send migrate messages in destination v1 write (#1167)
Migrate messages are already sent in the CLI here https://github.com/cloudquery/cloudquery/blob/eab200d6944c54db5ef6d9a81b290ed6b8ddd06f/cli/cmd/sync_v2.go#L145 (during sync) and here https://github.com/cloudquery/cloudquery/blob/eab200d6944c54db5ef6d9a81b290ed6b8ddd06f/cli/cmd/migrate_v2.go#L66 (during migrate). Without this fix, if you have a v2 source and a v3 destination `sync` will run migration twice, and `sync --no-migrate` will run migration once ---
1 parent badec9d commit 9ed543c

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

internal/servers/destination/v1/destinations.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ func (s *Server) Write(msg pb.Destination_WriteServer) error {
137137
return s.Plugin.Write(ctx, msgs)
138138
})
139139

140-
for _, table := range tables {
141-
msgs <- &message.WriteMigrateTable{
142-
Table: table,
143-
MigrateForce: s.spec.MigrateMode == specs.MigrateModeForced,
144-
}
145-
}
146-
147140
for {
148141
r, err := msg.Recv()
149142
if err == io.EOF {

0 commit comments

Comments
 (0)