Skip to content

Commit

Permalink
feat: add pipeline metadata in error message (#112)
Browse files Browse the repository at this point in the history
Because

artifact need more error message to debug

This commit

add calling pipeline's metadata to error message
  • Loading branch information
Yougigun authored Oct 8, 2024
1 parent 00fb8fd commit d0a5875
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/minio/knowledgebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ type ChunkContentType []byte

// SaveTextChunks saves batch of chunks(text files) to MinIO.
// rate limiting is implemented to avoid overwhelming the MinIO server.
// rate limiting is implemented to avoid overwhelming the MinIO server.
func (m *Minio) SaveTextChunks(ctx context.Context, kbUID string, chunks map[ChunkUIDType]ChunkContentType) error {
logger, _ := logger.GetZapLogger(ctx)
var wg sync.WaitGroup
Expand Down
4 changes: 2 additions & 2 deletions pkg/service/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ func GetVectorsFromResponse(resp *pipelinePb.TriggerNamespacePipelineReleaseResp
for _, output := range resp.Outputs {
embedResult, ok := output.GetFields()["embed_result"]
if !ok {
return nil, fmt.Errorf("embed_result not found in the output fields. output: %v", output)
return nil, fmt.Errorf("embed_result not found in the output fields. pipeline's output: %v. pipeline's metadata: %v", output, resp.Metadata)
}
listValue := embedResult.GetListValue()
if listValue == nil {
return nil, fmt.Errorf("embed_result is not a list. output: %v", output)
return nil, fmt.Errorf("embed_result is not a list. pipeline's output: %v. pipeline's metadata: %v", output, resp.Metadata)
}

vector := make([]float32, 0, len(listValue.GetValues()))
Expand Down

0 comments on commit d0a5875

Please sign in to comment.