Upgrade to kit v0.3.0

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2026-04-03 10:56:06 +02:00
parent 8adf26ad20
commit f17fb7bf49
191 changed files with 1617 additions and 1617 deletions

View File

@@ -83,7 +83,7 @@ func (w *SourceNameWorker) processNext(ctx context.Context) error {
err := w.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
return source.LoadNextUnsyncedNameForUpdateSkipLocked(ctx, tx)
},
)
@@ -101,15 +101,15 @@ func (w *SourceNameWorker) processNext(ctx context.Context) error {
resolver drivers.NameResolver
)
err = w.pg.WithConn(
err = w.pg.WithTx(
ctx,
func(conn pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
scope := coredata.NewScopeFromObjectID(source.ID)
if source.ConnectorID == nil {
return fmt.Errorf("source %s has no connector", source.ID)
}
if err := dbConnector.LoadByID(ctx, conn, scope, *source.ConnectorID, w.encryptionKey); err != nil {
if err := dbConnector.LoadByID(ctx, tx, scope, *source.ConnectorID, w.encryptionKey); err != nil {
return fmt.Errorf("cannot load connector %s: %w", *source.ConnectorID, err)
}
@@ -126,7 +126,7 @@ func (w *SourceNameWorker) processNext(ctx context.Context) error {
if oauth2Conn, ok := dbConnector.Connection.(*connector.OAuth2Connection); ok {
if oauth2Conn.AccessToken != tokenBefore {
dbConnector.UpdatedAt = time.Now()
if err := dbConnector.Update(ctx, conn, scope, w.encryptionKey); err != nil {
if err := dbConnector.Update(ctx, tx, scope, w.encryptionKey); err != nil {
return fmt.Errorf("cannot persist refreshed token for connector %s: %w", *source.ConnectorID, err)
}
}
@@ -192,7 +192,7 @@ func (w *SourceNameWorker) markNameSynced(
) error {
return w.pg.WithTx(
ctx,
func(tx pg.Conn) error {
func(ctx context.Context, tx pg.Tx) error {
scope := coredata.NewScopeFromObjectID(source.ID)
now := time.Now()