Skip to content

Commit 870540a

Browse files
committed
Review comments
1 parent b0cc2e3 commit 870540a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

utils/artefacts/artefacts.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func (m *ArtefactManager[M, D, L, C]) DownloadAllJobArtefactsWithOptions(ctx con
389389
}
390390
collatedDownloadErrors = append(collatedDownloadErrors, downloadErr)
391391
if dlOpts.Logger != nil {
392-
dlOpts.Logger.Log(fmt.Sprintf("could not download %s", artefactName))
392+
dlOpts.Logger.LogError(downloadErr)
393393
}
394394
} else if !reflection.IsEmpty(artefactName) {
395395
if dlOpts.Logger != nil {

utils/artefacts/options.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,21 @@ func NewDownloadOptions(opts ...DownloadOption) (options *DownloadOptions) {
3131
return
3232
}
3333

34+
// WithStopOnFirstError specifies whether the Arteftact manager will stop downloading artefacts if it encounters an error from one of the artefacts.
3435
func WithStopOnFirstError(stop bool) DownloadOption {
3536
return func(o *DownloadOptions) {
3637
o.StopOnFirstError = stop
3738
}
3839
}
3940

41+
// WithMaintainStructure specifies whether to keep the tree structure of the artefacts or not in the output directory.
4042
func WithMaintainStructure(maintain bool) DownloadOption {
4143
return func(o *DownloadOptions) {
4244
o.MaintainTreeStructure = maintain
4345
}
4446
}
4547

48+
// WithLogger specifies an optional logger that is used to log downloading artefacts or errors encountered while downloading.
4649
func WithLogger(l logs.Loggers) DownloadOption {
4750
return func(o *DownloadOptions) {
4851
o.Logger = l

0 commit comments

Comments
 (0)