Fix static failures for vendor/k8s.io/apiserver/pkg/endpoints/handlers

This commit is contained in:
chymy 2021-02-26 21:01:55 -05:00
parent fb6349c15b
commit 04515b9c0a
6 changed files with 3 additions and 7 deletions

View File

@ -12,9 +12,6 @@ vendor/k8s.io/apimachinery/pkg/util/sets/types
vendor/k8s.io/apimachinery/pkg/util/strategicpatch
vendor/k8s.io/apimachinery/pkg/util/wait
vendor/k8s.io/apiserver/pkg/endpoints/filters
vendor/k8s.io/apiserver/pkg/endpoints/handlers
vendor/k8s.io/apiserver/pkg/endpoints/handlers/fieldmanager
vendor/k8s.io/apiserver/pkg/endpoints/handlers/responsewriters
vendor/k8s.io/apiserver/pkg/endpoints/metrics
vendor/k8s.io/apiserver/pkg/registry/generic/registry
vendor/k8s.io/apiserver/pkg/registry/generic/rest

View File

@ -142,6 +142,7 @@ func DeleteResource(r rest.GracefulDeleter, allowsOptions bool, scope *RequestSc
// that will break existing clients.
// Other cases where resource is not instantly deleted are: namespace deletion
// and pod graceful deletion.
//lint:ignore SA1019 backwards compatibility
if !wasDeleted && options.OrphanDependents != nil && !*options.OrphanDependents {
status = http.StatusAccepted
}

View File

@ -55,6 +55,7 @@ type fakeObjectConvertor struct {
apiVersion fieldpath.APIVersion
}
//lint:ignore SA4009 backwards compatibility
func (c *fakeObjectConvertor) Convert(in, out, context interface{}) error {
if typedValue, ok := in.(*typed.TypedValue); ok {
var err error

View File

@ -83,6 +83,7 @@ func TestForbidden(t *testing.T) {
if result != test.expected {
t.Errorf("Forbidden response body(%#v...)\n expected: %v\ngot: %v", test.attributes, test.expected, result)
}
//lint:ignore SA1019 backwards compatibility
resultType := observer.HeaderMap.Get("Content-Type")
if resultType != test.contentType {
t.Errorf("Forbidden content type(%#v...) != %#v, got %#v", test.attributes, test.expected, result)

View File

@ -21,7 +21,6 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"net/http"
"strconv"
"strings"
@ -244,8 +243,6 @@ func (w *deferredResponseWriter) Close() error {
return err
}
var nopCloser = ioutil.NopCloser(nil)
// WriteObjectNegotiated renders an object in the content type negotiated by the client.
func WriteObjectNegotiated(s runtime.NegotiatedSerializer, restrictions negotiation.EndpointRestrictions, gv schema.GroupVersion, w http.ResponseWriter, req *http.Request, statusCode int, object runtime.Object) {
stream, ok := object.(rest.ResourceStreamer)

View File

@ -64,7 +64,6 @@ func TestSerializeObjectParallel(t *testing.T) {
wantCode int
wantHeaders http.Header
wantBody []byte
}
newTest := func() test {
return test{