-
Notifications
You must be signed in to change notification settings - Fork 4.5k
[Python] Support large pipeline options via file (Fixes #37370) #37379
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 5 commits
9c5d868
0707d08
258ddf8
6a9cd2f
937fd54
f1aa586
171cfad
4666684
e64900c
86cfb0c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -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) | ||||||||||
|
||||||||||
| if err := tools.MakePipelineOptionsFileAndEnvVar(options); err != nil { | |
| logger.Fatalf(ctx, "Failed to load pipeline options to worker: %v", err) |
beam/sdks/java/container/boot.go
Lines 126 to 127 in 928ad7e
| if err := tools.MakePipelineOptionsFileAndEnvVar(options); err != nil { | |
| logger.Fatalf(ctx, "Failed to load pipeline options to worker: %v", err) |
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to redefine this function? I see we already have that at
| func MakePipelineOptionsFileAndEnvVar(options string) error { |
boot.go atbeam/sdks/python/container/boot.go
Line 38 in 928ad7e
| "github.com/apache/beam/sdks/v2/go/container/tools" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove unnecessary comments.