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

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

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



##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -54,12 +60,14 @@ func Process(ctx context.Context, cacheService cache.Cache, 
lc *fs_tool.LifeCycl
        errorChannel := make(chan error, 1)
        successChannel := make(chan bool, 1)
        cancelChannel := make(chan bool, 1)
+       stopReadLogsChannel := make(chan bool, 1)
+       finishReadLogsChannel := make(chan bool, 1)
 
        go cancelCheck(ctxWithTimeout, pipelineId, cancelChannel, cacheService)
 
        executorBuilder, err := 
builder.SetupExecutorBuilder(lc.GetAbsoluteSourceFilePath(), 
lc.GetAbsoluteBaseFolderPath(), lc.GetAbsoluteExecutableFilePath(), sdkEnv)
        if err != nil {
-               processSetupError(err, pipelineId, cacheService, ctxWithTimeout)
+               _ = processSetupError(err, pipelineId, cacheService, 
ctxWithTimeout)

Review comment:
       `processSetupError()` could return an error only if some error happens 
during write status to cache:
   ```
   func processSetupError(...) error {
           logger.Errorf(...)
        if err = utils.SetToCache(...); err != nil {
                return err
        }
        return nil
   }
   ```
   All error processing is happening in the `utils.SetToCache` methods. So we 
do not need this error and we could use `_` here. 
   
   Moreover on the next line (71) this method `retrun`s.




-- 
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: 690991)
    Time Spent: 2h 50m  (was: 2h 40m)

> [Playground] Save Go logs to the cache
> --------------------------------------
>
>                 Key: BEAM-13334
>                 URL: https://issues.apache.org/jira/browse/BEAM-13334
>             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: 2h 50m
>  Remaining Estimate: 0h
>
> Configure Go 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