From 766dcca955039ae4fb8cff84c5d735756fa449fa Mon Sep 17 00:00:00 2001 From: Pavel Tumik <18602811+sagor999@users.noreply.github.com> Date: Tue, 4 Oct 2022 00:20:11 +0000 Subject: [PATCH] wip --- .../content-service/pkg/layer/provider.go | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/components/content-service/pkg/layer/provider.go b/components/content-service/pkg/layer/provider.go index 47c59a9b90c260..4c3bd9f981cfca 100644 --- a/components/content-service/pkg/layer/provider.go +++ b/components/content-service/pkg/layer/provider.go @@ -233,6 +233,44 @@ func (s *Provider) GetContentLayerPVC(ctx context.Context, owner, workspaceID st defer tracing.FinishSpan(span, &err) tracing.ApplyOWI(span, log.OWI(owner, workspaceID, "")) + log.Infof("initializer: %v", *initializer) + if initializer.GetEmpty() != nil { + log.Info("empty initializer") + } else if initializer.GetGit() != nil { + log.Info("git initializer") + } else if initializer.GetSnapshot() != nil { + log.Info("snapshot initializer") + } else if initializer.GetPrebuild() != nil { + log.Info("prebuild initializer") + } else if initializer.GetBackup() != nil { + log.Info("backup initializer") + } else if initializer.GetComposite() != nil { + log.Info("composite initializer") + for init := range initializer.GetComposite().Initializer { + initializer := initializer.GetComposite().Initializer[init] + log.Infof("initializer: %v", *initializer) + if initializer.GetEmpty() != nil { + log.Info("empty initializer ") + } else if initializer.GetGit() != nil { + log.Info("git initializer") + } else if initializer.GetSnapshot() != nil { + log.Info("snapshot initializer") + } else if initializer.GetPrebuild() != nil { + log.Info("prebuild initializer") + } else if initializer.GetBackup() != nil { + log.Info("backup initializer") + } else if initializer.GetDownload() != nil { + log.Info("download initializer") + } else { + log.Info("unknown initializer") + } + } + } else if initializer.GetDownload() != nil { + log.Info("download initializer") + } else { + log.Info("unknown initializer") + } + defer func() { // we never return a nil manifest, just maybe an empty one if manifest == nil {