-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more information logs for UI logs table #2220
base: main
Are you sure you want to change the base?
Changes from 1 commit
9d4a9d2
e880f50
006f900
42b50d2
39ae5ce
3f8bd7e
f648453
a9a0e1f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -219,6 +219,7 @@ | |
) (*protos.SetupNormalizedTableBatchOutput, error) { | ||
logger := activity.GetLogger(ctx) | ||
ctx = context.WithValue(ctx, shared.FlowNameKey, config.FlowName) | ||
a.Alerter.LogFlowInfo(ctx, config.FlowName, "Setting up destination tables") | ||
conn, err := connectors.GetByNameAs[connectors.NormalizedTablesConnector](ctx, config.Env, a.CatalogPool, config.PeerName) | ||
if err != nil { | ||
if errors.Is(err, errors.ErrUnsupported) { | ||
|
@@ -247,6 +248,7 @@ | |
}) | ||
defer shutdown() | ||
|
||
a.Alerter.LogFlowInfo(ctx, config.FlowName, "Setting up destination tables") | ||
tableExistsMapping := make(map[string]bool, len(tableNameSchemaMapping)) | ||
for tableIdentifier, tableSchema := range tableNameSchemaMapping { | ||
existing, err := conn.SetupNormalizedTable( | ||
|
@@ -270,7 +272,7 @@ | |
logger.Info("table already exists " + tableIdentifier) | ||
} | ||
|
||
} | ||
|
||
if err := conn.FinishSetupNormalizedTables(ctx, tx); err != nil { | ||
return nil, fmt.Errorf("failed to commit normalized tables tx: %w", err) | ||
|
@@ -513,7 +515,7 @@ | |
} | ||
} | ||
|
||
a.Alerter.LogFlowInfo(ctx, config.FlowJobName, fmt.Sprintf("obtained partitions for table %s", config.WatermarkTable)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe just log instead of sending an alert? (too noisy) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are not alerts. This is for our logs table in UI There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My bad, but still do we want to do it for all tables? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah because we have scarcity of user facing info during initial load - common feedback from customers cc @iskakaushik |
||
|
||
return &protos.QRepParitionResult{ | ||
Partitions: partitions, | ||
|
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -58,7 +58,7 @@ func (a *SnapshotActivity) SetupReplication( | |||
) (*protos.SetupReplicationOutput, error) { | ||||
ctx = context.WithValue(ctx, shared.FlowNameKey, config.FlowJobName) | ||||
logger := activity.GetLogger(ctx) | ||||
|
||||
a.Alerter.LogFlowInfo(ctx, config.FlowJobName, "Setting up replication slot and publication") | ||||
a.Alerter.LogFlowEvent(ctx, config.FlowJobName, "Started Snapshot Flow Job") | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is for alerting, we need this |
||||
|
||||
conn, err := connectors.GetByNameAs[*connpostgres.PostgresConnector](ctx, nil, a.CatalogPool, config.PeerName) | ||||
|
@@ -98,6 +98,8 @@ func (a *SnapshotActivity) SetupReplication( | |||
connector: conn, | ||||
} | ||||
|
||||
a.Alerter.LogFlowInfo(ctx, config.FlowJobName, "Replication slot and publication setup complete") | ||||
|
||||
return &protos.SetupReplicationOutput{ | ||||
SlotName: slotInfo.SlotName, | ||||
SnapshotName: slotInfo.SnapshotName, | ||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have this twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
think it's meant to say conn.StartupSetupNormalizedTables has created tables, beginning ingestion. Wording needs to be updated