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



##########
File path: playground/backend/cmd/server/server.go
##########
@@ -107,8 +108,13 @@ func setupCache(ctx context.Context, appEnv 
environment.ApplicationEnvs) (cache.
 }
 
 func main() {
+       os.Setenv("PROTOCOL_TYPE", "TCP")

Review comment:
       It seems that we do not need this one.

##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -111,23 +111,30 @@ func Process(ctx context.Context, cacheService 
cache.Cache, lc *fs_tool.LifeCycl
 
        switch sdkEnv.ApacheBeamSdk {
        case pb.Sdk_SDK_JAVA, pb.Sdk_SDK_GO:
-               // Compile
-               logger.Infof("%s: Compile() ...\n", pipelineId)
-               compileCmd := executor.Compile(ctxWithTimeout)
-               var compileError bytes.Buffer
-               var compileOutput bytes.Buffer
-               runCmdWithOutput(compileCmd, &compileOutput, &compileError, 
successChannel, errorChannel)
-
-               ok, err = processStep(ctxWithTimeout, pipelineId, cacheService, 
cancelChannel, successChannel)
-               if err != nil {
-                       return
-               }
-               if !ok {
-                       _ = processCompileError(ctxWithTimeout, errorChannel, 
compileError.Bytes(), pipelineId, cacheService)
-                       return
-               }
-               if err := processCompileSuccess(ctxWithTimeout, 
compileOutput.Bytes(), pipelineId, cacheService); err != nil {
-                       return
+               isUnitTest, ok := 
validationResults.Load(validators.UnitTestValidatorName)
+               if !isUnitTest.(bool) {
+                       // Compile
+                       logger.Infof("%s: Compile() ...\n", pipelineId)
+                       compileCmd := executor.Compile(ctxWithTimeout)
+                       var compileError bytes.Buffer
+                       var compileOutput bytes.Buffer
+                       runCmdWithOutput(compileCmd, &compileOutput, 
&compileError, successChannel, errorChannel)
+
+                       ok, err = processStep(ctxWithTimeout, pipelineId, 
cacheService, cancelChannel, successChannel)
+                       if err != nil {
+                               return
+                       }
+                       if !ok {
+                               _ = processCompileError(ctxWithTimeout, 
errorChannel, compileError.Bytes(), pipelineId, cacheService)
+                               return
+                       }
+                       if err := processCompileSuccess(ctxWithTimeout, 
compileOutput.Bytes(), pipelineId, cacheService); err != nil {
+                               return
+                       }
+               } else {
+                       if err := processCompileSuccess(ctxWithTimeout, 
[]byte(""), pipelineId, cacheService); err != nil {
+                               return
+                       }
                }
        case pb.Sdk_SDK_PYTHON:
                if err := processCompileSuccess(ctxWithTimeout, []byte(""), 
pipelineId, cacheService); err != nil {

Review comment:
       Could we combine this one?




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