Skip to content

Commit

Permalink
move timestamp up such that it is not skipped (#2046)
Browse files Browse the repository at this point in the history
Signed-off-by: pxp928 <parth.psu@gmail.com>
  • Loading branch information
pxp928 authored Jul 25, 2024
1 parent a0762a6 commit 0c6dc86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/handler/collector/deps_dev/deps_dev.go
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,9 @@ func (d *depsCollector) fetchDependencies(ctx context.Context, purl string, docC
func (d *depsCollector) collectAdditionalMetadata(ctx context.Context, pkgType string, namespace *string, name string, version *string, pkgComponent *PackageComponent) error {
logger := logging.FromContext(ctx)

// add time when data was obtained
pkgComponent.UpdateTime = time.Now().UTC()

// skip all type guac as they are generated by guac and will not be found in deps.dev
if pkgType == "guac" {
return fmt.Errorf("guac purl, skipping deps.dev query: %s", strings.Join([]string{pkgType, *namespace, name}, "/"))
Expand Down Expand Up @@ -634,9 +637,6 @@ func (d *depsCollector) collectAdditionalMetadata(ctx context.Context, pkgType s
}
}

// add time when data was obtained
pkgComponent.UpdateTime = time.Now().UTC()

return nil
}

Expand Down

0 comments on commit 0c6dc86

Please sign in to comment.