@@ -335,7 +335,7 @@ func getJobOptions(ctx context.Context, streaming bool) (*dataflowlib.JobOptions
335335 experiments := jobopts .GetExperiments ()
336336 // Ensure that we enable the same set of experiments across all SDKs
337337 // for runner v2.
338- var fnApiSet , v2set , uwSet , portaSubmission , seSet , wsSet bool
338+ var fnApiSet , v2set , uwSet , portableRunnerSet , portaSubmission , seSet , wsSet bool
339339 for _ , e := range experiments {
340340 if strings .Contains (e , "beam_fn_api" ) {
341341 fnApiSet = true
@@ -349,7 +349,10 @@ func getJobOptions(ctx context.Context, streaming bool) (*dataflowlib.JobOptions
349349 if strings .Contains (e , "use_portable_job_submission" ) {
350350 portaSubmission = true
351351 }
352- if strings .Contains (e , "disable_runner_v2" ) || strings .Contains (e , "disable_runner_v2_until_2023" ) || strings .Contains (e , "disable_prime_runner_v2" ) {
352+ if strings .Contains (e , "enable_portable_runner" ) {
353+ portableRunnerSet = true
354+ }
355+ if strings .Contains (e , "disable_runner_v2" ) || strings .Contains (e , "disable_runner_v2_until_2023" ) || strings .Contains (e , "disable_prime_runner_v2" ) || strings .Contains (e , "disable_portable_runner" ) || strings .Contains (e , "enable_streaming_java_runner" ) {
353356 return nil , errors .New ("detected one of the following experiments: disable_runner_v2 | disable_runner_v2_until_2023 | disable_prime_runner_v2. Disabling runner v2 is no longer supported as of Beam version 2.45.0+" )
354357 }
355358 }
@@ -366,6 +369,9 @@ func getJobOptions(ctx context.Context, streaming bool) (*dataflowlib.JobOptions
366369 if ! portaSubmission {
367370 experiments = append (experiments , "use_portable_job_submission" )
368371 }
372+ if ! portableRunnerSet {
373+ // As this option is not documented, we do not set it by default. This behavior will be fixed in later versions.
374+ }
369375
370376 // Ensure that streaming specific experiments are set for streaming pipelines
371377 // since runner v2 only supports using streaming engine.
0 commit comments