Skip to content

Commit 2b94cf7

Browse files
committed
wip
1 parent 1eb148d commit 2b94cf7

File tree

6 files changed

+0
-26
lines changed

6 files changed

+0
-26
lines changed

components/content-service/pkg/initializer/snapshot.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"github.com/opentracing/opentracing-go"
1111
"golang.org/x/xerrors"
1212

13-
"github.com/gitpod-io/gitpod/common-go/log"
1413
"github.com/gitpod-io/gitpod/common-go/tracing"
1514
csapi "github.com/gitpod-io/gitpod/content-service/api"
1615
"github.com/gitpod-io/gitpod/content-service/pkg/archive"
@@ -33,9 +32,7 @@ func (s *SnapshotInitializer) Run(ctx context.Context, mappings []archive.IDMapp
3332

3433
src = csapi.WorkspaceInitFromBackup
3534

36-
log.Infof("SnapshotInitializer Run: %s, %s, %v", s.Location, s.Snapshot, mappings)
3735
ok, err := s.Storage.DownloadSnapshot(ctx, s.Location, s.Snapshot, mappings)
38-
log.Infof("SnapshotInitializer Run result: ok: %v, err: %v", ok, err)
3936
if err != nil {
4037
return src, xerrors.Errorf("snapshot initializer: %w", err)
4138
}

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,6 @@ func (rs *DirectGCPStorage) download(ctx context.Context, destination string, bk
191191
defer tracing.FinishSpan(span, &err)
192192

193193
rc, _, err := rs.ObjectAccess(ctx, bkt, obj)
194-
log.Infof("rc: %v, err: %v", rc, err)
195194
if rc == nil {
196195
return false, err
197196
}
@@ -257,14 +256,11 @@ func (rs *DirectGCPStorage) Download(ctx context.Context, destination string, na
257256

258257
// DownloadSnapshot downloads a snapshot. The snapshot name is expected to be one produced by Qualify
259258
func (rs *DirectGCPStorage) DownloadSnapshot(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (bool, error) {
260-
log.Info("GCP DownloadSnapshot")
261259
bkt, obj, err := ParseSnapshotName(name)
262260
if err != nil {
263261
return false, err
264262
}
265263

266-
log.Infof("bkt: %s, obj: %s", bkt, obj)
267-
268264
return rs.download(ctx, destination, bkt, obj, mappings)
269265
}
270266

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ func (rs *DirectMinIOStorage) download(ctx context.Context, destination string,
204204
defer tracing.FinishSpan(span, &err)
205205

206206
rc, err := rs.ObjectAccess(ctx, bkt, obj)
207-
log.Infof("ObjectAccess: %v, %v", rc, err)
208207
if rc == nil {
209208
return false, err
210209
}
@@ -225,12 +224,10 @@ func (rs *DirectMinIOStorage) Download(ctx context.Context, destination string,
225224

226225
// DownloadSnapshot downloads a snapshot. The snapshot name is expected to be one produced by Qualify
227226
func (rs *DirectMinIOStorage) DownloadSnapshot(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (bool, error) {
228-
log.Infof("minio DownloadSnapshot")
229227
bkt, obj, err := ParseSnapshotName(name)
230228
if err != nil {
231229
return false, err
232230
}
233-
log.Infof("bkt %s, obj %s", bkt, obj)
234231

235232
return rs.download(ctx, destination, bkt, obj, mappings)
236233
}

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010

1111
"golang.org/x/xerrors"
1212

13-
"github.com/gitpod-io/gitpod/common-go/log"
1413
"github.com/gitpod-io/gitpod/content-service/pkg/archive"
1514
)
1615

@@ -53,6 +52,5 @@ func (d *NamedURLDownloader) Download(ctx context.Context, destination string, n
5352

5453
// DownloadSnapshot downloads a snapshot.
5554
func (d *NamedURLDownloader) DownloadSnapshot(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (found bool, err error) {
56-
log.Info("NamedURLDownloader")
5755
return d.Download(ctx, destination, name, mappings)
5856
}

components/ws-daemon/pkg/content/initializer.go

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ var (
6868
func collectRemoteContent(ctx context.Context, rs storage.DirectAccess, ps storage.PresignedAccess, workspaceOwner string, initializer *csapi.WorkspaceInitializer) (rc map[string]storage.DownloadInfo, err error) {
6969
rc = make(map[string]storage.DownloadInfo)
7070

71-
log.Infof("collectRemoteContent: %s, %s", workspaceOwner, storage.DefaultBackup)
7271
backup, err := ps.SignDownload(ctx, rs.Bucket(workspaceOwner), rs.BackupObject(storage.DefaultBackup), &storage.SignedURLOptions{})
73-
log.Infof("ps.SignDownload result: %v, %v", backup, err)
7472
if err == storage.ErrNotFound {
7573
// no backup found - that's fine
7674
} else if err != nil {
@@ -79,12 +77,9 @@ func collectRemoteContent(ctx context.Context, rs storage.DirectAccess, ps stora
7977
rc[storage.DefaultBackup] = *backup
8078
}
8179

82-
log.Infof("Initializer=%v", initializer)
83-
8480
si := initializer.GetSnapshot()
8581
pi := initializer.GetPrebuild()
8682
if ci := initializer.GetComposite(); ci != nil {
87-
log.Infof("Composite initializer")
8883
for _, c := range ci.Initializer {
8984
if c.GetSnapshot() != nil {
9085
si = c.GetSnapshot()
@@ -96,12 +91,10 @@ func collectRemoteContent(ctx context.Context, rs storage.DirectAccess, ps stora
9691
}
9792
if si != nil {
9893
bkt, obj, err := storage.ParseSnapshotName(si.Snapshot)
99-
log.Infof("ParseSnapshotName: %s, %s, %s", si.Snapshot, bkt, obj)
10094
if err != nil {
10195
return nil, err
10296
}
10397
info, err := ps.SignDownload(ctx, bkt, obj, &storage.SignedURLOptions{})
104-
log.Infof("ps.SignDownload: %v, %v", info, err)
10598
if err == storage.ErrNotFound {
10699
return nil, errCannotFindSnapshot
107100
}
@@ -385,12 +378,7 @@ func (rs *remoteContentStorage) EnsureExists(ctx context.Context) error {
385378

386379
// Download always returns false and does nothing
387380
func (rs *remoteContentStorage) Download(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (exists bool, err error) {
388-
log.Infof("Download: name: %s", name)
389-
for k, v := range rs.RemoteContent {
390-
log.Infof("RemoteContent[%s]=%v", k, v)
391-
}
392381
info, exists := rs.RemoteContent[name]
393-
log.Infof("Download: %v, %v", info, exists)
394382
if !exists {
395383
return false, nil
396384
}
@@ -411,7 +399,6 @@ func (rs *remoteContentStorage) Download(ctx context.Context, destination string
411399

412400
// DownloadSnapshot always returns false and does nothing
413401
func (rs *remoteContentStorage) DownloadSnapshot(ctx context.Context, destination string, name string, mappings []archive.IDMapping) (bool, error) {
414-
log.Infof("DownloadSnapshot: %s, %s", destination, name)
415402
return rs.Download(ctx, destination, name, mappings)
416403
}
417404

components/ws-daemon/pkg/content/service.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,6 @@ func (s *WorkspaceService) InitWorkspace(ctx context.Context, req *api.InitWorks
197197
}
198198

199199
remoteContent, err = collectRemoteContent(ctx, rs, ps, workspace.Owner, req.Initializer)
200-
log.Infof("collectRemoteContent error: %v", err)
201200
if err != nil && errors.Is(err, errCannotFindSnapshot) {
202201
log.WithError(err).Error("cannot find snapshot")
203202
return nil, status.Error(codes.NotFound, "cannot find snapshot")

0 commit comments

Comments
 (0)