Skip to content

Commit

Permalink
fix: fix package name and version in the log for installing slsa-veri…
Browse files Browse the repository at this point in the history
…fier, cosign, and aqua-proxy (#1964)

* fix: fix package name and version in the log for installing slsa-verifier, cosign, and aqua-proxy

* fix: wrap errors with fmt.Errorf
  • Loading branch information
suzuki-shunsuke committed May 6, 2023
1 parent aab9aec commit dd54a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions pkg/controller/install/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,8 @@ func (ctrl *Controller) Install(ctx context.Context, logE *logrus.Entry, param *
return fmt.Errorf("create the directory: %w", err)
}
}

if err := ctrl.packageInstaller.InstallProxy(ctx, logE); err != nil {
return err //nolint:wrapcheck
return fmt.Errorf("install aqua-proxy: %w", err)
}
}

Expand Down
4 changes: 2 additions & 2 deletions pkg/installpackage/download.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (inst *InstallerImpl) download(ctx context.Context, logE *logrus.Entry, par
art := ppkg.GetTemplateArtifact(inst.runtime, param.Asset)
logE.Info("verify a package with Cosign")
if err := inst.cosignInstaller.installCosign(ctx, logE, cosign.Version); err != nil {
return err
return fmt.Errorf("install sigstore/cosign: %w", err)
}
if err := inst.cosign.Verify(ctx, logE, inst.runtime, &download.File{
RepoOwner: ppkg.PackageInfo.RepoOwner,
Expand All @@ -115,7 +115,7 @@ func (inst *InstallerImpl) download(ctx context.Context, logE *logrus.Entry, par
art := ppkg.GetTemplateArtifact(inst.runtime, param.Asset)
logE.Info("verify a package with slsa-verifier")
if err := inst.slsaVerifierInstaller.installSLSAVerifier(ctx, logE, slsa.Version); err != nil {
return err
return fmt.Errorf("install slsa-verifier: %w", err)
}
if err := inst.slsaVerifier.Verify(ctx, logE, inst.runtime, sp, art, &download.File{
RepoOwner: ppkg.PackageInfo.RepoOwner,
Expand Down

0 comments on commit dd54a85

Please sign in to comment.