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

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

                Author: ASF GitHub Bot
            Created on: 06/Dec/21 14:50
            Start Date: 06/Dec/21 14:50
    Worklog Time Spent: 10m 
      Work Description: AydarZaynutdinov commented on a change in pull request 
#16109:
URL: https://github.com/apache/beam/pull/16109#discussion_r763076182



##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -69,7 +77,15 @@ func Process(ctx context.Context, cacheService cache.Cache, 
lc *fs_tool.LifeCycl
        validateFunc := executor.Validate()
        go validateFunc(successChannel, errorChannel)
 
-       if err = processStep(ctxWithTimeout, pipelineId, cacheService, 
cancelChannel, successChannel, nil, nil, errorChannel, 
pb.Status_STATUS_VALIDATION_ERROR, pb.Status_STATUS_PREPARING); err != nil {
+       ok, err := processStep(ctxWithTimeout, pipelineId, cacheService, 
cancelChannel, successChannel)
+       if err != nil {
+               return
+       }
+       if !ok {
+               _ = processError(ctxWithTimeout, errorChannel, pipelineId, 
cacheService, "Validate", pb.Status_STATUS_VALIDATION_ERROR)
+               return
+       }

Review comment:
       Here `err` is an error after timeout or cancelation (in that case 
`cmd.Run()` doesn't finish completely).
   If `err` is `nil` it means that `cmd.Run()` finishes completely.
   
   In case of `cmd.Run()` finishes and it doesn't have any error (there is no 
any typos into the code for example) then `ok` is `true` and we need to call 
`processSuccess()` method. However if code contains some typos then 
`compileCmd.Run()` will return `err` and write error description to 
`compileCmd.stdErr`. In that case `ok` is `false` and we need to call 
`processError()` method.




-- 
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]


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

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

> [Playground] Save Java logs to the cache
> ----------------------------------------
>
>                 Key: BEAM-13330
>                 URL: https://issues.apache.org/jira/browse/BEAM-13330
>             Project: Beam
>          Issue Type: Sub-task
>          Components: beam-playground
>            Reporter: Aydar Zaynutdinov
>            Assignee: Aydar Zaynutdinov
>            Priority: P3
>              Labels: beam-playground-backend, beam-playground-sprint-5
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> Configure Java code processing to save all code processing logs to the cache 
> using a certain `pipelineId` as a key and a new subKey `Logs`.



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

Reply via email to