From be7f9094c41a4024f16e78d55c9883ed396404bc Mon Sep 17 00:00:00 2001 From: Bynn Lee Date: Fri, 22 Nov 2024 14:21:36 -0500 Subject: [PATCH] DEVPROD-9735 Ignore error while building file list during s3 uploads (#8490) --- agent/command/s3_put.go | 12 +++++++++--- config.go | 2 +- go.mod | 2 +- go.sum | 4 ++-- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/agent/command/s3_put.go b/agent/command/s3_put.go index 3d2897ae719..205ec3d4e6d 100644 --- a/agent/command/s3_put.go +++ b/agent/command/s3_put.go @@ -379,11 +379,17 @@ retryLoop: } filesList, err = b.Build() if err != nil { - return errors.Wrapf(err, "processing local files include filter '%s'", - strings.Join(s3pc.LocalFilesIncludeFilter, " ")) + // Skip erroring since local files include filter should treat files as optional. + if strings.Contains(err.Error(), utility.WalkThroughError) { + logger.Task().Warningf("Error while building file list: %s", err.Error()) + return nil + } else { + return errors.Wrapf(err, "processing local files include filter '%s'", + strings.Join(s3pc.LocalFilesIncludeFilter, " ")) + } } if len(filesList) == 0 { - logger.Task().Infof("File filter '%s' matched no files.", strings.Join(s3pc.LocalFilesIncludeFilter, " ")) + logger.Task().Warningf("File filter '%s' matched no files.", strings.Join(s3pc.LocalFilesIncludeFilter, " ")) return nil } } diff --git a/config.go b/config.go index 397af71e337..567fb9b4eba 100644 --- a/config.go +++ b/config.go @@ -37,7 +37,7 @@ var ( // Agent version to control agent rollover. The format is the calendar date // (YYYY-MM-DD). - AgentVersion = "2024-11-20" + AgentVersion = "2024-11-21" ) const ( diff --git a/go.mod b/go.mod index e4383804dfc..5d72e2081c4 100644 --- a/go.mod +++ b/go.mod @@ -27,7 +27,7 @@ require ( github.com/evergreen-ci/poplar v0.0.0-20241014191612-891426af27cb github.com/evergreen-ci/shrub v0.0.0-20231121224157-600e066f9de6 github.com/evergreen-ci/timber v0.0.0-20240509150854-9d66df03b40e - github.com/evergreen-ci/utility v0.0.0-20241104181620-267066777913 + github.com/evergreen-ci/utility v0.0.0-20241121161208-c965546993da github.com/golang-jwt/jwt v3.2.2+incompatible github.com/google/go-github/v52 v52.0.0 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 diff --git a/go.sum b/go.sum index 9e277943450..318c8782de9 100644 --- a/go.sum +++ b/go.sum @@ -267,8 +267,8 @@ github.com/evergreen-ci/timber v0.0.0-20240509150854-9d66df03b40e/go.mod h1:dOoy github.com/evergreen-ci/utility v0.0.0-20211026201827-97b21fa2660a/go.mod h1:fuEDytmDhOv+UCUwRPG/qD7mjVkUgx37KEv+thUgHVk= github.com/evergreen-ci/utility v0.0.0-20220404192535-d16eb64796e6/go.mod h1:wSui4nRyDZzm2db7Ju7ZzBAelLyVLmcTPJEIh1IdSrc= github.com/evergreen-ci/utility v0.0.0-20230104160902-3f0e05a638bd/go.mod h1:vkCEVgfCMIDajzbG/PHZURszI2Y1SuFqNWX9EUxmLLI= -github.com/evergreen-ci/utility v0.0.0-20241104181620-267066777913 h1:3rQZj320TrlMKANWd69q80EJzKA5cChbnF+jiYYBUA4= -github.com/evergreen-ci/utility v0.0.0-20241104181620-267066777913/go.mod h1:SHfOAE51SKTA4NLJFvm046A4CNLDr0gfRTQoTM5l1Zc= +github.com/evergreen-ci/utility v0.0.0-20241121161208-c965546993da h1:KSHVyL7d0Ymmaa0hJ1TV13+ngn610ZU3AWRXtbfHr7g= +github.com/evergreen-ci/utility v0.0.0-20241121161208-c965546993da/go.mod h1:SHfOAE51SKTA4NLJFvm046A4CNLDr0gfRTQoTM5l1Zc= github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=