From 7823f582e810950af58d9075568c74efea9abed2 Mon Sep 17 00:00:00 2001 From: liferoad Date: Fri, 11 Oct 2024 12:44:56 -0400 Subject: [PATCH] Do not fail the job when submission_environment_dependencies.txt cannot be loaded --- 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 696604c64886d..b7cbc07dca68d 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