{"action":"created","comment":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/226046034","pull_request_review_id":165774914,"id":226046034,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjA0NjAzNA==","diff_hunk":"@@ -36,7 +37,7 @@\n   // This will only be a portion of a full manifest so calls to some required fields can fail.\n   // Using the KubernetesManifest type makes it simpler to reuse the ArtifactReplacement logic.\n   // TODO: change Orca to only send a single manifest.\n-  private KubernetesManifest patchBody;\n+  private KubernetesPatchBody patchBody;","path":"clouddriver-kubernetes/src/main/groovy/com/netflix/spinnaker/clouddriver/kubernetes/v2/description/manifest/KubernetesPatchManifestDescription.java","position":13,"original_position":13,"commit_id":"ceb5843eda24425c5b40da862527c866d51ceadf","original_commit_id":"ceb5843eda24425c5b40da862527c866d51ceadf","user":{"login":"lwander","id":4874941,"node_id":"MDQ6VXNlcjQ4NzQ5NDE=","avatar_url":"https://avatars3.githubusercontent.com/u/4874941?v=4","gravatar_id":"","url":"https://api.github.com/users/lwander","html_url":"https://github.com/lwander","followers_url":"https://api.github.com/users/lwander/followers","following_url":"https://api.github.com/users/lwander/following{/other_user}","gists_url":"https://api.github.com/users/lwander/gists{/gist_id}","starred_url":"https://api.github.com/users/lwander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lwander/subscriptions","organizations_url":"https://api.github.com/users/lwander/orgs","repos_url":"https://api.github.com/users/lwander/repos","events_url":"https://api.github.com/users/lwander/events{/privacy}","received_events_url":"https://api.github.com/users/lwander/received_events","type":"User","site_admin":false},"body":"If someone already has a pipeline with a patch stage defined, editing this stage's description will break it. I would either: keep this field the same, and add a new one for the jsonpatch object, or, go with what you have and write a pipeline migrator. I think @jtk54 can help with that (it's not too much work).","created_at":"2018-10-17T18:27:51Z","updated_at":"2018-10-17T18:30:32Z","html_url":"https://github.com/spinnaker/clouddriver/pull/3047#discussion_r226046034","pull_request_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments/226046034"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/3047#discussion_r226046034"},"pull_request":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047"}}},"pull_request":{"url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047","id":223707031,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNzA3MDMx","html_url":"https://github.com/spinnaker/clouddriver/pull/3047","diff_url":"https://github.com/spinnaker/clouddriver/pull/3047.diff","patch_url":"https://github.com/spinnaker/clouddriver/pull/3047.patch","issue_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/3047","number":3047,"state":"open","locked":false,"title":"fix(kubernetes): add support for json patching #3418","user":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"body":"Closes #3418\r\n\r\nPreviously, we assumed that every posted `patchBody` could be deserialized as a `KubernetesManifest` in order to re-use the existing artifact replacement logic. This change adds support for the JSON merge strategy by adding a `KubernetesPatchBody` type with `manifestPatch` and `jsonPatches` fields, one of which will be non-null depending on the selected merge strategy. Leaving the logic for strategic and merge strategies as-is because they seem to be working.\r\n\r\n@lwander Hopefully I understood what you meant about skipping the artifact replacement stage for JSON patches -- let me know if there is anywhere outside the code I should document that.\r\n","created_at":"2018-10-17T18:24:26Z","updated_at":"2018-10-17T18:30:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a5232dd01c966163f44c121d573a0e5ee3826219","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dibyom","id":3316877,"node_id":"MDQ6VXNlcjMzMTY4Nzc=","avatar_url":"https://avatars2.githubusercontent.com/u/3316877?v=4","gravatar_id":"","url":"https://api.github.com/users/dibyom","html_url":"https://github.com/dibyom","followers_url":"https://api.github.com/users/dibyom/followers","following_url":"https://api.github.com/users/dibyom/following{/other_user}","gists_url":"https://api.github.com/users/dibyom/gists{/gist_id}","starred_url":"https://api.github.com/users/dibyom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dibyom/subscriptions","organizations_url":"https://api.github.com/users/dibyom/orgs","repos_url":"https://api.github.com/users/dibyom/repos","events_url":"https://api.github.com/users/dibyom/events{/privacy}","received_events_url":"https://api.github.com/users/dibyom/received_events","type":"User","site_admin":false},{"login":"danielpeach","id":13868700,"node_id":"MDQ6VXNlcjEzODY4NzAw","avatar_url":"https://avatars3.githubusercontent.com/u/13868700?v=4","gravatar_id":"","url":"https://api.github.com/users/danielpeach","html_url":"https://github.com/danielpeach","followers_url":"https://api.github.com/users/danielpeach/followers","following_url":"https://api.github.com/users/danielpeach/following{/other_user}","gists_url":"https://api.github.com/users/danielpeach/gists{/gist_id}","starred_url":"https://api.github.com/users/danielpeach/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielpeach/subscriptions","organizations_url":"https://api.github.com/users/danielpeach/orgs","repos_url":"https://api.github.com/users/danielpeach/repos","events_url":"https://api.github.com/users/danielpeach/events{/privacy}","received_events_url":"https://api.github.com/users/danielpeach/received_events","type":"User","site_admin":false},{"login":"sbwsg","id":34253460,"node_id":"MDQ6VXNlcjM0MjUzNDYw","avatar_url":"https://avatars1.githubusercontent.com/u/34253460?v=4","gravatar_id":"","url":"https://api.github.com/users/sbwsg","html_url":"https://github.com/sbwsg","followers_url":"https://api.github.com/users/sbwsg/followers","following_url":"https://api.github.com/users/sbwsg/following{/other_user}","gists_url":"https://api.github.com/users/sbwsg/gists{/gist_id}","starred_url":"https://api.github.com/users/sbwsg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbwsg/subscriptions","organizations_url":"https://api.github.com/users/sbwsg/orgs","repos_url":"https://api.github.com/users/sbwsg/repos","events_url":"https://api.github.com/users/sbwsg/events{/privacy}","received_events_url":"https://api.github.com/users/sbwsg/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047/commits","review_comments_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047/comments","review_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/3047/comments","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/ceb5843eda24425c5b40da862527c866d51ceadf","head":{"label":"maggieneterval:k8s-patch-fix","ref":"k8s-patch-fix","sha":"ceb5843eda24425c5b40da862527c866d51ceadf","user":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"repo":{"id":149025537,"node_id":"MDEwOlJlcG9zaXRvcnkxNDkwMjU1Mzc=","name":"clouddriver","full_name":"maggieneterval/clouddriver","private":false,"owner":{"login":"maggieneterval","id":15936279,"node_id":"MDQ6VXNlcjE1OTM2Mjc5","avatar_url":"https://avatars1.githubusercontent.com/u/15936279?v=4","gravatar_id":"","url":"https://api.github.com/users/maggieneterval","html_url":"https://github.com/maggieneterval","followers_url":"https://api.github.com/users/maggieneterval/followers","following_url":"https://api.github.com/users/maggieneterval/following{/other_user}","gists_url":"https://api.github.com/users/maggieneterval/gists{/gist_id}","starred_url":"https://api.github.com/users/maggieneterval/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maggieneterval/subscriptions","organizations_url":"https://api.github.com/users/maggieneterval/orgs","repos_url":"https://api.github.com/users/maggieneterval/repos","events_url":"https://api.github.com/users/maggieneterval/events{/privacy}","received_events_url":"https://api.github.com/users/maggieneterval/received_events","type":"User","site_admin":false},"html_url":"https://github.com/maggieneterval/clouddriver","description":"read and write operations across cloud providers","fork":true,"url":"https://api.github.com/repos/maggieneterval/clouddriver","forks_url":"https://api.github.com/repos/maggieneterval/clouddriver/forks","keys_url":"https://api.github.com/repos/maggieneterval/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maggieneterval/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maggieneterval/clouddriver/teams","hooks_url":"https://api.github.com/repos/maggieneterval/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/maggieneterval/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/maggieneterval/clouddriver/events","assignees_url":"https://api.github.com/repos/maggieneterval/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/maggieneterval/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/maggieneterval/clouddriver/tags","blobs_url":"https://api.github.com/repos/maggieneterval/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maggieneterval/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maggieneterval/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/maggieneterval/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maggieneterval/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/maggieneterval/clouddriver/languages","stargazers_url":"https://api.github.com/repos/maggieneterval/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/maggieneterval/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/maggieneterval/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/maggieneterval/clouddriver/subscription","commits_url":"https://api.github.com/repos/maggieneterval/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/maggieneterval/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/maggieneterval/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/maggieneterval/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/maggieneterval/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/maggieneterval/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maggieneterval/clouddriver/merges","archive_url":"https://api.github.com/repos/maggieneterval/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maggieneterval/clouddriver/downloads","issues_url":"https://api.github.com/repos/maggieneterval/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/maggieneterval/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/maggieneterval/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/maggieneterval/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maggieneterval/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/maggieneterval/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/maggieneterval/clouddriver/deployments","created_at":"2018-09-16T18:48:53Z","updated_at":"2018-09-16T18:49:04Z","pushed_at":"2018-10-17T18:24:41Z","git_url":"git://github.com/maggieneterval/clouddriver.git","ssh_url":"git@github.com:maggieneterval/clouddriver.git","clone_url":"https://github.com/maggieneterval/clouddriver.git","svn_url":"https://github.com/maggieneterval/clouddriver","homepage":null,"size":41082,"stargazers_count":0,"watchers_count":0,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"spinnaker:master","ref":"master","sha":"29789ec2295b3dcf5c32ba7d1c26ce3f91f784a8","user":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"repo":{"id":37556951,"node_id":"MDEwOlJlcG9zaXRvcnkzNzU1Njk1MQ==","name":"clouddriver","full_name":"spinnaker/clouddriver","private":false,"owner":{"login":"spinnaker","id":7634182,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc2MzQxODI=","avatar_url":"https://avatars1.githubusercontent.com/u/7634182?v=4","gravatar_id":"","url":"https://api.github.com/users/spinnaker","html_url":"https://github.com/spinnaker","followers_url":"https://api.github.com/users/spinnaker/followers","following_url":"https://api.github.com/users/spinnaker/following{/other_user}","gists_url":"https://api.github.com/users/spinnaker/gists{/gist_id}","starred_url":"https://api.github.com/users/spinnaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinnaker/subscriptions","organizations_url":"https://api.github.com/users/spinnaker/orgs","repos_url":"https://api.github.com/users/spinnaker/repos","events_url":"https://api.github.com/users/spinnaker/events{/privacy}","received_events_url":"https://api.github.com/users/spinnaker/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/spinnaker/clouddriver","description":"read and write operations across cloud providers","fork":false,"url":"https://api.github.com/repos/spinnaker/clouddriver","forks_url":"https://api.github.com/repos/spinnaker/clouddriver/forks","keys_url":"https://api.github.com/repos/spinnaker/clouddriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinnaker/clouddriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinnaker/clouddriver/teams","hooks_url":"https://api.github.com/repos/spinnaker/clouddriver/hooks","issue_events_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/events{/number}","events_url":"https://api.github.com/repos/spinnaker/clouddriver/events","assignees_url":"https://api.github.com/repos/spinnaker/clouddriver/assignees{/user}","branches_url":"https://api.github.com/repos/spinnaker/clouddriver/branches{/branch}","tags_url":"https://api.github.com/repos/spinnaker/clouddriver/tags","blobs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinnaker/clouddriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinnaker/clouddriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinnaker/clouddriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinnaker/clouddriver/statuses/{sha}","languages_url":"https://api.github.com/repos/spinnaker/clouddriver/languages","stargazers_url":"https://api.github.com/repos/spinnaker/clouddriver/stargazers","contributors_url":"https://api.github.com/repos/spinnaker/clouddriver/contributors","subscribers_url":"https://api.github.com/repos/spinnaker/clouddriver/subscribers","subscription_url":"https://api.github.com/repos/spinnaker/clouddriver/subscription","commits_url":"https://api.github.com/repos/spinnaker/clouddriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinnaker/clouddriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinnaker/clouddriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinnaker/clouddriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinnaker/clouddriver/contents/{+path}","compare_url":"https://api.github.com/repos/spinnaker/clouddriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinnaker/clouddriver/merges","archive_url":"https://api.github.com/repos/spinnaker/clouddriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinnaker/clouddriver/downloads","issues_url":"https://api.github.com/repos/spinnaker/clouddriver/issues{/number}","pulls_url":"https://api.github.com/repos/spinnaker/clouddriver/pulls{/number}","milestones_url":"https://api.github.com/repos/spinnaker/clouddriver/milestones{/number}","notifications_url":"https://api.github.com/repos/spinnaker/clouddriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinnaker/clouddriver/labels{/name}","releases_url":"https://api.github.com/repos/spinnaker/clouddriver/releases{/id}","deployments_url":"https://api.github.com/repos/spinnaker/clouddriver/deployments","created_at":"2015-06-16T21:26:02Z","updated_at":"2018-10-17T17:49:36Z","pushed_at":"2018-10-17T18:24:43Z","git_url":"git://github.com/spinnaker/clouddriver.git","ssh_url":"git@github.com:spinnaker/clouddriver.git","clone_url":"https://github.com/spinnaker/clouddriver.git","svn_url":"https://github.com/spinnaker/clouddriver","homepage":null,"size":41170,"stargazers_count":173,"watchers_count":173,"language":"Groovy","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":453,"mirror_url":null,"archived":false,"open_issues_count":13,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":453,"open_issues":13,"watchers":173,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047"},"html":{"href":"https://github.com/spinnaker/clouddriver/pull/3047"},"issue":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/3047"},"comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/issues/3047/comments"},"review_comments":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047/comments"},"review_comment":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/spinnaker/clouddriver/pulls/3047/commits"},"statuses":{"href":"https://api.github.com/repos/spinnaker/clouddriver/statuses/ceb5843eda24425c5b40da862527c866d51ceadf"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lwander"}}