From b6e7fd92e5a633187c3062f32d3e6f44a2301ff1 Mon Sep 17 00:00:00 2001 From: liferoad Date: Fri, 11 Oct 2024 14:16:07 -0400 Subject: [PATCH] Do not fail the job when submission_environment_dependencies.txt cannot be loaded (#32752) --- sdks/python/container/boot.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sdks/python/container/boot.go b/sdks/python/container/boot.go index 696604c64886..b7cbc07dca68 100644 --- a/sdks/python/container/boot.go +++ b/sdks/python/container/boot.go @@ -189,7 +189,12 @@ func launchSDKProcess() error { fmtErr := fmt.Errorf("failed to retrieve staged files: %v", err) // Send error message to logging service before returning up the call stack logger.Errorf(ctx, fmtErr.Error()) - return fmtErr + // No need to fail the job if submission_environment_dependencies.txt cannot be loaded + if strings.Contains(fmtErr.Error(), "submission_environment_dependencies.txt") { + logger.Printf(ctx, "Ignore the error when loading submission_environment_dependencies.txt.") + } else { + return fmtErr + } } // TODO(herohde): the packages to install should be specified explicitly. It