AydarZaynutdinov commented on a change in pull request #16273:
URL: https://github.com/apache/beam/pull/16273#discussion_r771437886



##########
File path: playground/backend/internal/environment/environment_service.go
##########
@@ -173,9 +174,13 @@ func createExecutorConfig(apacheBeamSdk pb.Sdk, configPath 
string) (*ExecutorCon
        }
        switch apacheBeamSdk {
        case pb.Sdk_SDK_JAVA:
-               executorConfig.CompileArgs = append(executorConfig.CompileArgs, 
getEnv(beamPathKey, defaultBeamJarsPath))
-               executorConfig.RunArgs[1] = fmt.Sprintf("%s%s", 
executorConfig.RunArgs[1], getEnv(beamPathKey, defaultBeamJarsPath))
-               executorConfig.TestArgs[1] = fmt.Sprintf("%s%s", 
executorConfig.TestArgs[1], getEnv(beamPathKey, defaultBeamJarsPath))
+               args, err := concatBeamJarsToString()
+               if err != nil {
+                       return nil, err

Review comment:
       Need to add some log here or in `concatBeamJarsToString()` method

##########
File path: playground/backend/internal/fs_tool/fs_test.go
##########
@@ -303,7 +303,7 @@ func TestLifeCycle_GetAbsoluteExecutableFilePath(t 
*testing.T) {
        baseFileFolder := fmt.Sprintf("%s_%s", baseFileFolder, pipelineId)
        srcFileFolder := baseFileFolder + "/src"
 
-       filePath := fmt.Sprintf("%s/%s", srcFileFolder, 
pipelineId.String()+javaSourceFileExtension)
+       filePath := fmt.Sprintf("%s/%s", srcFileFolder, 
pipelineId.String()+JavaSourceFileExtension)

Review comment:
       ```suggestion
        filePath := filepath.Join(srcFileFolder, fmt.Sprintf("%s%s", 
pipelineId.String(), JavaSourceFileExtension))
   ```

##########
File path: playground/backend/internal/preparators/go_preparators.go
##########
@@ -51,16 +54,15 @@ func formatCode(args ...interface{}) error {
        return nil
 }
 
-func changeFileName(args ...interface{}) error {
+func changeGoTestFileName(args ...interface{}) error {
        filePath := args[0].(string)
-       isUnitTest := args[1].(bool)
-       if isUnitTest {
+       validationResults := args[1].(*sync.Map)
+       isUnitTest, ok := 
validationResults.Load(validators.UnitTestValidatorName)
+       if ok && isUnitTest.(bool) {
                testFileName := fmt.Sprintf("%s_test.%s", 
strings.Split(filePath, sep)[0], goName)
-               cmd := exec.Command(mvCmd, filePath, testFileName)
-               fmt.Println(cmd.String())
-               stdout, err := cmd.CombinedOutput()
+               err := os.Rename(filePath, testFileName)
                if err != nil {
-                       return errors.New(string(stdout))
+                       return err

Review comment:
       Maybe add some log here?




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


Reply via email to