Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func (r *Agent) Run(ctx context.Context, recipe recipe.Recipe) (run Run) {
go func() {
defer func() {
if r := recover(); r != nil {
run.Error = fmt.Errorf("%s", r)
run.Error = fmt.Errorf("recover run panic: %s", r)
}
stream.Close()
}()
Expand Down
7 changes: 3 additions & 4 deletions plugins/extractors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@ func (e *Extractor) extractTable(ctx context.Context, ds *bigquery.Dataset, emit
tb := ds.Tables(ctx)
for {
table, err := tb.Next()
if err == iterator.Done {
if errors.Is(err, iterator.Done) || errors.Is(err, context.Canceled) {
break
}
if err != nil {
} else if err != nil {
e.logger.Error("failed to get table, skipping table", "err", err)
continue
}
Expand Down Expand Up @@ -220,7 +219,6 @@ func (e *Extractor) buildAsset(ctx context.Context, t *bigquery.Table, md *bigqu
"project": t.ProjectID,
"type": string(md.Type),
"partition_field": partitionField,
"labels": md.Labels,
}),
})
if err != nil {
Expand All @@ -234,6 +232,7 @@ func (e *Extractor) buildAsset(ctx context.Context, t *bigquery.Table, md *bigqu
Description: md.Description,
Service: "bigquery",
Data: table,
Labels: md.Labels,
CreateTime: timestamppb.New(md.CreationTime),
UpdateTime: timestamppb.New(md.LastModifiedTime),
}, nil
Expand Down