@@ -33,6 +33,7 @@ func (c *Client) DownloadFileGroupFromBuildCache(ctx context.Context, dd filegro
3333 }
3434 }
3535
36+ //nolint: gosec
3637 c .logger .TInfof ("(i) Downloading %d files, largest is %s" ,
3738 len (dd .Files ), humanize .Bytes (uint64 (largestFileSize )))
3839
@@ -90,13 +91,13 @@ func (c *Client) DownloadFileGroupFromBuildCache(ctx context.Context, dd filegro
9091 missingPlusFailed := filesMissing .Load () + filesFailedToDownload .Load ()
9192 switch {
9293 case errors .Is (err , ErrCacheNotFound ):
93- if missingPlusFailed < int32 ( maxLoggedDownloadErrors ) {
94+ if int ( missingPlusFailed ) < maxLoggedDownloadErrors {
9495 c .logger .Infof ("Cache entry not found for file %s (%s)" , file .Path , file .Hash )
9596 }
9697
9798 filesMissing .Add (1 )
9899 case err != nil :
99- if missingPlusFailed < int32 ( maxLoggedDownloadErrors ) {
100+ if int ( missingPlusFailed ) < maxLoggedDownloadErrors {
100101 c .logger .Errorf ("Failed to download file %s with error: %v" , file .Path , err )
101102 }
102103
@@ -110,6 +111,7 @@ func (c *Client) DownloadFileGroupFromBuildCache(ctx context.Context, dd filegro
110111
111112 wg .Wait ()
112113
114+ //nolint: gosec
113115 c .logger .TInfof ("(i) Downloaded: %d files (%s). Missing: %d files. Failed: %d files" , filesDownloaded .Load (), humanize .Bytes (uint64 (downloadSize .Load ())), filesMissing .Load (), filesFailedToDownload .Load ())
114116
115117 stats := DownloadFilesStats {
@@ -126,7 +128,9 @@ func (c *Client) DownloadFileGroupFromBuildCache(ctx context.Context, dd filegro
126128 c .logger .Debugf (" Files missing: %d" , stats .FilesMissing )
127129 c .logger .Debugf (" Files failed to download: %d" , stats .FilesFailedToDownload )
128130 c .logger .Debugf (" Files skipped (existing): %d" , skippedFiles .Load ())
131+ //nolint: gosec
129132 c .logger .Debugf (" Download size: %s" , humanize .Bytes (uint64 (stats .DownloadSize )))
133+ //nolint: gosec
130134 c .logger .Debugf (" Largest file size: %s" , humanize .Bytes (uint64 (stats .LargestFileSize )))
131135
132136 if maxLoggedDownloadErrors < stats .FilesFailedToDownload + stats .FilesMissing {
0 commit comments