shunping commented on code in PR #39288: URL: https://github.com/apache/beam/pull/39288#discussion_r3685556420
########## sdks/python/container/piputil.go: ########## @@ -41,6 +41,24 @@ var ( const pipLogFlushInterval time.Duration = 15 * time.Second const unrecoverableURL string = "https://beam.apache.org/documentation/sdks/python-unrecoverable-errors/index.html#pip-dependency-resolution-failures" +// executeWithLogger runs the program with os.Stdin, piping stdout and stderr to bufLogger, +// and flushes bufLogger based on the execution result. +func executeWithLogger(ctx context.Context, bufLogger *tools.BufferedLogger, prog string, args ...string) error { + err := execx.ExecuteEnvWithIO(nil, os.Stdin, bufLogger, bufLogger, prog, args...) + return bufLogger.Flush(ctx, err) +} + +// executeWithOutput runs the program with os.Stdin, capturing stdout in a byte buffer +// while piping stderr to bufLogger, and flushes bufLogger based on the execution result. Review Comment: Fixed. ########## sdks/python/container/piputil.go: ########## @@ -41,6 +41,24 @@ var ( const pipLogFlushInterval time.Duration = 15 * time.Second const unrecoverableURL string = "https://beam.apache.org/documentation/sdks/python-unrecoverable-errors/index.html#pip-dependency-resolution-failures" +// executeWithLogger runs the program with os.Stdin, piping stdout and stderr to bufLogger, +// and flushes bufLogger based on the execution result. Review Comment: Fixed. -- 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]
