-
Notifications
You must be signed in to change notification settings - Fork 38.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strategic patch: "unrecognized type" error not informative enough #73692
Comments
Working on a patch => #73695 |
more places people saw this error and would help if it was clearer: it's common result of openshift templates, which expand to string unless you use |
I also hit this with kube-graffiti while trying to patch a deployment/v1beta1: My json-patch:
Error I get:
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle stale I need to address review feedback on my PR. |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Not a single more detail about whats producing the issue at appliance time.
/remove-lifecycle rotten |
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@cben: Any news on this? |
Thanks for the reminder. I need to rebase and address feedback but keep not getting to it. At the moment I'm sick. If anyone wants to take over, go ahead. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
/remove-lifecycle rotten
|
Issues go stale after 90d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Stale issues rot after 30d of inactivity. If this issue is safe to close now please do so with Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
Rotten issues close after 30d of inactivity. Send feedback to sig-testing, kubernetes/test-infra and/or fejta. |
@fejta-bot: Closing this issue. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Problem persists |
@Skitionek: You can't reopen an issue/PR unless you authored it or you are a collaborator. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/reopen |
@cben looks like the CI robot ignored you |
The issue is still not fixed. After so many years. |
What happened:
Given a wrong type, e.g. string where int was expected in a large yaml,
oc apply
as well as the underlyingkubectl patch --type=strategic
gives an error that's hard to act upon (if patch is large).FromUnstructured
,ToUnstructured
) giving exactly same error for different directions!kubectl apply
it's easy to get lost in a huge patch. apply gives more info, but the error on last line is still same error from patch:What you expected to happen:
spec.replicas
.How to reproduce it (as minimally and precisely as possible):
https://gist.github.com/cben/9bbb982fb8fcf3d88c2c875d04e3a42c
kubectl apply -f deployment.yaml
kubectl patch --type=strategic -p '{"spec": {"replicas": "1"}}' deployment/sise
kubectl apply -f deployment-string.yaml
Anything else we need to know?:
Originally I experienced this on OpenShift 3.11, where the UX is even worse: first create/apply is in some cases tolerant and accepts string instead of int (at least for containerPort), while subsequent apply/patch rejects it! But on upstream k8s master I see errors from first create/apply too so not relevant here.
Other patch formats use a different code path, giving a very informative error:
JSON Merge Patch
JSON Patch
kubectl edit
also sometimes shows this error, see #26050 (comment)Environment:
kubectl version
): built from master today:uname -a
): Linux 4.19.15-300.fc29.x86_64 Unit test coverage in Kubelet is lousy. (~30%) #1 SMP Mon Jan 14 16:32:35 UTC 2019 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: