This job view page is being replaced by Spyglass soon. Check out the new job view.
PRkevindelgado: server-side metadata unknown field validation
ResultFAILURE
Tests 1 failed / 2 succeeded
Started2022-07-12 18:21
Elapsed3m11s
Revision7783bf0247e303d6ae7bfd04ce3b3eae8553763d
Refs 109494

Test Failures


verify vendor 2m2s

make verify WHAT=vendor
Your vendored results are different:
diff -Naupr -x BUILD -x 'AUTHORS*' -x 'CONTRIBUTORS*' vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go
--- vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go	2022-07-12 18:21:35.042345283 +0000
+++ /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/internal/golang/encoding/json/decode.go	2022-07-12 18:24:16.933126968 +0000
@@ -695,7 +695,7 @@ func (d *decodeState) object(v reflect.V
 					seenKeys = map[string]struct{}{}
 				}
 				if _, seen := seenKeys[fieldName]; seen {
-					d.saveStrictError(d.newFieldError(duplicateStrictErrType, fieldName))
+					d.saveStrictError(d.newFieldError("duplicate field", fieldName))
 				} else {
 					seenKeys[fieldName] = struct{}{}
 				}
@@ -711,7 +711,7 @@ func (d *decodeState) object(v reflect.V
 				var seenKeys uint64
 				checkDuplicateField = func(fieldNameIndex int, fieldName string) {
 					if seenKeys&(1<<fieldNameIndex) != 0 {
-						d.saveStrictError(d.newFieldError(duplicateStrictErrType, fieldName))
+						d.saveStrictError(d.newFieldError("duplicate field", fieldName))
 					} else {
 						seenKeys = seenKeys | (1 << fieldNameIndex)
 					}
@@ -724,7 +724,7 @@ func (d *decodeState) object(v reflect.V
 						seenIndexes = make([]bool, len(fields.list))
 					}
 					if seenIndexes[fieldNameIndex] {
-						d.saveStrictError(d.newFieldError(duplicateStrictErrType, fieldName))
+						d.saveStrictError(d.newFieldError("duplicate field", fieldName))
 					} else {
 						seenIndexes[fieldNameIndex] = true
 					}
@@ -836,7 +836,7 @@ func (d *decodeState) object(v reflect.V
 				d.errorContext.Struct = t
 				d.appendStrictFieldStackKey(f.name)
 			} else if d.disallowUnknownFields {
-				d.saveStrictError(d.newFieldError(unknownStrictErrType, string(key)))
+				d.saveStrictError(d.newFieldError("unknown field", string(key)))
 			}
 		}
 
@@ -1231,7 +1231,7 @@ func (d *decodeState) objectInterface()
 
 		if d.disallowDuplicateFields {
 			if _, exists := m[key]; exists {
-				d.saveStrictError(d.newFieldError(duplicateStrictErrType, key))
+				d.saveStrictError(d.newFieldError("duplicate field", key))
 			}
 		}
 
diff -Naupr -x BUILD -x 'AUTHORS*' -x 'CONTRIBUTORS*' vendor/sigs.k8s.io/json/internal/golang/encoding/json/kubernetes_patch.go /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/internal/golang/encoding/json/kubernetes_patch.go
--- vendor/sigs.k8s.io/json/internal/golang/encoding/json/kubernetes_patch.go	2022-07-12 18:21:35.042345283 +0000
+++ /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/internal/golang/encoding/json/kubernetes_patch.go	2022-07-12 18:24:16.933126968 +0000
@@ -18,6 +18,7 @@ package json
 
 import (
 	gojson "encoding/json"
+	"fmt"
 	"strconv"
 	"strings"
 )
@@ -70,23 +71,17 @@ func (d *Decoder) DisallowDuplicateField
 	d.d.disallowDuplicateFields = true
 }
 
