diff --git a/pkg/certifier/components/root_package/root_package.go b/pkg/certifier/components/root_package/root_package.go index e1e4d2f163..1455b28617 100644 --- a/pkg/certifier/components/root_package/root_package.go +++ b/pkg/certifier/components/root_package/root_package.go @@ -23,6 +23,7 @@ import ( "github.com/Khan/genqlient/graphql" "github.com/guacsec/guac/pkg/assembler/clients/generated" "github.com/guacsec/guac/pkg/certifier" + "github.com/guacsec/guac/pkg/logging" ) const guacType string = "guac" @@ -66,6 +67,15 @@ func (p *packageQuery) GetComponents(ctx context.Context, compChan chan<- interf return fmt.Errorf("compChan cannot be nil") } + // logger + logger := logging.FromContext(ctx) + if p.lastScan != nil { + lastScanTime := time.Now().Add(time.Duration(-*p.lastScan) * time.Hour).UTC() + logger.Infof("last-scan set to: %d hours, last scan time set to: %v", *p.lastScan, lastScanTime) + } else { + logger.Infof("last-scan not set, running on full package list") + } + tickInterval := 5 * time.Second // nodeChan to receive components