Skip to content

Commit

Permalink
set sql_mode = ANSI. It was this or adding template parameter for tab…
Browse files Browse the repository at this point in the history
…le identifier
  • Loading branch information
serprex committed Jan 3, 2025
1 parent 5de84eb commit 64338ab
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions flow/connectors/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ func (c *MySqlConnector) Execute(ctx context.Context, cmd string, args ...interf
if err != nil {
return nil, fmt.Errorf("failed to connect to mysql server: %w", err)
}
c.conn.Execute("SET sql_mode = ANSI")
}

rs, err := c.conn.Execute(cmd, args...)
Expand Down
2 changes: 1 addition & 1 deletion flow/middleware/oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func AuthGrpcMiddleware(unauthenticatedMethods []string) (grpc.UnaryServerInterc
_, err := validateRequestToken(authHeader, cfg.OauthJwtCustomClaims, ip...)
if err != nil {
slog.Debug("Failed to validate request token", slog.String("method", info.FullMethod), slog.Any("error", err))
return nil, status.Errorf(codes.Unauthenticated, "%s", err.Error())
return nil, status.Error(codes.Unauthenticated, err.Error())
}
}

Expand Down
8 changes: 3 additions & 5 deletions flow/workflows/qrep_flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,7 @@ func (q *QRepPartitionFlowExecution) replicatePartitions(ctx workflow.Context,

// getPartitionWorkflowID returns the child workflow ID for a new sync flow.
func (q *QRepFlowExecution) getPartitionWorkflowID(ctx workflow.Context) string {
id := GetUUID(ctx)
return fmt.Sprintf("qrep-part-%s-%s", q.config.FlowJobName, id)
return fmt.Sprintf("qrep-part-%s-%s", q.config.FlowJobName, GetUUID(ctx))
}

// startChildWorkflow starts a single child workflow.
Expand Down Expand Up @@ -266,11 +265,10 @@ func (q *QRepFlowExecution) processPartitions(

partitionWorkflows := make([]workflow.Future, 0, len(batches))
for i, parts := range batches {
batch := &protos.QRepPartitionBatch{
future := q.startChildWorkflow(ctx, &protos.QRepPartitionBatch{
Partitions: parts,
BatchId: int32(i + 1),
}
future := q.startChildWorkflow(ctx, batch)
})
partitionWorkflows = append(partitionWorkflows, future)
}

Expand Down

0 comments on commit 64338ab

Please sign in to comment.