-func (d *decodeState) newFieldError(errType strictErrType, field string) *strictError {
+func (d *decodeState) newFieldError(msg, field string) error {
 	if len(d.strictFieldStack) > 0 {
-		return &strictError{
-			ErrType: errType,
-			Path:    strings.Join(d.strictFieldStack, "") + "." + field,
-		}
+		return fmt.Errorf("%s %q", msg, strings.Join(d.strictFieldStack, "")+"."+field)
 	} else {
-		return &strictError{
-			ErrType: errType,
-			Path:    field,
-		}
+		return fmt.Errorf("%s %q", msg, field)
 	}
 }
 
 // saveStrictError saves a strict decoding error,
 // for reporting at the end of the unmarshal if no other errors occurred.
-func (d *decodeState) saveStrictError(err *strictError) {
+func (d *decodeState) saveStrictError(err error) {
 	// prevent excessive numbers of accumulated errors
 	if len(d.savedStrictErrors) >= 100 {
 		return
@@ -123,33 +118,6 @@ func (d *decodeState) appendStrictFieldS
 	d.strictFieldStack = append(d.strictFieldStack, "[", strconv.Itoa(i), "]")
 }
 
-type strictErrType string
-
-const (
-	unknownStrictErrType   strictErrType = "unknown field"
-	duplicateStrictErrType strictErrType = "duplicate field"
-)
-
-// strictError is a strict decoding error
-// It has an ErrType (either unknown or duplicate)
-// and a path to the erroneous field
-type strictError struct {
-	ErrType strictErrType
-	Path    string
-}
-
-func (e *strictError) Error() string {
-	return string(e.ErrType) + " " + strconv.Quote(e.Path)
-}
-
-func (e *strictError) FieldPath() string {
-	return e.Path
-}
-
-func (e *strictError) SetFieldPath(path string) {
-	e.Path = path
-}
-
 // UnmarshalStrictError holds errors resulting from use of strict disallow___ decoder directives.
 // If this is returned from Unmarshal(), it means the decoding was successful in all other respects.
 type UnmarshalStrictError struct {
diff -Naupr -x BUILD -x 'AUTHORS*' -x 'CONTRIBUTORS*' vendor/sigs.k8s.io/json/json.go /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/json.go
--- vendor/sigs.k8s.io/json/json.go	2022-07-12 18:21:35.042345283 +0000
+++ /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/json.go	2022-07-12 18:24:16.933126968 +0000
@@ -137,11 +137,3 @@ func SyntaxErrorOffset(err error) (isSyn
 		return false, 0
 	}
 }
-
-// FieldError are errors that provide access to
-// the path of the erroneous field
-type FieldError interface {
-	Error() string
-	FieldPath() string
-	SetFieldPath(path string)
-}
Vendor Verify failed.
If you're seeing this locally, run the below command to fix your directories:
hack/update-vendor.sh
Check all unwanted dependencies and update its status.
All pinned versions of checked dependencies match their preferred version.
				
				Click to see stdout/stderrfrom junit_verify.xml

Filter through log files | View test history on testgrid


Show 2 Passed Tests

Error lines from build-log.txt

... skipping 480 lines ...
 )
@@ -70,23 +71,17 @@ func (d *Decoder) DisallowDuplicateField
 	d.d.disallowDuplicateFields = true
 }
 
-func (d *decodeState) newFieldError(errType strictErrType, field string) *strictError {
+func (d *decodeState) newFieldError(msg, field string) error {
 	if len(d.strictFieldStack) > 0 {
-		return &strictError{
-			ErrType: errType,
-			Path:    strings.Join(d.strictFieldStack, "") + "." + field,
-		}
+		return fmt.Errorf("%s %q", msg, strings.Join(d.strictFieldStack, "")+"."+field)
... skipping 3 lines ...
-			Path:    field,
-		}
+		return fmt.Errorf("%s %q", msg, field)
 	}
 }
 
 // saveStrictError saves a strict decoding error,
 // for reporting at the end of the unmarshal if no other errors occurred.
-func (d *decodeState) saveStrictError(err *strictError) {
+func (d *decodeState) saveStrictError(err error) {
 	// prevent excessive numbers of accumulated errors
 	if len(d.savedStrictErrors) >= 100 {
 		return
@@ -123,33 +118,6 @@ func (d *decodeState) appendStrictFieldS
 	d.strictFieldStack = append(d.strictFieldStack, "[", strconv.Itoa(i), "]")
 }
... skipping 2 lines ...
-
-const (
-	unknownStrictErrType   strictErrType = "unknown field"
-	duplicateStrictErrType strictErrType = "duplicate field"
-)
-
-// strictError is a strict decoding error
-// It has an ErrType (either unknown or duplicate)
-// and a path to the erroneous field
-type strictError struct {
-	ErrType strictErrType
-	Path    string
-}
-
-func (e *strictError) Error() string {
-	return string(e.ErrType) + " " + strconv.Quote(e.Path)
-}
-
-func (e *strictError) FieldPath() string {
-	return e.Path
-}
... skipping 5 lines ...
 // UnmarshalStrictError holds errors resulting from use of strict disallow___ decoder directives.
 // If this is returned from Unmarshal(), it means the decoding was successful in all other respects.
 type UnmarshalStrictError struct {
diff -Naupr -x BUILD -x 'AUTHORS*' -x 'CONTRIBUTORS*' vendor/sigs.k8s.io/json/json.go /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/json.go
--- vendor/sigs.k8s.io/json/json.go	2022-07-12 18:21:35.042345283 +0000
+++ /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO/kubernetes/vendor/sigs.k8s.io/json/json.go	2022-07-12 18:24:16.933126968 +0000
@@ -137,11 +137,3 @@ func SyntaxErrorOffset(err error) (isSyn
 		return false, 0
 	}
 }
-
-// FieldError are errors that provide access to
-// the path of the erroneous field
-type FieldError interface {
-	Error() string
-	FieldPath() string
-	SetFieldPath(path string)
-}
Vendor Verify failed.
If you're seeing this locally, run the below command to fix your directories:
hack/update-vendor.sh
Check all unwanted dependencies and update its status.
All pinned versions of checked dependencies match their preferred version.
Removing /home/prow/go/src/k8s.io/kubernetes/_tmp/kube-vendor.D6chIO
+++ exit code: 1
+++ error: 1
FAILED   verify-vendor.sh	123s
========================
FAILED TESTS
========================
hack/make-rules/../../hack/verify-vendor.sh
make: *** [Makefile:132: verify] Error 1
+ EXIT_VALUE=2
+ set +o xtrace
Cleaning up after docker in docker.
================================================================================
Cleaning up after docker
Stopping Docker: dockerProgram process in pidfile '/var/run/docker-ssd.pid', 1 process(es), refused to die.
... skipping 3 lines ...