{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15493","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15493/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15493/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15493/events","html_url":"https://github.com/kubernetes/kubernetes/issues/15493","id":111045842,"number":15493,"title":"kubectl apply should retry stale resource version.","user":{"login":"jlowdermilk","id":2101035,"avatar_url":"https://avatars.githubusercontent.com/u/2101035?v=3","gravatar_id":"","url":"https://api.github.com/users/jlowdermilk","html_url":"https://github.com/jlowdermilk","followers_url":"https://api.github.com/users/jlowdermilk/followers","following_url":"https://api.github.com/users/jlowdermilk/following{/other_user}","gists_url":"https://api.github.com/users/jlowdermilk/gists{/gist_id}","starred_url":"https://api.github.com/users/jlowdermilk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlowdermilk/subscriptions","organizations_url":"https://api.github.com/users/jlowdermilk/orgs","repos_url":"https://api.github.com/users/jlowdermilk/repos","events_url":"https://api.github.com/users/jlowdermilk/events{/privacy}","received_events_url":"https://api.github.com/users/jlowdermilk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/area/app-config-deployment","name":"area/app-config-deployment","color":"fb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/component/kubectl","name":"component/kubectl","color":"0052cc"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/flake","name":"kind/flake","color":"f7c6c7"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/team/ux","name":"team/ux","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/17","html_url":"https://github.com/kubernetes/kubernetes/milestones/next-candidate","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/milestones/17/labels","id":1510379,"number":17,"title":"next-candidate","description":"Candidates for the next milestone","creator":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"open_issues":176,"closed_issues":4,"state":"open","created_at":"2016-01-16T17:58:20Z","updated_at":"2016-02-19T18:42:56Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-10-12T20:05:54Z","updated_at":"2016-02-19T20:07:16Z","closed_at":null,"body":"From an e2e test failure:\r\n```\r\nError from server: error when applying patch:\r\n    {\"metadata\":{\"annotations\":{\"kubectl.kubernetes.io/last-applied-configuration\":\"{\\\"kind\\\":\\\"ReplicationController\\\",\\\"apiVersion\\\":\\\"v1\\\",\\\"metadata\\\":{\\\"name\\\":\\\"redis-master\\\",\\\"creationTimestamp\\\":null,\\\"labels\\\":{\\\"app\\\":\\\"redis\\\",\\\"kubectl.kubernetes.io/apply-test\\\":\\\"ADDED\\\",\\\"role\\\":\\\"master\\\"}},\\\"spec\\\":{\\\"replicas\\\":1,\\\"selector\\\":{\\\"app\\\":\\\"redis\\\",\\\"kubectl.kubernetes.io/apply-test\\\":\\\"ADDED\\\",\\\"role\\\":\\\"master\\\"},\\\"template\\\":{\\\"metadata\\\":{\\\"creationTimestamp\\\":null,\\\"labels\\\":{\\\"app\\\":\\\"redis\\\",\\\"kubectl.kubernetes.io/apply-test\\\":\\\"ADDED\\\",\\\"role\\\":\\\"master\\\"}},\\\"spec\\\":{\\\"containers\\\":[{\\\"name\\\":\\\"redis-master\\\",\\\"image\\\":\\\"redis\\\",\\\"ports\\\":[{\\\"name\\\":\\\"redis-server\\\",\\\"containerPort\\\":6379}],\\\"resources\\\":{}}]}}},\\\"status\\\":{\\\"replicas\\\":0}}\"},\"creationTimestamp\":null,\"labels\":{\"kubectl.kubernetes.io/apply-test\":\"ADDED\"}},\"spec\":{\"selector\":{\"kubectl.kubernetes.io/apply-test\":\"ADDED\"},\"template\":{\"metadata\":{\"labels\":{\"kubectl.kubernetes.io/apply-test\":\"ADDED\"}}}}}\r\n    to:\r\n    &{0xc208226190 0xc2080cbea0 e2e-tests-kubectl-ztbsd redis-master STDIN 0xc208568ff0 0xc2083aa960 1387}\r\n    for: \"STDIN\": replicationControllers \"redis-master\" cannot be updated: the object has been modified; please apply your changes to the latest version and try again\r\n```\r\n\r\nThe command should retry resource version mismatches like scale and rollingupdate.\r\n\r\ncc @kubernetes/kubectl "},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/186383035","html_url":"https://github.com/kubernetes/kubernetes/issues/15493#issuecomment-186383035","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/15493","id":186383035,"user":{"login":"bprashanth","id":10927820,"avatar_url":"https://avatars.githubusercontent.com/u/10927820?v=3","gravatar_id":"","url":"https://api.github.com/users/bprashanth","html_url":"https://github.com/bprashanth","followers_url":"https://api.github.com/users/bprashanth/followers","following_url":"https://api.github.com/users/bprashanth/following{/other_user}","gists_url":"https://api.github.com/users/bprashanth/gists{/gist_id}","starred_url":"https://api.github.com/users/bprashanth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bprashanth/subscriptions","organizations_url":"https://api.github.com/users/bprashanth/orgs","repos_url":"https://api.github.com/users/bprashanth/repos","events_url":"https://api.github.com/users/bprashanth/events{/privacy}","received_events_url":"https://api.github.com/users/bprashanth/received_events","type":"User","site_admin":false},"created_at":"2016-02-19T20:07:16Z","updated_at":"2016-02-19T20:07:16Z","body":"This should just be a generic GET/Update retry loop, eg: https://github.com/kubernetes/kubernetes/blob/master/pkg/controller/replication/replication_controller_utils.go#L53"}}