Skip to content

Commit 0651f69

Browse files
committed
Revert "[content-service] log duration for s3 download and tar extract (#18829)"
This reverts commit ac8d3e2.
1 parent d81ffd8 commit 0651f69

File tree

1 file changed

+1
-8
lines changed
  • components/content-service/pkg/storage

1 file changed

+1
-8
lines changed

components/content-service/pkg/storage/s3.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import (
1212
"os/exec"
1313
"path/filepath"
1414
"strings"
15-
"time"
1615

1716
"github.com/gitpod-io/gitpod/common-go/log"
1817
"github.com/gitpod-io/gitpod/content-service/pkg/archive"
@@ -309,14 +308,11 @@ func (s3st *s3Storage) download(ctx context.Context, destination string, obj str
309308
tempFile.Name(),
310309
}
311310
cmd := exec.Command("s5cmd", args...)
312-
downloadStart := time.Now()
313311
out, err := cmd.CombinedOutput()
314312
if err != nil {
315313
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")
317315
}
318-
downloadDuration := time.Since(downloadStart)
319-
log.WithField("downloadDuration", downloadDuration.String()).Info("S3 download duration")
320316

321317
tempFile, err = os.Open(tempFile.Name())
322318
if err != nil {
@@ -326,13 +322,10 @@ func (s3st *s3Storage) download(ctx context.Context, destination string, obj str
326322
defer os.Remove(tempFile.Name())
327323
defer tempFile.Close()
328324

329-
extractStart := time.Now()
330325
err = archive.ExtractTarbal(ctx, tempFile, destination, archive.WithUIDMapping(mappings), archive.WithGIDMapping(mappings))
331326
if err != nil {
332327
return true, xerrors.Errorf("tar %s: %s", destination, err.Error())
333328
}
334-
extractDuration := time.Since(extractStart)
335-
log.WithField("extractdDuration", extractDuration.String()).Info("tarbar extraction duration")
336329

337330
return true, nil
338331
}

0 commit comments

Comments
 (0)