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


##########
sdks/python/container/boot.go:
##########
@@ -485,20 +493,20 @@ func processArtifactsInSetupOnlyMode() {
 
 // logRuntimeDependencies logs the python dependencies
 // installed in the runtime environment.
-func logRuntimeDependencies(ctx context.Context, bufLogger 
*tools.BufferedLogger) error {
+func logRuntimeDependencies(ctx context.Context, bufLogger 
*tools.BufferedLogger, phase string) error {
        pythonVersion, err := expansionx.GetPythonVersion()
        if err != nil {
                return err
        }
-       bufLogger.Printf(ctx, "Using Python version:")
+       bufLogger.Printf(ctx, "Using Python version (%s):", phase)
        args := []string{"--version"}
        if err := execx.ExecuteEnvWithIO(nil, os.Stdin, bufLogger, bufLogger, 
pythonVersion, args...); err != nil {
                bufLogger.FlushAtError(ctx)
        } else {
                bufLogger.FlushAtDebug(ctx)
        }
-       bufLogger.Printf(ctx, "Logging runtime dependencies:")
-       args = []string{"-m", "pip", "freeze"}
+       bufLogger.Printf(ctx, "Logging runtime dependencies (%s):", phase)
+       args = []string{"-m", "pip", "freeze", "--all"}

Review Comment:
   The argument "--all" ensures that the versions of pip, setuptools, etc are 
included in the result.



##########
sdks/python/container/boot.go:
##########
@@ -485,20 +493,20 @@ func processArtifactsInSetupOnlyMode() {
 
 // logRuntimeDependencies logs the python dependencies
 // installed in the runtime environment.
-func logRuntimeDependencies(ctx context.Context, bufLogger 
*tools.BufferedLogger) error {
+func logRuntimeDependencies(ctx context.Context, bufLogger 
*tools.BufferedLogger, phase string) error {
        pythonVersion, err := expansionx.GetPythonVersion()
        if err != nil {
                return err
        }
-       bufLogger.Printf(ctx, "Using Python version:")
+       bufLogger.Printf(ctx, "Using Python version (%s):", phase)
        args := []string{"--version"}
        if err := execx.ExecuteEnvWithIO(nil, os.Stdin, bufLogger, bufLogger, 
pythonVersion, args...); err != nil {
                bufLogger.FlushAtError(ctx)
        } else {
                bufLogger.FlushAtDebug(ctx)
        }
-       bufLogger.Printf(ctx, "Logging runtime dependencies:")
-       args = []string{"-m", "pip", "freeze"}
+       bufLogger.Printf(ctx, "Logging runtime dependencies (%s):", phase)
+       args = []string{"-m", "pip", "freeze", "--all"}

Review Comment:
   The argument `"--all"` ensures that the versions of pip, setuptools, etc are 
included in the result.



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