This is an automated email from the ASF dual-hosted git repository.

damccorm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new 9a22bf68767 adding parameters flag to support schema based transforms 
(#24864)
9a22bf68767 is described below

commit 9a22bf68767b8fa27aa381d6ff84e381a21af5a4
Author: Oleh Borysevych <[email protected]>
AuthorDate: Tue Jan 3 19:50:56 2023 +0200

    adding parameters flag to support schema based transforms (#24864)
---
 playground/backend/cmd/server/controller_test.go                    | 2 +-
 playground/backend/configs/SDK_JAVA.json                            | 1 +
 playground/backend/internal/code_processing/code_processing_test.go | 2 +-
 playground/backend/internal/environment/environment_service_test.go | 6 +++---
 playground/backend/internal/executors/executor_test.go              | 4 ++--
 5 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/playground/backend/cmd/server/controller_test.go 
b/playground/backend/cmd/server/controller_test.go
index 83bf46ee09a..2d61be12b99 100644
--- a/playground/backend/cmd/server/controller_test.go
+++ b/playground/backend/cmd/server/controller_test.go
@@ -55,7 +55,7 @@ import (
 
 const (
        bufSize               = 1024 * 1024
-       javaConfig            = "{\n  \"compile_cmd\": \"javac\",\n  
\"run_cmd\": \"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    
\"-d\",\n    \"bin\",\n    \"-classpath\"\n  ],\n  \"run_args\": [\n    
\"-cp\",\n    \"bin:\"\n  ],\n  \"test_args\": [\n    \"-cp\",\n    \"bin:\",\n 
   \"JUnit\"\n  ]\n}"
+       javaConfig            = "{\n  \"compile_cmd\": \"javac\",\n  
\"run_cmd\": \"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    
\"-d\",\n    \"bin\",\n    \"-parameters\",\n    \"-classpath\"\n  ],\n  
\"run_args\": [\n    \"-cp\",\n    \"bin:\"\n  ],\n  \"test_args\": [\n    
\"-cp\",\n    \"bin:\",\n    \"JUnit\"\n  ]\n}"
        javaLogConfigFilename = "logging.properties"
        baseFileFolder        = "executable_files"
        configFolder          = "configs"
diff --git a/playground/backend/configs/SDK_JAVA.json 
b/playground/backend/configs/SDK_JAVA.json
index 47b0339a7ad..6e7c87fed01 100644
--- a/playground/backend/configs/SDK_JAVA.json
+++ b/playground/backend/configs/SDK_JAVA.json
@@ -5,6 +5,7 @@
   "compile_args": [
     "-d",
     "bin",
+    "-parameters",
     "-classpath"
   ],
   "run_args": [
diff --git 
a/playground/backend/internal/code_processing/code_processing_test.go 
b/playground/backend/internal/code_processing/code_processing_test.go
index 30e8403ae3d..fb3a2a1313e 100644
--- a/playground/backend/internal/code_processing/code_processing_test.go
+++ b/playground/backend/internal/code_processing/code_processing_test.go
@@ -46,7 +46,7 @@ import (
 )
 
 const (
-       javaConfig      = "{\n  \"compile_cmd\": \"javac\",\n  \"run_cmd\": 
\"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    \"-d\",\n    
\"bin\",\n    \"-classpath\"\n  ],\n  \"run_args\": [\n    \"-cp\",\n    
\"bin:\"\n  ],\n  \"test_args\": [\n    \"-cp\",\n    \"bin:\",\n    
\"JUnit\"\n  ]\n}"
+       javaConfig      = "{\n  \"compile_cmd\": \"javac\",\n  \"run_cmd\": 
\"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    \"-d\",\n    
\"bin\",\n    \"-parameters\",\n    \"-classpath\"\n  ],\n  \"run_args\": [\n   
 \"-cp\",\n    \"bin:\"\n  ],\n  \"test_args\": [\n    \"-cp\",\n    
\"bin:\",\n    \"JUnit\"\n  ]\n}"
        pythonConfig    = "{\n  \"compile_cmd\": \"\",\n  \"run_cmd\": 
\"python3\",\n  \"compile_args\": [],\n  \"run_args\": []\n}"
        goConfig        = "{\n  \"compile_cmd\": \"go\",\n  \"run_cmd\": 
\"\",\n  \"compile_args\": [\n    \"build\",\n    \"-o\",\n    \"bin\"\n  ],\n  
\"run_args\": [\n  ]\n}"
        pipelinesFolder = "executable_files"
diff --git 
a/playground/backend/internal/environment/environment_service_test.go 
b/playground/backend/internal/environment/environment_service_test.go
index 0df904f14e9..531e765c19c 100644
--- a/playground/backend/internal/environment/environment_service_test.go
+++ b/playground/backend/internal/environment/environment_service_test.go
@@ -28,7 +28,7 @@ import (
 )
 
 const (
-       javaConfig       = "{\n  \"compile_cmd\": \"javac\",\n  \"run_cmd\": 
\"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    \"-d\",\n    
\"bin\",\n    \"-classpath\"\n  ],\n  \"run_args\": [\n    \"-cp\",\n    
\"bin:\"\n  ],\n  \"test_args\": [\n    \"-cp\",\n    \"bin:\",\n    
\"org.junit.runner.JUnitCore\"\n  ]\n}"
+       javaConfig       = "{\n  \"compile_cmd\": \"javac\",\n  \"run_cmd\": 
\"java\",\n  \"test_cmd\": \"java\",\n  \"compile_args\": [\n    \"-d\",\n    
\"bin\",\n    \"-parameters\",\n    \"-classpath\"\n  ],\n  \"run_args\": [\n   
 \"-cp\",\n    \"bin:\"\n  ],\n  \"test_args\": [\n    \"-cp\",\n    
\"bin:\",\n    \"org.junit.runner.JUnitCore\"\n  ]\n}"
        goConfig         = "{\n  \"compile_cmd\": \"go\",\n  \"run_cmd\": 
\"\",\n  \"test_cmd\": \"go\",\n  \"compile_args\": [\n    \"build\",\n    
\"-o\",\n    \"bin\"\n  ],\n  \"run_args\": [\n  ],\n  \"test_args\": [\n    
\"test\",\n    \"-v\"\n  ]\n}\n"
        pythonConfig     = "{\n  \"compile_cmd\": \"\",\n  \"run_cmd\": 
\"python3\",\n  \"test_cmd\": \"pytest\",\n  \"compile_args\": [],\n  
\"run_args\": [],\n  \"test_args\": []\n}\n"
        scioConfig       = "{\n  \"compile_cmd\": \"\",\n  \"run_cmd\": 
\"sbt\",\n  \"test_cmd\": \"sbt\",\n  \"compile_args\": [],\n  \"run_args\": 
[\n    \"runMain\"\n  ],\n  \"test_args\": []\n}\n"
@@ -71,7 +71,7 @@ func setup() error {
        }
        executorConfig = NewExecutorConfig(
                "javac", "java", "java",
-               []string{"-d", "bin", "-classpath", jars},
+               []string{"-d", "bin", "-parameters", "-classpath", jars},
                []string{"-cp", "bin:" + jars},
                []string{"-cp", "bin:" + jars, "org.junit.runner.JUnitCore"},
        )
@@ -323,7 +323,7 @@ func Test_getConfigFromJson(t *testing.T) {
                {
                        name:    "Get object from json",
                        args:    args{filepath.Join(configFolderName, 
defaultSdk.String()+jsonExt)},
-                       want:    NewExecutorConfig("javac", "java", "java", 
[]string{"-d", "bin", "-classpath"}, []string{"-cp", "bin:"}, []string{"-cp", 
"bin:", "org.junit.runner.JUnitCore"}),
+                       want:    NewExecutorConfig("javac", "java", "java", 
[]string{"-d", "bin", "-parameters", "-classpath"}, []string{"-cp", "bin:"}, 
[]string{"-cp", "bin:", "org.junit.runner.JUnitCore"}),
                        wantErr: false,
                },
                {
diff --git a/playground/backend/internal/executors/executor_test.go 
b/playground/backend/internal/executors/executor_test.go
index 350ec65fa21..603b748211f 100644
--- a/playground/backend/internal/executors/executor_test.go
+++ b/playground/backend/internal/executors/executor_test.go
@@ -47,13 +47,13 @@ func TestExecutor_Compile(t *testing.T) {
                                        fileName:        "filePath",
                                        workingDir:      "./",
                                        commandName:     "testCommand",
-                                       commandArgs:     []string{"-d", "bin", 
"-classpath", "/opt/apache/beam/jars/beam-sdks-java-harness.jar"},
+                                       commandArgs:     []string{"-d", "bin", 
"-parameters", "-classpath", 
"/opt/apache/beam/jars/beam-sdks-java-harness.jar"},
                                        pipelineOptions: []string{""},
                                },
                        },
                        want: &exec.Cmd{
                                Path:         "testCommand",
-                               Args:         []string{"javac", "-d", "bin", 
"-classpath", "/opt/apache/beam/jars/beam-sdks-java-harness.jar", "filePath"},
+                               Args:         []string{"javac", "-d", "bin", 
"-parameters", "-classpath", 
"/opt/apache/beam/jars/beam-sdks-java-harness.jar", "filePath"},
                                Env:          nil,
                                Dir:          "",
                                Stdin:        nil,

Reply via email to