{"action":"opened","number":14,"pull_request":{"url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14","id":230606634,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwNjA2NjM0","html_url":"https://github.com/OpenGov-OpenData/ckan/pull/14","diff_url":"https://github.com/OpenGov-OpenData/ckan/pull/14.diff","patch_url":"https://github.com/OpenGov-OpenData/ckan/pull/14.patch","issue_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/14","number":14,"state":"open","locked":false,"title":"[OD-889] Change datastore read functions to use read connection","user":{"login":"jguo144","id":4096633,"node_id":"MDQ6VXNlcjQwOTY2MzM=","avatar_url":"https://avatars1.githubusercontent.com/u/4096633?v=4","gravatar_id":"","url":"https://api.github.com/users/jguo144","html_url":"https://github.com/jguo144","followers_url":"https://api.github.com/users/jguo144/followers","following_url":"https://api.github.com/users/jguo144/following{/other_user}","gists_url":"https://api.github.com/users/jguo144/gists{/gist_id}","starred_url":"https://api.github.com/users/jguo144/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jguo144/subscriptions","organizations_url":"https://api.github.com/users/jguo144/orgs","repos_url":"https://api.github.com/users/jguo144/repos","events_url":"https://api.github.com/users/jguo144/events{/privacy}","received_events_url":"https://api.github.com/users/jguo144/received_events","type":"User","site_admin":false},"body":"## [Ticket](https://opengovinc.atlassian.net/browse/OD-889)\r\n\r\n## Description\r\nChange datastore read functions to use read connection. The datastore_search_sql API call can use the read connection without problems.\r\n\r\nHowever, the datastore_search API call requires a user with write permission on the read connection due to the way private datasets are handled in CKAN. This means that the CKAN configuration ini file will need a new option called `ckan.datastore.write_url_search`, which is the write user connecting to the read replica. The write_url_search connection will not be used for any write actions.\r\n\r\n```\r\nckan.datastore.read_url = postgresql://datastore_default:pass@readDB/datastore_default\r\nckan.datastore.write_url = postgresql://ckan_default:pass@writeDB/datastore_default\r\nckan.datastore.write_url_search = postgresql://ckan_default:pass@readDB/datastore_default\r\n```\r\n\r\nThis PR is based on this [commit](https://github.com/ckan/ckan/commit/65041521e701e5cd0643f1fdf0b3a6135cd99d50#diff-45f8517b4df82b1a8c3003bcdde077c1) made on CKAN 2.8.\r\n\r\n### Features:\r\n\r\n- [ ] includes tests covering changes\r\n- [ ] includes updated documentation\r\n- [ ] includes user-visible changes\r\n- [ ] includes API changes\r\n- [ ] includes bugfix for possible backport\r\n\r\nPlease [X] all the boxes above that apply\r\n","created_at":"2018-11-13T20:01:24Z","updated_at":"2018-11-13T20:01:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":{"login":"injune1123","id":12467641,"node_id":"MDQ6VXNlcjEyNDY3NjQx","avatar_url":"https://avatars3.githubusercontent.com/u/12467641?v=4","gravatar_id":"","url":"https://api.github.com/users/injune1123","html_url":"https://github.com/injune1123","followers_url":"https://api.github.com/users/injune1123/followers","following_url":"https://api.github.com/users/injune1123/following{/other_user}","gists_url":"https://api.github.com/users/injune1123/gists{/gist_id}","starred_url":"https://api.github.com/users/injune1123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/injune1123/subscriptions","organizations_url":"https://api.github.com/users/injune1123/orgs","repos_url":"https://api.github.com/users/injune1123/repos","events_url":"https://api.github.com/users/injune1123/events{/privacy}","received_events_url":"https://api.github.com/users/injune1123/received_events","type":"User","site_admin":false},"assignees":[{"login":"injune1123","id":12467641,"node_id":"MDQ6VXNlcjEyNDY3NjQx","avatar_url":"https://avatars3.githubusercontent.com/u/12467641?v=4","gravatar_id":"","url":"https://api.github.com/users/injune1123","html_url":"https://github.com/injune1123","followers_url":"https://api.github.com/users/injune1123/followers","following_url":"https://api.github.com/users/injune1123/following{/other_user}","gists_url":"https://api.github.com/users/injune1123/gists{/gist_id}","starred_url":"https://api.github.com/users/injune1123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/injune1123/subscriptions","organizations_url":"https://api.github.com/users/injune1123/orgs","repos_url":"https://api.github.com/users/injune1123/repos","events_url":"https://api.github.com/users/injune1123/events{/privacy}","received_events_url":"https://api.github.com/users/injune1123/received_events","type":"User","site_admin":false},{"login":"ankitbrana","id":39746342,"node_id":"MDQ6VXNlcjM5NzQ2MzQy","avatar_url":"https://avatars0.githubusercontent.com/u/39746342?v=4","gravatar_id":"","url":"https://api.github.com/users/ankitbrana","html_url":"https://github.com/ankitbrana","followers_url":"https://api.github.com/users/ankitbrana/followers","following_url":"https://api.github.com/users/ankitbrana/following{/other_user}","gists_url":"https://api.github.com/users/ankitbrana/gists{/gist_id}","starred_url":"https://api.github.com/users/ankitbrana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ankitbrana/subscriptions","organizations_url":"https://api.github.com/users/ankitbrana/orgs","repos_url":"https://api.github.com/users/ankitbrana/repos","events_url":"https://api.github.com/users/ankitbrana/events{/privacy}","received_events_url":"https://api.github.com/users/ankitbrana/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14/commits","review_comments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14/comments","review_comment_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/14/comments","statuses_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/statuses/1eb6740f47c5165c67cd14092c0884acbbebb684","head":{"label":"OpenGov-OpenData:datastore-search-read-connection","ref":"datastore-search-read-connection","sha":"1eb6740f47c5165c67cd14092c0884acbbebb684","user":{"login":"OpenGov-OpenData","id":2539348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzkzNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2539348?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenGov-OpenData","html_url":"https://github.com/OpenGov-OpenData","followers_url":"https://api.github.com/users/OpenGov-OpenData/followers","following_url":"https://api.github.com/users/OpenGov-OpenData/following{/other_user}","gists_url":"https://api.github.com/users/OpenGov-OpenData/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenGov-OpenData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenGov-OpenData/subscriptions","organizations_url":"https://api.github.com/users/OpenGov-OpenData/orgs","repos_url":"https://api.github.com/users/OpenGov-OpenData/repos","events_url":"https://api.github.com/users/OpenGov-OpenData/events{/privacy}","received_events_url":"https://api.github.com/users/OpenGov-OpenData/received_events","type":"Organization","site_admin":false},"repo":{"id":75882541,"node_id":"MDEwOlJlcG9zaXRvcnk3NTg4MjU0MQ==","name":"ckan","full_name":"OpenGov-OpenData/ckan","private":false,"owner":{"login":"OpenGov-OpenData","id":2539348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzkzNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2539348?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenGov-OpenData","html_url":"https://github.com/OpenGov-OpenData","followers_url":"https://api.github.com/users/OpenGov-OpenData/followers","following_url":"https://api.github.com/users/OpenGov-OpenData/following{/other_user}","gists_url":"https://api.github.com/users/OpenGov-OpenData/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenGov-OpenData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenGov-OpenData/subscriptions","organizations_url":"https://api.github.com/users/OpenGov-OpenData/orgs","repos_url":"https://api.github.com/users/OpenGov-OpenData/repos","events_url":"https://api.github.com/users/OpenGov-OpenData/events{/privacy}","received_events_url":"https://api.github.com/users/OpenGov-OpenData/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OpenGov-OpenData/ckan","description":"CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers datahub.io, catalog.data.gov and data.gov.uk among many other sites.","fork":true,"url":"https://api.github.com/repos/OpenGov-OpenData/ckan","forks_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/forks","keys_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/teams","hooks_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/hooks","issue_events_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/events{/number}","events_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/events","assignees_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/assignees{/user}","branches_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/branches{/branch}","tags_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/tags","blobs_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/languages","stargazers_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/stargazers","contributors_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/contributors","subscribers_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/subscribers","subscription_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/subscription","commits_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/contents/{+path}","compare_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/merges","archive_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/downloads","issues_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues{/number}","pulls_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/labels{/name}","releases_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/releases{/id}","deployments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/deployments","created_at":"2016-12-07T22:55:24Z","updated_at":"2018-11-12T19:09:36Z","pushed_at":"2018-11-13T18:36:53Z","git_url":"git://github.com/OpenGov-OpenData/ckan.git","ssh_url":"git@github.com:OpenGov-OpenData/ckan.git","clone_url":"https://github.com/OpenGov-OpenData/ckan.git","svn_url":"https://github.com/OpenGov-OpenData/ckan","homepage":"http://ckan.org/","size":140942,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"OpenGov-OpenData:release-v2.7.3-opengov","ref":"release-v2.7.3-opengov","sha":"9ea61c4168b3b36fa515474dbfc219a3d3cb950b","user":{"login":"OpenGov-OpenData","id":2539348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzkzNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2539348?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenGov-OpenData","html_url":"https://github.com/OpenGov-OpenData","followers_url":"https://api.github.com/users/OpenGov-OpenData/followers","following_url":"https://api.github.com/users/OpenGov-OpenData/following{/other_user}","gists_url":"https://api.github.com/users/OpenGov-OpenData/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenGov-OpenData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenGov-OpenData/subscriptions","organizations_url":"https://api.github.com/users/OpenGov-OpenData/orgs","repos_url":"https://api.github.com/users/OpenGov-OpenData/repos","events_url":"https://api.github.com/users/OpenGov-OpenData/events{/privacy}","received_events_url":"https://api.github.com/users/OpenGov-OpenData/received_events","type":"Organization","site_admin":false},"repo":{"id":75882541,"node_id":"MDEwOlJlcG9zaXRvcnk3NTg4MjU0MQ==","name":"ckan","full_name":"OpenGov-OpenData/ckan","private":false,"owner":{"login":"OpenGov-OpenData","id":2539348,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI1MzkzNDg=","avatar_url":"https://avatars2.githubusercontent.com/u/2539348?v=4","gravatar_id":"","url":"https://api.github.com/users/OpenGov-OpenData","html_url":"https://github.com/OpenGov-OpenData","followers_url":"https://api.github.com/users/OpenGov-OpenData/followers","following_url":"https://api.github.com/users/OpenGov-OpenData/following{/other_user}","gists_url":"https://api.github.com/users/OpenGov-OpenData/gists{/gist_id}","starred_url":"https://api.github.com/users/OpenGov-OpenData/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OpenGov-OpenData/subscriptions","organizations_url":"https://api.github.com/users/OpenGov-OpenData/orgs","repos_url":"https://api.github.com/users/OpenGov-OpenData/repos","events_url":"https://api.github.com/users/OpenGov-OpenData/events{/privacy}","received_events_url":"https://api.github.com/users/OpenGov-OpenData/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/OpenGov-OpenData/ckan","description":"CKAN is an open-source DMS (data management system) for powering data hubs and data portals. CKAN makes it easy to publish, share and use data. It powers datahub.io, catalog.data.gov and data.gov.uk among many other sites.","fork":true,"url":"https://api.github.com/repos/OpenGov-OpenData/ckan","forks_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/forks","keys_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/teams","hooks_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/hooks","issue_events_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/events{/number}","events_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/events","assignees_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/assignees{/user}","branches_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/branches{/branch}","tags_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/tags","blobs_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/refs{/sha}","trees_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/statuses/{sha}","languages_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/languages","stargazers_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/stargazers","contributors_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/contributors","subscribers_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/subscribers","subscription_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/subscription","commits_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/commits{/sha}","git_commits_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/git/commits{/sha}","comments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/comments{/number}","issue_comment_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/comments{/number}","contents_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/contents/{+path}","compare_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/merges","archive_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/downloads","issues_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues{/number}","pulls_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls{/number}","milestones_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/milestones{/number}","notifications_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/labels{/name}","releases_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/releases{/id}","deployments_url":"https://api.github.com/repos/OpenGov-OpenData/ckan/deployments","created_at":"2016-12-07T22:55:24Z","updated_at":"2018-11-12T19:09:36Z","pushed_at":"2018-11-13T18:36:53Z","git_url":"git://github.com/OpenGov-OpenData/ckan.git","ssh_url":"git@github.com:OpenGov-OpenData/ckan.git","clone_url":"https://github.com/OpenGov-OpenData/ckan.git","svn_url":"https://github.com/OpenGov-OpenData/ckan","homepage":"http://ckan.org/","size":140942,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":7,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14"},"html":{"href":"https://github.com/OpenGov-OpenData/ckan/pull/14"},"issue":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/14"},"comments":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/issues/14/comments"},"review_comments":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14/comments"},"review_comment":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/pulls/14/commits"},"statuses":{"href":"https://api.github.com/repos/OpenGov-OpenData/ckan/statuses/1eb6740f47c5165c67cd14092c0884acbbebb684"}},"author_association":"COLLABORATOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":8,"deletions":6,"changed_files":1}}
{"actor":{"display_login":"jguo144"}}