{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60947","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60947/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60947/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60947/events","html_url":"https://github.com/kubernetes/kubernetes/pull/60947","id":303619661,"number":60947,"title":"Add conflict detection feature to apply strategy","user":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"labels":[{"id":477397086,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/cncf-cla:%20yes","name":"cncf-cla: yes","color":"bfe5bf","default":false},{"id":349530249,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/release-note-none","name":"release-note-none","color":"c2e0c6","default":false},{"id":253450978,"url":"https://api.github.com/repos/kubernetes/kubernetes/labels/size/L","name":"size/L","color":"ee9900","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-08T20:25:57Z","updated_at":"2018-03-08T21:24:58Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/kubernetes/kubernetes/pulls/60947","html_url":"https://github.com/kubernetes/kubernetes/pull/60947","diff_url":"https://github.com/kubernetes/kubernetes/pull/60947.diff","patch_url":"https://github.com/kubernetes/kubernetes/pull/60947.patch"},"body":"- Add primitive element conflict check when FailOnConflict option is enabled. Set Result.Operation to CONFLICT when values do not match in remote and recorded.\r\n- Add detectConflict for Elememt in merge and replace strategy. Recursively check the subelement and return error if conflict occurs\r\n- Add tests (positive and negative) for conflicts detection in map, list, list-map, nested\r\nmap.\r\n\r\n**What this PR does / why we need it**:\r\nApply is being rewritten under pkg/kubectl/apply/strategy based on visitor pattern. The new merge and replace code should check for conflicts between the recorded value and the remote value, and optionally return an error if they do not match with the field and details. A conflict is if the same field is specified in BOTH the recorded and the remote values of an object, but does not match.\r\n\r\n**Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*:\r\nFixes #60945 \r\nhttps://github.com/kubernetes/kubectl/issues/97\r\n\r\n**Release note**:\r\n<!--  Write your release note:\r\n1. Enter your extended release note in the below block. If the PR requires additional action from users switching to the new release, include the string \"action required\".\r\n2. If no release note is required, just write \"NONE\".\r\n-->\r\n```release-note\r\nNONE\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/371629503","html_url":"https://github.com/kubernetes/kubernetes/pull/60947#issuecomment-371629503","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/60947","id":371629503,"user":{"login":"fanzhangio","id":22812247,"avatar_url":"https://avatars3.githubusercontent.com/u/22812247?v=4","gravatar_id":"","url":"https://api.github.com/users/fanzhangio","html_url":"https://github.com/fanzhangio","followers_url":"https://api.github.com/users/fanzhangio/followers","following_url":"https://api.github.com/users/fanzhangio/following{/other_user}","gists_url":"https://api.github.com/users/fanzhangio/gists{/gist_id}","starred_url":"https://api.github.com/users/fanzhangio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fanzhangio/subscriptions","organizations_url":"https://api.github.com/users/fanzhangio/orgs","repos_url":"https://api.github.com/users/fanzhangio/repos","events_url":"https://api.github.com/users/fanzhangio/events{/privacy}","received_events_url":"https://api.github.com/users/fanzhangio/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T21:24:58Z","updated_at":"2018-03-08T21:24:58Z","author_association":"CONTRIBUTOR","body":"/retest\r\n"}}
{"actor":{"display_login":"fanzhangio"}}