From 8b8079d2d2e78a68f56eb35c5f2241212c6d3976 Mon Sep 17 00:00:00 2001 From: Aldo Culquicondor Date: Mon, 18 Jan 2021 13:36:03 -0500 Subject: [PATCH] Add Job.status.uncountedPodUIDs For tracking Job Pods that have finished but are not yet counted as failed or succeeded And feature gate JobTrackingWithFinalizers Change-Id: I3e080f3ec090922640384b692e88eaf9a544d3b5 Kubernetes-commit: bb56a0bd04891ae0a4aebeaeb4d145b32d9ad2d9 --- pkg/api/validation/objectmeta.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/api/validation/objectmeta.go b/pkg/api/validation/objectmeta.go index 4d9efe3f7..66e8d677a 100644 --- a/pkg/api/validation/objectmeta.go +++ b/pkg/api/validation/objectmeta.go @@ -143,7 +143,7 @@ func ValidateImmutableField(newVal, oldVal interface{}, fldPath *field.Path) fie func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { metadata, err := meta.Accessor(objMeta) if err != nil { - allErrs := field.ErrorList{} + var allErrs field.ErrorList allErrs = append(allErrs, field.Invalid(fldPath, objMeta, err.Error())) return allErrs } @@ -154,7 +154,7 @@ func ValidateObjectMeta(objMeta *metav1.ObjectMeta, requiresNamespace bool, name // been performed. // It doesn't return an error for rootscoped resources with namespace, because namespace should already be cleared before. func ValidateObjectMetaAccessor(meta metav1.Object, requiresNamespace bool, nameFn ValidateNameFunc, fldPath *field.Path) field.ErrorList { - allErrs := field.ErrorList{} + var allErrs field.ErrorList if len(meta.GetGenerateName()) != 0 { for _, msg := range nameFn(meta.GetGenerateName(), true) {