{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9803","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9803/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9803/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9803/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9803","id":88488577,"number":9803,"title":"Improve error output of kubectl update","user":{"login":"satnam6502","id":6164339,"avatar_url":"https://avatars.githubusercontent.com/u/6164339?v=3","gravatar_id":"","url":"https://api.github.com/users/satnam6502","html_url":"https://github.com/satnam6502","followers_url":"https://api.github.com/users/satnam6502/followers","following_url":"https://api.github.com/users/satnam6502/following{/other_user}","gists_url":"https://api.github.com/users/satnam6502/gists{/gist_id}","starred_url":"https://api.github.com/users/satnam6502/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satnam6502/subscriptions","organizations_url":"https://api.github.com/users/satnam6502/orgs","repos_url":"https://api.github.com/users/satnam6502/repos","events_url":"https://api.github.com/users/satnam6502/events{/privacy}","received_events_url":"https://api.github.com/users/satnam6502/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/cla:%20yes","name":"cla: yes","color":"bfe5bf"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/lgtm","name":"lgtm","color":"159818"}],"state":"open","locked":false,"assignee":{"login":"mikedanese","id":1787169,"avatar_url":"https://avatars.githubusercontent.com/u/1787169?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedanese","html_url":"https://github.com/mikedanese","followers_url":"https://api.github.com/users/mikedanese/followers","following_url":"https://api.github.com/users/mikedanese/following{/other_user}","gists_url":"https://api.github.com/users/mikedanese/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedanese/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedanese/subscriptions","organizations_url":"https://api.github.com/users/mikedanese/orgs","repos_url":"https://api.github.com/users/mikedanese/repos","events_url":"https://api.github.com/users/mikedanese/events{/privacy}","received_events_url":"https://api.github.com/users/mikedanese/received_events","type":"User","site_admin":false},"milestone":null,"comments":11,"created_at":"2015-06-15T17:21:11Z","updated_at":"2015-06-17T21:39:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/pulls/9803","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9803","diff_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9803.diff","patch_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9803.patch"},"body":"This PR addresses issue #9721 to improve theerror  output of `kubectl update`.\r\n`NewCmdUpdate` is changed to used a modified version of `CheckErr` called `CheckCustomErr` which can accept a custom error prefix message. Unfortunately, the text segment we want to report (\"may not update fields other than container.image\") which is originally stored in a separate field is unfortunately conflated with a larger text message that includes details of the spec being updated.  To avoid making significant changes to the error types used in the code base I decided to do the horrible but expedient thing: extract out the required string by looking for text after \"}': \". Now the error message is:\r\n```\r\n$ kubectl update -f counter-pod.yaml \r\nUpdate failed: may not update fields other than container.image\r\n```\r\nwhich is exactly what @erictune requested."},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/112958983","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/pull/9803#issuecomment-112958983","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/9803","id":112958983,"user":{"login":"k8s-bot","id":12551979,"avatar_url":"https://avatars.githubusercontent.com/u/12551979?v=3","gravatar_id":"","url":"https://api.github.com/users/k8s-bot","html_url":"https://github.com/k8s-bot","followers_url":"https://api.github.com/users/k8s-bot/followers","following_url":"https://api.github.com/users/k8s-bot/following{/other_user}","gists_url":"https://api.github.com/users/k8s-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/k8s-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/k8s-bot/subscriptions","organizations_url":"https://api.github.com/users/k8s-bot/orgs","repos_url":"https://api.github.com/users/k8s-bot/repos","events_url":"https://api.github.com/users/k8s-bot/events{/privacy}","received_events_url":"https://api.github.com/users/k8s-bot/received_events","type":"User","site_admin":false},"created_at":"2015-06-17T21:39:50Z","updated_at":"2015-06-17T21:39:50Z","body":"GCE e2e build/test **passed** for commit 445f1113f37d048828f3adcb00999b4f9220a480.\n* [Build Log](https://storage.cloud.google.com/kubernetes-jenkins/pr-logs/445f1113f37d048828f3adcb00999b4f9220a480/kubernetes-pull-build-test-e2e-gce/483/build-log.txt)\n* [Test Artifacts](https://console.developers.google.com/storage/browser/kubernetes-jenkins/pr-logs/445f1113f37d048828f3adcb00999b4f9220a480/kubernetes-pull-build-test-e2e-gce/483/_artifacts/)\n* [Internal Jenkins Results](http://goto.google.com/prkubekins/job/kubernetes-pull-build-test-e2e-gce//483)\n"}}