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


##########
sdks/python/container/boot.go:
##########
@@ -580,10 +581,13 @@ func logRuntimeDependencies(ctx context.Context, 
bufLogger *tools.BufferedLogger
        }
        bufLogger.Printf(ctx, "Dependencies in %s:", phase)
        args = []string{"-m", "pip", "freeze", "--all"}
-       if err := execx.ExecuteEnvWithIO(nil, os.Stdin, bufLogger, bufLogger, 
pythonVersion, args...); err != nil {
+
+       var stdout bytes.Buffer
+       if err := execx.ExecuteEnvWithIO(nil, os.Stdin, &stdout, bufLogger, 
pythonVersion, args...); err != nil {

Review Comment:
   Added two helper functions and refactored the code. Also added docstrings to 
clarify Write and Printf APIs in BufferedLogger. PTAL



-- 
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