Skip to content

Commit

Permalink
fix: vap error logging for rego only templates, cherry-pick (#3520) (#…
Browse files Browse the repository at this point in the history
…3525)

Signed-off-by: martijnvdp <m.vanderploeg@nl.ccv.eu>
Signed-off-by: Jaydip Gabani <gabanijaydip@gmail.com>
Co-authored-by: Martijn van der Ploeg <73637849+martijnvdp@users.noreply.github.com>
  • Loading branch information
JaydipGabani and martijnvdp authored Sep 6, 2024
1 parent d01aa68 commit 0cb7ef2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ func (r *ReconcileConstraintTemplate) Reconcile(ctx context.Context, request rec
return reconcile.Result{}, err
}
generateVap, err := constraint.ShouldGenerateVAP(unversionedCT)
if err != nil || !errors.Is(err, celSchema.ErrCodeNotDefined) {
if err != nil && !errors.Is(err, celSchema.ErrCodeNotDefined) {
logger.Error(err, "generateVap error")
}
logger.Info("generateVap", "r.generateVap", generateVap)
Expand Down

0 comments on commit 0cb7ef2

Please # to comment.