Skip to content

Commit

Permalink
DEVPROD-9735 Ignore error while building file list during s3 uploads (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
bynn authored Nov 22, 2024
1 parent a8566cc commit be7f909
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
12 changes: 9 additions & 3 deletions agent/command/s3_put.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
2 changes: 1 addition & 1 deletion config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit be7f909

Please sign in to comment.