{"action":"created","comment":{"url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/comments/198221898","pull_request_review_id":132113800,"id":198221898,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5ODIyMTg5OA==","diff_hunk":"@@ -0,0 +1,91 @@\n+# Spec Reconciliation Proposal\n+\n+## Introduction\n+Add a way for broker to sync the list of specs it has with registries while handling the following corner cases:\n+ 1. Temporary loss of connection with registry\n+ 2. A spec removed from the registry but has provisioned instance/s\n+\n+## Problem Description\n+\n+The current approach of syncing the spec from registries is as follows:\n+ 1. Delete all the specs currently in the datastore\n+ 2. Fetch new specs\n+ 3. Add all the fetched specs to the datastore\n+ \n+This leads to a bunch of bugs [Bug 1583495](https://bugzilla.redhat.com/show_bug.cgi?id=1583495), [Bug 1577810](https://bugzilla.redhat.com/show_bug.cgi?id=1583495), [Bug 1586345](https://bugzilla.redhat.com/show_bug.cgi?id=1586345)\n+\n+\n+Instead, the broker can take the following actions:\n+####Approach#1\n+ 1. Fetch the specs from registry\n+    1. If the fetch fails increment a failed connection counter. If the failed connection counter reaches a limit delete all the specs that do not have a service instance\n+    2. If the fetch succeeds:\n+        1. add new specs to the datastore\n+        2. delete that specs that are removed from datastore and do not have a service instance.\n+        3. mark the specs that are removed from datastore and has a service instance\n+ 2. During deprovision, if the instance getting deprovisioned is the last one delete the spec from datastore","path":"docs/proposals/spec-reconciliation.md","position":26,"original_position":26,"commit_id":"79ce28a1713affbef1001dd56d4ce3cbaefd87de","original_commit_id":"79ce28a1713affbef1001dd56d4ce3cbaefd87de","user":{"login":"alaypatel07","id":8192650,"node_id":"MDQ6VXNlcjgxOTI2NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8192650?v=4","gravatar_id":"","url":"https://api.github.com/users/alaypatel07","html_url":"https://github.com/alaypatel07","followers_url":"https://api.github.com/users/alaypatel07/followers","following_url":"https://api.github.com/users/alaypatel07/following{/other_user}","gists_url":"https://api.github.com/users/alaypatel07/gists{/gist_id}","starred_url":"https://api.github.com/users/alaypatel07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaypatel07/subscriptions","organizations_url":"https://api.github.com/users/alaypatel07/orgs","repos_url":"https://api.github.com/users/alaypatel07/repos","events_url":"https://api.github.com/users/alaypatel07/events{/privacy}","received_events_url":"https://api.github.com/users/alaypatel07/received_events","type":"User","site_admin":false},"body":"Either maintain a counter of the number of instances provisioned in bundle.Spec or compare all the instance specs with the spec of the instance being deprovisioned. I think the former would be better","created_at":"2018-06-26T16:57:26Z","updated_at":"2018-06-26T16:57:26Z","html_url":"https://github.com/openshift/ansible-service-broker/pull/997#discussion_r198221898","pull_request_url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/comments/198221898"},"html":{"href":"https://github.com/openshift/ansible-service-broker/pull/997#discussion_r198221898"},"pull_request":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997"}},"in_reply_to_id":198209169},"pull_request":{"url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997","id":197467881,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NDY3ODgx","html_url":"https://github.com/openshift/ansible-service-broker/pull/997","diff_url":"https://github.com/openshift/ansible-service-broker/pull/997.diff","patch_url":"https://github.com/openshift/ansible-service-broker/pull/997.patch","issue_url":"https://api.github.com/repos/openshift/ansible-service-broker/issues/997","number":997,"state":"open","locked":false,"title":"Reconciliation Proposal","user":{"login":"alaypatel07","id":8192650,"node_id":"MDQ6VXNlcjgxOTI2NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8192650?v=4","gravatar_id":"","url":"https://api.github.com/users/alaypatel07","html_url":"https://github.com/alaypatel07","followers_url":"https://api.github.com/users/alaypatel07/followers","following_url":"https://api.github.com/users/alaypatel07/following{/other_user}","gists_url":"https://api.github.com/users/alaypatel07/gists{/gist_id}","starred_url":"https://api.github.com/users/alaypatel07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaypatel07/subscriptions","organizations_url":"https://api.github.com/users/alaypatel07/orgs","repos_url":"https://api.github.com/users/alaypatel07/repos","events_url":"https://api.github.com/users/alaypatel07/events{/privacy}","received_events_url":"https://api.github.com/users/alaypatel07/received_events","type":"User","site_admin":false},"body":"#### Describe what this PR does and why we need it:\r\n\r\nAdd spec-reconciliation.md","created_at":"2018-06-26T15:41:25Z","updated_at":"2018-06-26T16:57:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"662d3d3f6e8542867b2d5dba55d160eb220d181a","assignee":null,"assignees":[],"requested_reviewers":[{"login":"jmrodri","id":17137,"node_id":"MDQ6VXNlcjE3MTM3","avatar_url":"https://avatars2.githubusercontent.com/u/17137?v=4","gravatar_id":"","url":"https://api.github.com/users/jmrodri","html_url":"https://github.com/jmrodri","followers_url":"https://api.github.com/users/jmrodri/followers","following_url":"https://api.github.com/users/jmrodri/following{/other_user}","gists_url":"https://api.github.com/users/jmrodri/gists{/gist_id}","starred_url":"https://api.github.com/users/jmrodri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmrodri/subscriptions","organizations_url":"https://api.github.com/users/jmrodri/orgs","repos_url":"https://api.github.com/users/jmrodri/repos","events_url":"https://api.github.com/users/jmrodri/events{/privacy}","received_events_url":"https://api.github.com/users/jmrodri/received_events","type":"User","site_admin":false},{"login":"eriknelson","id":410933,"node_id":"MDQ6VXNlcjQxMDkzMw==","avatar_url":"https://avatars3.githubusercontent.com/u/410933?v=4","gravatar_id":"","url":"https://api.github.com/users/eriknelson","html_url":"https://github.com/eriknelson","followers_url":"https://api.github.com/users/eriknelson/followers","following_url":"https://api.github.com/users/eriknelson/following{/other_user}","gists_url":"https://api.github.com/users/eriknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/eriknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eriknelson/subscriptions","organizations_url":"https://api.github.com/users/eriknelson/orgs","repos_url":"https://api.github.com/users/eriknelson/repos","events_url":"https://api.github.com/users/eriknelson/events{/privacy}","received_events_url":"https://api.github.com/users/eriknelson/received_events","type":"User","site_admin":false},{"login":"shawn-hurley","id":1891063,"node_id":"MDQ6VXNlcjE4OTEwNjM=","avatar_url":"https://avatars3.githubusercontent.com/u/1891063?v=4","gravatar_id":"","url":"https://api.github.com/users/shawn-hurley","html_url":"https://github.com/shawn-hurley","followers_url":"https://api.github.com/users/shawn-hurley/followers","following_url":"https://api.github.com/users/shawn-hurley/following{/other_user}","gists_url":"https://api.github.com/users/shawn-hurley/gists{/gist_id}","starred_url":"https://api.github.com/users/shawn-hurley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shawn-hurley/subscriptions","organizations_url":"https://api.github.com/users/shawn-hurley/orgs","repos_url":"https://api.github.com/users/shawn-hurley/repos","events_url":"https://api.github.com/users/shawn-hurley/events{/privacy}","received_events_url":"https://api.github.com/users/shawn-hurley/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":711624007,"node_id":"MDU6TGFiZWw3MTE2MjQwMDc=","url":"https://api.github.com/repos/openshift/ansible-service-broker/labels/size/M","name":"size/M","color":"eebb00","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997/commits","review_comments_url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997/comments","review_comment_url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openshift/ansible-service-broker/issues/997/comments","statuses_url":"https://api.github.com/repos/openshift/ansible-service-broker/statuses/79ce28a1713affbef1001dd56d4ce3cbaefd87de","head":{"label":"alaypatel07:reconciliation-proposal","ref":"reconciliation-proposal","sha":"79ce28a1713affbef1001dd56d4ce3cbaefd87de","user":{"login":"alaypatel07","id":8192650,"node_id":"MDQ6VXNlcjgxOTI2NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8192650?v=4","gravatar_id":"","url":"https://api.github.com/users/alaypatel07","html_url":"https://github.com/alaypatel07","followers_url":"https://api.github.com/users/alaypatel07/followers","following_url":"https://api.github.com/users/alaypatel07/following{/other_user}","gists_url":"https://api.github.com/users/alaypatel07/gists{/gist_id}","starred_url":"https://api.github.com/users/alaypatel07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaypatel07/subscriptions","organizations_url":"https://api.github.com/users/alaypatel07/orgs","repos_url":"https://api.github.com/users/alaypatel07/repos","events_url":"https://api.github.com/users/alaypatel07/events{/privacy}","received_events_url":"https://api.github.com/users/alaypatel07/received_events","type":"User","site_admin":false},"repo":{"id":137245279,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyNDUyNzk=","name":"ansible-service-broker","full_name":"alaypatel07/ansible-service-broker","owner":{"login":"alaypatel07","id":8192650,"node_id":"MDQ6VXNlcjgxOTI2NTA=","avatar_url":"https://avatars3.githubusercontent.com/u/8192650?v=4","gravatar_id":"","url":"https://api.github.com/users/alaypatel07","html_url":"https://github.com/alaypatel07","followers_url":"https://api.github.com/users/alaypatel07/followers","following_url":"https://api.github.com/users/alaypatel07/following{/other_user}","gists_url":"https://api.github.com/users/alaypatel07/gists{/gist_id}","starred_url":"https://api.github.com/users/alaypatel07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alaypatel07/subscriptions","organizations_url":"https://api.github.com/users/alaypatel07/orgs","repos_url":"https://api.github.com/users/alaypatel07/repos","events_url":"https://api.github.com/users/alaypatel07/events{/privacy}","received_events_url":"https://api.github.com/users/alaypatel07/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/alaypatel07/ansible-service-broker","description":"Ansible Service Broker","fork":true,"url":"https://api.github.com/repos/alaypatel07/ansible-service-broker","forks_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/forks","keys_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/teams","hooks_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/hooks","issue_events_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/issues/events{/number}","events_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/events","assignees_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/assignees{/user}","branches_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/branches{/branch}","tags_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/tags","blobs_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/languages","stargazers_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/stargazers","contributors_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/contributors","subscribers_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/subscribers","subscription_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/subscription","commits_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/contents/{+path}","compare_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/merges","archive_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/downloads","issues_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/issues{/number}","pulls_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/labels{/name}","releases_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/releases{/id}","deployments_url":"https://api.github.com/repos/alaypatel07/ansible-service-broker/deployments","created_at":"2018-06-13T16:54:18Z","updated_at":"2018-06-14T18:51:38Z","pushed_at":"2018-06-26T15:35:17Z","git_url":"git://github.com/alaypatel07/ansible-service-broker.git","ssh_url":"git@github.com:alaypatel07/ansible-service-broker.git","clone_url":"https://github.com/alaypatel07/ansible-service-broker.git","svn_url":"https://github.com/alaypatel07/ansible-service-broker","homepage":null,"size":102617,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"openshift:master","ref":"master","sha":"8ff6be90363c905debca43fb4ed32db8d37b6e32","user":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"repo":{"id":79371528,"node_id":"MDEwOlJlcG9zaXRvcnk3OTM3MTUyOA==","name":"ansible-service-broker","full_name":"openshift/ansible-service-broker","owner":{"login":"openshift","id":792337,"node_id":"MDEyOk9yZ2FuaXphdGlvbjc5MjMzNw==","avatar_url":"https://avatars3.githubusercontent.com/u/792337?v=4","gravatar_id":"","url":"https://api.github.com/users/openshift","html_url":"https://github.com/openshift","followers_url":"https://api.github.com/users/openshift/followers","following_url":"https://api.github.com/users/openshift/following{/other_user}","gists_url":"https://api.github.com/users/openshift/gists{/gist_id}","starred_url":"https://api.github.com/users/openshift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openshift/subscriptions","organizations_url":"https://api.github.com/users/openshift/orgs","repos_url":"https://api.github.com/users/openshift/repos","events_url":"https://api.github.com/users/openshift/events{/privacy}","received_events_url":"https://api.github.com/users/openshift/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openshift/ansible-service-broker","description":"Ansible Service Broker","fork":false,"url":"https://api.github.com/repos/openshift/ansible-service-broker","forks_url":"https://api.github.com/repos/openshift/ansible-service-broker/forks","keys_url":"https://api.github.com/repos/openshift/ansible-service-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openshift/ansible-service-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openshift/ansible-service-broker/teams","hooks_url":"https://api.github.com/repos/openshift/ansible-service-broker/hooks","issue_events_url":"https://api.github.com/repos/openshift/ansible-service-broker/issues/events{/number}","events_url":"https://api.github.com/repos/openshift/ansible-service-broker/events","assignees_url":"https://api.github.com/repos/openshift/ansible-service-broker/assignees{/user}","branches_url":"https://api.github.com/repos/openshift/ansible-service-broker/branches{/branch}","tags_url":"https://api.github.com/repos/openshift/ansible-service-broker/tags","blobs_url":"https://api.github.com/repos/openshift/ansible-service-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openshift/ansible-service-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openshift/ansible-service-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/openshift/ansible-service-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openshift/ansible-service-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/openshift/ansible-service-broker/languages","stargazers_url":"https://api.github.com/repos/openshift/ansible-service-broker/stargazers","contributors_url":"https://api.github.com/repos/openshift/ansible-service-broker/contributors","subscribers_url":"https://api.github.com/repos/openshift/ansible-service-broker/subscribers","subscription_url":"https://api.github.com/repos/openshift/ansible-service-broker/subscription","commits_url":"https://api.github.com/repos/openshift/ansible-service-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/openshift/ansible-service-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/openshift/ansible-service-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/openshift/ansible-service-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/openshift/ansible-service-broker/contents/{+path}","compare_url":"https://api.github.com/repos/openshift/ansible-service-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openshift/ansible-service-broker/merges","archive_url":"https://api.github.com/repos/openshift/ansible-service-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openshift/ansible-service-broker/downloads","issues_url":"https://api.github.com/repos/openshift/ansible-service-broker/issues{/number}","pulls_url":"https://api.github.com/repos/openshift/ansible-service-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/openshift/ansible-service-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/openshift/ansible-service-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openshift/ansible-service-broker/labels{/name}","releases_url":"https://api.github.com/repos/openshift/ansible-service-broker/releases{/id}","deployments_url":"https://api.github.com/repos/openshift/ansible-service-broker/deployments","created_at":"2017-01-18T18:40:49Z","updated_at":"2018-06-20T17:22:48Z","pushed_at":"2018-06-26T15:41:26Z","git_url":"git://github.com/openshift/ansible-service-broker.git","ssh_url":"git@github.com:openshift/ansible-service-broker.git","clone_url":"https://github.com/openshift/ansible-service-broker.git","svn_url":"https://github.com/openshift/ansible-service-broker","homepage":null,"size":102615,"stargazers_count":118,"watchers_count":118,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":61,"mirror_url":null,"archived":false,"open_issues_count":51,"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":61,"open_issues":51,"watchers":118,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997"},"html":{"href":"https://github.com/openshift/ansible-service-broker/pull/997"},"issue":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/issues/997"},"comments":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/issues/997/comments"},"review_comments":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997/comments"},"review_comment":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/pulls/997/commits"},"statuses":{"href":"https://api.github.com/repos/openshift/ansible-service-broker/statuses/79ce28a1713affbef1001dd56d4ce3cbaefd87de"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alaypatel07"}}