daria-malkova commented on a change in pull request #16138:
URL: https://github.com/apache/beam/pull/16138#discussion_r765819792
##########
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:
Done
--
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]