UPSTREAM: 47792: Fix rawextension decoding in update
@@ -816,7 +816,8 @@ func UpdateResource(r rest.Updater, scope RequestScope, typer runtime.ObjectType
defaultGVK := scope.Kind
original := r.New()
trace.Step("About to convert to expected version")
- obj, gvk, err := scope.Serializer.DecoderToVersion(s.Serializer, defaultGVK.GroupVersion()).Decode(body, &defaultGVK, original)
+ decoder := scope.Serializer.DecoderToVersion(s.Serializer, schema.GroupVersion{Group: defaultGVK.Group, Version: runtime.APIVersionInternal})
+ obj, gvk, err := decoder.Decode(body, &defaultGVK, original)
if err != nil {
err = transformDecodeError(typer, err, original, gvk, body)
scope.err(err, res.ResponseWriter, req.Request)
