From 93df4a9479ff568d0ba152f4eda24b5be2038c60 Mon Sep 17 00:00:00 2001 From: Electronic-Waste <2690692950@qq.com> Date: Fri, 12 Jul 2024 15:27:37 +0000 Subject: [PATCH] fix: change nil error to allErrs(deleted by accident). Signed-off-by: Electronic-Waste <2690692950@qq.com> --- pkg/webhook/v1beta1/experiment/validator/validator.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/webhook/v1beta1/experiment/validator/validator.go b/pkg/webhook/v1beta1/experiment/validator/validator.go index cf865fe529e..56bde4b0621 100644 --- a/pkg/webhook/v1beta1/experiment/validator/validator.go +++ b/pkg/webhook/v1beta1/experiment/validator/validator.go @@ -489,7 +489,7 @@ func (g *DefaultValidator) validateMetricsCollector(inst *experimentsv1beta1.Exp // TODO(hougangliu): log warning message if some field will not be used for the metricsCollector kind switch mcKind { case commonapiv1beta1.PushCollector, commonapiv1beta1.StdOutCollector: - return nil + return allErrs case commonapiv1beta1.FileCollector: if mcSpec.Source == nil || mcSpec.Source.FileSystemPath == nil || mcSpec.Source.FileSystemPath.Kind != commonapiv1beta1.FileKind || !filepath.IsAbs(mcSpec.Source.FileSystemPath.Path) {