From f7c7ac2da15e9d191e84d9b89b937152a0a54fd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Wed, 1 May 2024 13:40:18 +0000 Subject: [PATCH] Fix CI regression, #1658 merged too soon (#1659) Also need to use `activity.IsActivity` outside activity specific code --- flow/connectors/postgres/postgres.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/connectors/postgres/postgres.go b/flow/connectors/postgres/postgres.go index 2c5b506b6b..1f5a7545f4 100644 --- a/flow/connectors/postgres/postgres.go +++ b/flow/connectors/postgres/postgres.go @@ -724,7 +724,9 @@ func (c *PostgresConnector) GetTableSchema( ) (*protos.GetTableSchemaBatchOutput, error) { res := make(map[string]*protos.TableSchema) for _, tableName := range req.TableIdentifiers { - activity.RecordHeartbeat(ctx, fmt.Sprintf("fetching schema for table %s", tableName)) + if activity.IsActivity(ctx) { + activity.RecordHeartbeat(ctx, "fetching schema for table "+tableName) + } tableSchema, err := c.getTableSchemaForTable(ctx, tableName, req.System) if err != nil { return nil, err