[ 
https://issues.apache.org/jira/browse/BEAM-13543?focusedWorklogId=701576&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-701576
 ]

ASF GitHub Bot logged work on BEAM-13543:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Dec/21 15:24
            Start Date: 28/Dec/21 15:24
    Worklog Time Spent: 10m 
      Work Description: 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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 701576)
    Time Spent: 50m  (was: 40m)

> [Playground] Add logic of sending validation's output on the backend side
> -------------------------------------------------------------------------
>
>                 Key: BEAM-13543
>                 URL: https://issues.apache.org/jira/browse/BEAM-13543
>             Project: Beam
>          Issue Type: Sub-task
>          Components: beam-playground
>            Reporter: Aydar Zaynutdinov
>            Assignee: Aydar Zaynutdinov
>            Priority: P3
>              Labels: beam-playground-backend
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Need to add logic to keep validation's output to the cache and implement a 
> new API method GetValidationOutptut which will return validation's output 
> from the cache. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to