Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for IsStrictDecodingError (1.81 sec)

  1. staging/src/k8s.io/apimachinery/pkg/runtime/error.go

    		s.WriteString(err.Error())
    	}
    	return s.String()
    }
    
    func (e *strictDecodingError) Errors() []error {
    	return e.errors
    }
    
    // IsStrictDecodingError returns true if the error indicates that the provided object
    // strictness violations.
    func IsStrictDecodingError(err error) bool {
    	if err == nil {
    		return false
    	}
    	_, ok := err.(*strictDecodingError)
    	return ok
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 19 21:24:36 UTC 2021
    - 4.7K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/pkg/audit/policy/reader.go

    	// Try strict decoding first.
    	_, gvk, err := strictDecoder.Decode(policyDef, nil, policy)
    	if err != nil {
    		if !runtime.IsStrictDecodingError(err) {
    			return nil, fmt.Errorf("failed decoding: %w", err)
    		}
    		var (
    			lenientDecoder = audit.Codecs.UniversalDecoder(apiGroupVersions...)
    			lenientErr     error
    		)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Nov 03 04:09:40 UTC 2022
    - 2.9K bytes
    - Viewed (0)
  3. pkg/kubelet/kubeletconfig/util/codec/codec.go

    		// Try strict decoding first. If that fails decode with a lenient
    		// decoder, which has only v1beta1 registered, and log a warning.
    		// The lenient path is to be dropped when support for v1beta1 is dropped.
    		if !runtime.IsStrictDecodingError(err) {
    			return nil, fmt.Errorf("failed to decode: %w", err)
    		}
    
    		var lenientErr error
    		_, lenientCodecs, lenientErr := codec.NewLenientSchemeAndCodecs(
    			kubeletconfig.AddToScheme,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 21:48:29 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer/recognizer.go

    			// error was a strict decoding error (e.g. unknown or
    			// duplicate fields), we still consider the recognizer
    			// to have understood the object
    			if out == nil || !runtime.IsStrictDecodingError(err) {
    				lastErr = err
    				continue
    			}
    		}
    		return out, actual, err
    	}
    
    	if lastErr == nil {
    		lastErr = fmt.Errorf("no serialization format matched the provided data")
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 19 21:24:36 UTC 2021
    - 3.5K bytes
    - Viewed (0)
  5. pkg/kubelet/kubeletconfig/configfiles/configfiles_test.go

    				}
    			}
    			loader, err := NewFsLoader(fs, path)
    			if err != nil {
    				t.Fatalf("unexpected error: %v", err)
    			}
    			kc, err := loader.Load()
    
    			if c.strictErr && !runtime.IsStrictDecodingError(errors.Unwrap(err)) {
    				t.Fatalf("got error: %v, want strict decoding error", err)
    			}
    			if utiltest.SkipRest(t, c.desc, err, c.err) {
    				return
    			}
    			if !apiequality.Semantic.DeepEqual(c.expect, kc) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 18 12:18:41 UTC 2023
    - 7.2K bytes
    - Viewed (0)
Back to top