AydarZaynutdinov commented on a change in pull request #16361:
URL: https://github.com/apache/beam/pull/16361#discussion_r775958120
##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -426,16 +428,14 @@ func processError(ctx context.Context, errorChannel chan
error, pipelineId uuid.
return utils.SetToCache(ctx, cacheService, pipelineId, cache.Status,
newStatus)
}
-// processCompileError processes error received during processing compile step.
-// This method sets error output and corresponding status to the cache.
-func processCompileError(ctx context.Context, errorChannel chan error,
errorOutput []byte, pipelineId uuid.UUID, cacheService cache.Cache) error {
- err := <-errorChannel
- logger.Errorf("%s: Compile(): err: %s, output: %s\n", pipelineId,
err.Error(), errorOutput)
+// processErrorWithSavingOutput processes error with saving to cache received
error output.
+func processErrorWithSavingOutput(ctx context.Context, err error, errorOutput
[]byte, pipelineId uuid.UUID, subKey cache.SubKey, cacheService cache.Cache,
errorTitle string, newStatus pb.Status) error {
+ logger.Errorf("%s: %s(): err: %s, output: %s\n", pipelineId,
errorTitle, err.Error(), errorOutput)
- if err := utils.SetToCache(ctx, cacheService, pipelineId,
cache.CompileOutput, fmt.Sprintf("error: %s, output: %s", err.Error(),
string(errorOutput))); err != nil {
+ if err := utils.SetToCache(ctx, cacheService, pipelineId, subKey,
fmt.Sprintf("error: %s, output: %s", err.Error(), string(errorOutput))); err !=
nil {
Review comment:
Changed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]