shunping commented on code in PR #37379:
URL: https://github.com/apache/beam/pull/37379#discussion_r2737599086


##########
sdks/python/container/boot.go:
##########
@@ -220,7 +220,18 @@ func launchSDKProcess() error {
 
        // (3) Invoke python
 
-       os.Setenv("PIPELINE_OPTIONS", options)
+       //Commented out -->
+       //os.Setenv("PIPELINE_OPTIONS", options)
+
+       //To prevent crashes if options > ARG_MAX -->
+       // --> Write the large JSON content into a file on disk
+       // --> environment only receives the short filename
+       if optionsFile, err := MakePipelineOptionsFileAndEnvVar(options); err 
!= nil {
+               logger.Fatalf(ctx, "Failed to create a pipeline options file: 
%v", err)
+       } else {
+               os.Setenv("PIPELINE_OPTIONS_FILE", optionsFile)

Review Comment:
   In either the original `MakePipelineOptionsFileAndEnvVar` or your own copy 
(which seems to be unnecessary), the environment variable is already set. I 
think we don't need to do that again 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