@@ -12,7 +12,6 @@ import (
12
12
"os/exec"
13
13
"path/filepath"
14
14
"strings"
15
- "time"
16
15
17
16
"github.com/gitpod-io/gitpod/common-go/log"
18
17
"github.com/gitpod-io/gitpod/content-service/pkg/archive"
@@ -309,14 +308,11 @@ func (s3st *s3Storage) download(ctx context.Context, destination string, obj str
309
308
tempFile .Name (),
310
309
}
311
310
cmd := exec .Command ("s5cmd" , args ... )
312
- downloadStart := time .Now ()
313
311
out , err := cmd .CombinedOutput ()
314
312
if err != nil {
315
313
log .WithError (err ).WithField ("out" , string (out )).Error ("unexpected error downloading file" )
316
- return false , xerrors .Errorf ("unexpected error downloading file" )
314
+ return true , xerrors .Errorf ("unexpected error downloading file" )
317
315
}
318
- downloadDuration := time .Since (downloadStart )
319
- log .WithField ("downloadDuration" , downloadDuration .String ()).Info ("S3 download duration" )
320
316
321
317
tempFile , err = os .Open (tempFile .Name ())
322
318
if err != nil {
@@ -326,13 +322,10 @@ func (s3st *s3Storage) download(ctx context.Context, destination string, obj str
326
322
defer os .Remove (tempFile .Name ())
327
323
defer tempFile .Close ()
328
324
329
- extractStart := time .Now ()
330
325
err = archive .ExtractTarbal (ctx , tempFile , destination , archive .WithUIDMapping (mappings ), archive .WithGIDMapping (mappings ))
331
326
if err != nil {
332
327
return true , xerrors .Errorf ("tar %s: %s" , destination , err .Error ())
333
328
}
334
- extractDuration := time .Since (extractStart )
335
- log .WithField ("extractdDuration" , extractDuration .String ()).Info ("tarbar extraction duration" )
336
329
337
330
return true , nil
338
331
}
0 commit comments