{"action":"created","comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/comments/224157519","pull_request_review_id":163456107,"id":224157519,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNDE1NzUxOQ==","diff_hunk":"@@ -241,13 +241,12 @@ func (pc *parentController) enqueueParentObject(obj interface{}) {\n func (pc *parentController) updateParentObject(old, cur interface{}) {\n \t// Ignore updates where the ResourceVersion changed (not a resync)\n \t// but the spec hasn't changed (e.g. our own status updates).\n-\t// TODO(metacontroller#26): Use ObservedGeneration instead of this.\n \toldParent := old.(*unstructured.Unstructured)\n \tcurParent := cur.(*unstructured.Unstructured)\n \tif curParent.GetResourceVersion() != oldParent.GetResourceVersion() {\n-\t\toldSpec := k8s.GetNestedField(oldParent.UnstructuredContent(), \"spec\")\n-\t\tcurSpec := k8s.GetNestedField(curParent.UnstructuredContent(), \"spec\")\n-\t\tif reflect.DeepEqual(oldSpec, curSpec) {","path":"controller/composite/controller.go","position":10,"original_position":10,"commit_id":"eceaceb93731c1114d2be0f7f3edee78dd563aa1","original_commit_id":"eceaceb93731c1114d2be0f7f3edee78dd563aa1","user":{"login":"enisoc","id":6733629,"node_id":"MDQ6VXNlcjY3MzM2Mjk=","avatar_url":"https://avatars3.githubusercontent.com/u/6733629?v=4","gravatar_id":"","url":"https://api.github.com/users/enisoc","html_url":"https://github.com/enisoc","followers_url":"https://api.github.com/users/enisoc/followers","following_url":"https://api.github.com/users/enisoc/following{/other_user}","gists_url":"https://api.github.com/users/enisoc/gists{/gist_id}","starred_url":"https://api.github.com/users/enisoc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enisoc/subscriptions","organizations_url":"https://api.github.com/users/enisoc/orgs","repos_url":"https://api.github.com/users/enisoc/repos","events_url":"https://api.github.com/users/enisoc/events{/privacy}","received_events_url":"https://api.github.com/users/enisoc/received_events","type":"User","site_admin":false},"body":"The [original suggestion](https://github.com/GoogleCloudPlatform/metacontroller/pull/102/files#r221055866) was a two-parter: (1) this should be generation instead of observedGeneration, and (2) there's more you'll need in addition to this change, and it will become less reliable, so let's not change anything here right now. Sorry for the confusing structure. I should have started with the final recommendation instead of burying it in the middle of a long comment.","created_at":"2018-10-10T16:48:28Z","updated_at":"2018-10-10T16:53:13Z","html_url":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102#discussion_r224157519","pull_request_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/comments/224157519"},"html":{"href":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102#discussion_r224157519"},"pull_request":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102"}},"in_reply_to_id":223903185},"pull_request":{"url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102","id":218504525,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NTA0NTI1","html_url":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102","diff_url":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102.diff","patch_url":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102.patch","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/102","number":102,"state":"open","locked":false,"title":"Support status subresource and ObservedGeneration","user":{"login":"crimsonfaith91","id":13921630,"node_id":"MDQ6VXNlcjEzOTIxNjMw","avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"body":"This PR aims to address #26.\r\n\r\nItems achieved:\r\n1. added an `AtomicUpdateStatus` that calls `Update()` or `UpdateStatus` based on existence of status subresource\r\n2. added a `.subresources` field for  `ResourceMap` to record all subresources of a given resource (not just status subresource)\r\n3. added a `HasSubresource` function for `ResourceMap` to determine whether a subresource exists\r\n4. revert `.status` field for `ApplyUpdate()` \r\n5. change `.spec` comparison to `metadata.generation` comparison\r\n\r\nAll smoke tests pass in 2nd commit.","created_at":"2018-09-27T02:15:18Z","updated_at":"2018-10-10T16:53:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e04dc8568d32de33a47516bb4190702e498682c5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102/commits","review_comments_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102/comments","review_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/comments{/number}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/102/comments","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/statuses/eceaceb93731c1114d2be0f7f3edee78dd563aa1","head":{"label":"crimsonfaith91:status","ref":"status","sha":"eceaceb93731c1114d2be0f7f3edee78dd563aa1","user":{"login":"crimsonfaith91","id":13921630,"node_id":"MDQ6VXNlcjEzOTIxNjMw","avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"repo":{"id":141201783,"node_id":"MDEwOlJlcG9zaXRvcnkxNDEyMDE3ODM=","name":"metacontroller","full_name":"crimsonfaith91/metacontroller","private":false,"owner":{"login":"crimsonfaith91","id":13921630,"node_id":"MDQ6VXNlcjEzOTIxNjMw","avatar_url":"https://avatars0.githubusercontent.com/u/13921630?v=4","gravatar_id":"","url":"https://api.github.com/users/crimsonfaith91","html_url":"https://github.com/crimsonfaith91","followers_url":"https://api.github.com/users/crimsonfaith91/followers","following_url":"https://api.github.com/users/crimsonfaith91/following{/other_user}","gists_url":"https://api.github.com/users/crimsonfaith91/gists{/gist_id}","starred_url":"https://api.github.com/users/crimsonfaith91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crimsonfaith91/subscriptions","organizations_url":"https://api.github.com/users/crimsonfaith91/orgs","repos_url":"https://api.github.com/users/crimsonfaith91/repos","events_url":"https://api.github.com/users/crimsonfaith91/events{/privacy}","received_events_url":"https://api.github.com/users/crimsonfaith91/received_events","type":"User","site_admin":false},"html_url":"https://github.com/crimsonfaith91/metacontroller","description":"Lightweight Kubernetes controllers as a service","fork":true,"url":"https://api.github.com/repos/crimsonfaith91/metacontroller","forks_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/forks","keys_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/teams","hooks_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/hooks","issue_events_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/issues/events{/number}","events_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/events","assignees_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/assignees{/user}","branches_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/branches{/branch}","tags_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/tags","blobs_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/git/refs{/sha}","trees_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/statuses/{sha}","languages_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/languages","stargazers_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/stargazers","contributors_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/contributors","subscribers_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/subscribers","subscription_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/subscription","commits_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/commits{/sha}","git_commits_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/git/commits{/sha}","comments_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/comments{/number}","issue_comment_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/issues/comments{/number}","contents_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/contents/{+path}","compare_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/merges","archive_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/downloads","issues_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/issues{/number}","pulls_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/pulls{/number}","milestones_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/milestones{/number}","notifications_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/labels{/name}","releases_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/releases{/id}","deployments_url":"https://api.github.com/repos/crimsonfaith91/metacontroller/deployments","created_at":"2018-07-16T22:34:34Z","updated_at":"2018-07-16T22:34:37Z","pushed_at":"2018-10-06T02:46:07Z","git_url":"git://github.com/crimsonfaith91/metacontroller.git","ssh_url":"git@github.com:crimsonfaith91/metacontroller.git","clone_url":"https://github.com/crimsonfaith91/metacontroller.git","svn_url":"https://github.com/crimsonfaith91/metacontroller","homepage":"","size":504,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":false,"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":"GoogleCloudPlatform:master","ref":"master","sha":"4dd0622d6c146bac8a25811c3972e89e2b215df2","user":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"repo":{"id":103700907,"node_id":"MDEwOlJlcG9zaXRvcnkxMDM3MDA5MDc=","name":"metacontroller","full_name":"GoogleCloudPlatform/metacontroller","private":false,"owner":{"login":"GoogleCloudPlatform","id":2810941,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MTA5NDE=","avatar_url":"https://avatars0.githubusercontent.com/u/2810941?v=4","gravatar_id":"","url":"https://api.github.com/users/GoogleCloudPlatform","html_url":"https://github.com/GoogleCloudPlatform","followers_url":"https://api.github.com/users/GoogleCloudPlatform/followers","following_url":"https://api.github.com/users/GoogleCloudPlatform/following{/other_user}","gists_url":"https://api.github.com/users/GoogleCloudPlatform/gists{/gist_id}","starred_url":"https://api.github.com/users/GoogleCloudPlatform/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GoogleCloudPlatform/subscriptions","organizations_url":"https://api.github.com/users/GoogleCloudPlatform/orgs","repos_url":"https://api.github.com/users/GoogleCloudPlatform/repos","events_url":"https://api.github.com/users/GoogleCloudPlatform/events{/privacy}","received_events_url":"https://api.github.com/users/GoogleCloudPlatform/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/GoogleCloudPlatform/metacontroller","description":"Lightweight Kubernetes controllers as a service","fork":false,"url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller","forks_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/forks","keys_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/teams","hooks_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/hooks","issue_events_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/events{/number}","events_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/events","assignees_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/assignees{/user}","branches_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/branches{/branch}","tags_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/tags","blobs_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/git/refs{/sha}","trees_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/statuses/{sha}","languages_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/languages","stargazers_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/stargazers","contributors_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/contributors","subscribers_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/subscribers","subscription_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/subscription","commits_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/commits{/sha}","git_commits_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/git/commits{/sha}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/comments{/number}","issue_comment_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/comments{/number}","contents_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/contents/{+path}","compare_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/merges","archive_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/downloads","issues_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues{/number}","pulls_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls{/number}","milestones_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/milestones{/number}","notifications_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/labels{/name}","releases_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/releases{/id}","deployments_url":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/deployments","created_at":"2017-09-15T20:59:27Z","updated_at":"2018-10-10T08:17:22Z","pushed_at":"2018-10-06T02:46:08Z","git_url":"git://github.com/GoogleCloudPlatform/metacontroller.git","ssh_url":"git@github.com:GoogleCloudPlatform/metacontroller.git","clone_url":"https://github.com/GoogleCloudPlatform/metacontroller.git","svn_url":"https://github.com/GoogleCloudPlatform/metacontroller","homepage":"https://metacontroller.app/","size":501,"stargazers_count":408,"watchers_count":408,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":47,"mirror_url":null,"archived":false,"open_issues_count":25,"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":47,"open_issues":25,"watchers":408,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102"},"html":{"href":"https://github.com/GoogleCloudPlatform/metacontroller/pull/102"},"issue":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/102"},"comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/GoogleCloudPlatform/metacontroller/statuses/eceaceb93731c1114d2be0f7f3edee78dd563aa1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"enisoc"}}