{"action":"created","comment":{"url":"https://api.github.com/repos/open-io/oio-sds/pulls/comments/233535652","pull_request_review_id":174972803,"id":233535652,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMzUzNTY1Mg==","diff_hunk":"@@ -1019,12 +1022,44 @@ meta1_backend_services_poll(struct meta1_backend_s *m1,\n \treturn err;\n }\n \n+static GError *\n+__services_list_append_account_and_container(gchar ***interm_result,\n+\t\tstruct oio_url_s *url)\n+{\n+\tGError *err = NULL;\n+\n+\tconst char *acc = oio_url_get(url, OIOURL_ACCOUNT);\n+\tif (acc == NULL) {\n+\t\terr = NEWERROR(CODE_INTERNAL_ERROR, \"[%s] Unable to add account \"\n+\t\t\t\t\"to services list.\", __FUNCTION__);\n+\t\tgoto end;\n+\t}\n+\n+\tgchar *packed_acc = g_strdup_printf(SQLX_ADMIN_ACCOUNT \":%s\", acc);\n+\t*interm_result = oio_strv_append(*interm_result, packed_acc);","path":"meta1v2/meta1_backend_services.c","position":28,"original_position":28,"commit_id":"cef43b9d3467ba977467a83f6cf974849992b622","original_commit_id":"cef43b9d3467ba977467a83f6cf974849992b622","user":{"login":"murlock","id":250625,"node_id":"MDQ6VXNlcjI1MDYyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/250625?v=4","gravatar_id":"","url":"https://api.github.com/users/murlock","html_url":"https://github.com/murlock","followers_url":"https://api.github.com/users/murlock/followers","following_url":"https://api.github.com/users/murlock/following{/other_user}","gists_url":"https://api.github.com/users/murlock/gists{/gist_id}","starred_url":"https://api.github.com/users/murlock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/murlock/subscriptions","organizations_url":"https://api.github.com/users/murlock/orgs","repos_url":"https://api.github.com/users/murlock/repos","events_url":"https://api.github.com/users/murlock/events{/privacy}","received_events_url":"https://api.github.com/users/murlock/received_events","type":"User","site_admin":false},"body":"We should move these two lines after extracting / testing OIOURL_USER ?","created_at":"2018-11-14T17:03:03Z","updated_at":"2018-11-14T17:17:15Z","html_url":"https://github.com/open-io/oio-sds/pull/1598#discussion_r233535652","pull_request_url":"https://api.github.com/repos/open-io/oio-sds/pulls/1598","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/comments/233535652"},"html":{"href":"https://github.com/open-io/oio-sds/pull/1598#discussion_r233535652"},"pull_request":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/1598"}}},"pull_request":{"url":"https://api.github.com/repos/open-io/oio-sds/pulls/1598","id":230127363,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwMTI3MzYz","html_url":"https://github.com/open-io/oio-sds/pull/1598","diff_url":"https://github.com/open-io/oio-sds/pull/1598.diff","patch_url":"https://github.com/open-io/oio-sds/pull/1598.patch","issue_url":"https://api.github.com/repos/open-io/oio-sds/issues/1598","number":1598,"state":"open","locked":false,"title":"Resolve CID on reference show and return account and container names","user":{"login":"aneutron","id":933354,"node_id":"MDQ6VXNlcjkzMzM1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/933354?v=4","gravatar_id":"","url":"https://api.github.com/users/aneutron","html_url":"https://github.com/aneutron","followers_url":"https://api.github.com/users/aneutron/followers","following_url":"https://api.github.com/users/aneutron/following{/other_user}","gists_url":"https://api.github.com/users/aneutron/gists{/gist_id}","starred_url":"https://api.github.com/users/aneutron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aneutron/subscriptions","organizations_url":"https://api.github.com/users/aneutron/orgs","repos_url":"https://api.github.com/users/aneutron/repos","events_url":"https://api.github.com/users/aneutron/events{/privacy}","received_events_url":"https://api.github.com/users/aneutron/received_events","type":"User","site_admin":false},"body":"##### SUMMARY\r\n<!--- Describe the change, including rationale and design decisions -->\r\nThe endpoint `/v3.0/reference/show` now returns the account and container names associated with the resolved reference, which would enable resolving the account / container associated with a certain CID.\r\n\r\nThe changes made are as follows:\r\n- `oio-meta1-server`: The SRV_LIST reply now includes two additional prefixed strings that contain the container and account name.\r\n- `meta1_remote`: The `meta1v2_remote_list_reference_services` functions intercepts the reply, extracts the account and container and fills the `oio_url_s` object accordingly, while returning the usual service list.\r\n- `oio-proxy`: Returns two new fields `account` and `name` representing respectively the account name and the container name.\r\n\r\nBefore:\r\n```\r\n{\r\n    \"cid\": \"D7D9B4A795FBFE86481F432B50BB04E4F9F826D0296A35E30062115651CF5D41\",\r\n    \"dir\": [\r\n       ...\r\n    ],\r\n    \"srv\": [\r\n       ...\r\n    ]\r\n}\r\n```\r\n\r\nAfter:\r\n```\r\n{\r\n    \"cid\": \"D7D9B4A795FBFE86481F432B50BB04E4F9F826D0296A35E30062115651CF5D41\",\r\n    \"account\": \"testacc\",\r\n     \"dir\": [\r\n       ...\r\n    ],\r\n    \"name\": \"testcontainer\",\r\n    \"srv\": [\r\n        ...\r\n    ]\r\n}\r\n```\r\n##### ISSUE TYPE\r\n<!--- Pick one below and delete the rest: -->\r\n - Feature Pull Request\r\n\r\n##### COMPONENT NAME\r\n`oio-meta1-server`, `meta1remote`, `oio-proxy`\r\n\r\n##### SDS VERSION\r\n```\r\nopenio 4.3.0.0b2.dev4\r\n```\r\n\r\n\r\n##### ADDITIONAL INFORMATION\r\n<!---\r\nInclude additional information to help people understand the change here.\r\nFor bugs that don't have a linked bug report, a step-by-step reproduction\r\nof the problem is helpful.\r\n  -->\r\n\r\n<!--- Paste verbatim command output below, e.g. before and after your change -->\r\n```\r\nNone\r\n```\r\n","created_at":"2018-11-12T13:04:08Z","updated_at":"2018-11-14T17:17:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"382a4a0f3c106fd70e41d08fb198008a1a1eb77f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"AymericDu","id":7973460,"node_id":"MDQ6VXNlcjc5NzM0NjA=","avatar_url":"https://avatars2.githubusercontent.com/u/7973460?v=4","gravatar_id":"","url":"https://api.github.com/users/AymericDu","html_url":"https://github.com/AymericDu","followers_url":"https://api.github.com/users/AymericDu/followers","following_url":"https://api.github.com/users/AymericDu/following{/other_user}","gists_url":"https://api.github.com/users/AymericDu/gists{/gist_id}","starred_url":"https://api.github.com/users/AymericDu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AymericDu/subscriptions","organizations_url":"https://api.github.com/users/AymericDu/orgs","repos_url":"https://api.github.com/users/AymericDu/repos","events_url":"https://api.github.com/users/AymericDu/events{/privacy}","received_events_url":"https://api.github.com/users/AymericDu/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/open-io/oio-sds/pulls/1598/commits","review_comments_url":"https://api.github.com/repos/open-io/oio-sds/pulls/1598/comments","review_comment_url":"https://api.github.com/repos/open-io/oio-sds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/open-io/oio-sds/issues/1598/comments","statuses_url":"https://api.github.com/repos/open-io/oio-sds/statuses/cef43b9d3467ba977467a83f6cf974849992b622","head":{"label":"aneutron:proxy-cid-resolve","ref":"proxy-cid-resolve","sha":"cef43b9d3467ba977467a83f6cf974849992b622","user":{"login":"aneutron","id":933354,"node_id":"MDQ6VXNlcjkzMzM1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/933354?v=4","gravatar_id":"","url":"https://api.github.com/users/aneutron","html_url":"https://github.com/aneutron","followers_url":"https://api.github.com/users/aneutron/followers","following_url":"https://api.github.com/users/aneutron/following{/other_user}","gists_url":"https://api.github.com/users/aneutron/gists{/gist_id}","starred_url":"https://api.github.com/users/aneutron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aneutron/subscriptions","organizations_url":"https://api.github.com/users/aneutron/orgs","repos_url":"https://api.github.com/users/aneutron/repos","events_url":"https://api.github.com/users/aneutron/events{/privacy}","received_events_url":"https://api.github.com/users/aneutron/received_events","type":"User","site_admin":false},"repo":{"id":142432667,"node_id":"MDEwOlJlcG9zaXRvcnkxNDI0MzI2Njc=","name":"oio-sds","full_name":"aneutron/oio-sds","private":false,"owner":{"login":"aneutron","id":933354,"node_id":"MDQ6VXNlcjkzMzM1NA==","avatar_url":"https://avatars1.githubusercontent.com/u/933354?v=4","gravatar_id":"","url":"https://api.github.com/users/aneutron","html_url":"https://github.com/aneutron","followers_url":"https://api.github.com/users/aneutron/followers","following_url":"https://api.github.com/users/aneutron/following{/other_user}","gists_url":"https://api.github.com/users/aneutron/gists{/gist_id}","starred_url":"https://api.github.com/users/aneutron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aneutron/subscriptions","organizations_url":"https://api.github.com/users/aneutron/orgs","repos_url":"https://api.github.com/users/aneutron/repos","events_url":"https://api.github.com/users/aneutron/events{/privacy}","received_events_url":"https://api.github.com/users/aneutron/received_events","type":"User","site_admin":false},"html_url":"https://github.com/aneutron/oio-sds","description":"OpenIO Software Defined Storage","fork":true,"url":"https://api.github.com/repos/aneutron/oio-sds","forks_url":"https://api.github.com/repos/aneutron/oio-sds/forks","keys_url":"https://api.github.com/repos/aneutron/oio-sds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/aneutron/oio-sds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/aneutron/oio-sds/teams","hooks_url":"https://api.github.com/repos/aneutron/oio-sds/hooks","issue_events_url":"https://api.github.com/repos/aneutron/oio-sds/issues/events{/number}","events_url":"https://api.github.com/repos/aneutron/oio-sds/events","assignees_url":"https://api.github.com/repos/aneutron/oio-sds/assignees{/user}","branches_url":"https://api.github.com/repos/aneutron/oio-sds/branches{/branch}","tags_url":"https://api.github.com/repos/aneutron/oio-sds/tags","blobs_url":"https://api.github.com/repos/aneutron/oio-sds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/aneutron/oio-sds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/aneutron/oio-sds/git/refs{/sha}","trees_url":"https://api.github.com/repos/aneutron/oio-sds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/aneutron/oio-sds/statuses/{sha}","languages_url":"https://api.github.com/repos/aneutron/oio-sds/languages","stargazers_url":"https://api.github.com/repos/aneutron/oio-sds/stargazers","contributors_url":"https://api.github.com/repos/aneutron/oio-sds/contributors","subscribers_url":"https://api.github.com/repos/aneutron/oio-sds/subscribers","subscription_url":"https://api.github.com/repos/aneutron/oio-sds/subscription","commits_url":"https://api.github.com/repos/aneutron/oio-sds/commits{/sha}","git_commits_url":"https://api.github.com/repos/aneutron/oio-sds/git/commits{/sha}","comments_url":"https://api.github.com/repos/aneutron/oio-sds/comments{/number}","issue_comment_url":"https://api.github.com/repos/aneutron/oio-sds/issues/comments{/number}","contents_url":"https://api.github.com/repos/aneutron/oio-sds/contents/{+path}","compare_url":"https://api.github.com/repos/aneutron/oio-sds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/aneutron/oio-sds/merges","archive_url":"https://api.github.com/repos/aneutron/oio-sds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/aneutron/oio-sds/downloads","issues_url":"https://api.github.com/repos/aneutron/oio-sds/issues{/number}","pulls_url":"https://api.github.com/repos/aneutron/oio-sds/pulls{/number}","milestones_url":"https://api.github.com/repos/aneutron/oio-sds/milestones{/number}","notifications_url":"https://api.github.com/repos/aneutron/oio-sds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/aneutron/oio-sds/labels{/name}","releases_url":"https://api.github.com/repos/aneutron/oio-sds/releases{/id}","deployments_url":"https://api.github.com/repos/aneutron/oio-sds/deployments","created_at":"2018-07-26T11:37:24Z","updated_at":"2018-11-08T16:20:31Z","pushed_at":"2018-11-14T14:42:31Z","git_url":"git://github.com/aneutron/oio-sds.git","ssh_url":"git@github.com:aneutron/oio-sds.git","clone_url":"https://github.com/aneutron/oio-sds.git","svn_url":"https://github.com/aneutron/oio-sds","homepage":null,"size":16888,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"open-io:master","ref":"master","sha":"5c1feed7744776246ae9850e9669c2557fbd467b","user":{"login":"open-io","id":11300184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzAwMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/11300184?v=4","gravatar_id":"","url":"https://api.github.com/users/open-io","html_url":"https://github.com/open-io","followers_url":"https://api.github.com/users/open-io/followers","following_url":"https://api.github.com/users/open-io/following{/other_user}","gists_url":"https://api.github.com/users/open-io/gists{/gist_id}","starred_url":"https://api.github.com/users/open-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-io/subscriptions","organizations_url":"https://api.github.com/users/open-io/orgs","repos_url":"https://api.github.com/users/open-io/repos","events_url":"https://api.github.com/users/open-io/events{/privacy}","received_events_url":"https://api.github.com/users/open-io/received_events","type":"Organization","site_admin":false},"repo":{"id":32169193,"node_id":"MDEwOlJlcG9zaXRvcnkzMjE2OTE5Mw==","name":"oio-sds","full_name":"open-io/oio-sds","private":false,"owner":{"login":"open-io","id":11300184,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExMzAwMTg0","avatar_url":"https://avatars1.githubusercontent.com/u/11300184?v=4","gravatar_id":"","url":"https://api.github.com/users/open-io","html_url":"https://github.com/open-io","followers_url":"https://api.github.com/users/open-io/followers","following_url":"https://api.github.com/users/open-io/following{/other_user}","gists_url":"https://api.github.com/users/open-io/gists{/gist_id}","starred_url":"https://api.github.com/users/open-io/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/open-io/subscriptions","organizations_url":"https://api.github.com/users/open-io/orgs","repos_url":"https://api.github.com/users/open-io/repos","events_url":"https://api.github.com/users/open-io/events{/privacy}","received_events_url":"https://api.github.com/users/open-io/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/open-io/oio-sds","description":"OpenIO Software Defined Storage, Flexible + Smart + Fast","fork":false,"url":"https://api.github.com/repos/open-io/oio-sds","forks_url":"https://api.github.com/repos/open-io/oio-sds/forks","keys_url":"https://api.github.com/repos/open-io/oio-sds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/open-io/oio-sds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/open-io/oio-sds/teams","hooks_url":"https://api.github.com/repos/open-io/oio-sds/hooks","issue_events_url":"https://api.github.com/repos/open-io/oio-sds/issues/events{/number}","events_url":"https://api.github.com/repos/open-io/oio-sds/events","assignees_url":"https://api.github.com/repos/open-io/oio-sds/assignees{/user}","branches_url":"https://api.github.com/repos/open-io/oio-sds/branches{/branch}","tags_url":"https://api.github.com/repos/open-io/oio-sds/tags","blobs_url":"https://api.github.com/repos/open-io/oio-sds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/open-io/oio-sds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/open-io/oio-sds/git/refs{/sha}","trees_url":"https://api.github.com/repos/open-io/oio-sds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/open-io/oio-sds/statuses/{sha}","languages_url":"https://api.github.com/repos/open-io/oio-sds/languages","stargazers_url":"https://api.github.com/repos/open-io/oio-sds/stargazers","contributors_url":"https://api.github.com/repos/open-io/oio-sds/contributors","subscribers_url":"https://api.github.com/repos/open-io/oio-sds/subscribers","subscription_url":"https://api.github.com/repos/open-io/oio-sds/subscription","commits_url":"https://api.github.com/repos/open-io/oio-sds/commits{/sha}","git_commits_url":"https://api.github.com/repos/open-io/oio-sds/git/commits{/sha}","comments_url":"https://api.github.com/repos/open-io/oio-sds/comments{/number}","issue_comment_url":"https://api.github.com/repos/open-io/oio-sds/issues/comments{/number}","contents_url":"https://api.github.com/repos/open-io/oio-sds/contents/{+path}","compare_url":"https://api.github.com/repos/open-io/oio-sds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/open-io/oio-sds/merges","archive_url":"https://api.github.com/repos/open-io/oio-sds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/open-io/oio-sds/downloads","issues_url":"https://api.github.com/repos/open-io/oio-sds/issues{/number}","pulls_url":"https://api.github.com/repos/open-io/oio-sds/pulls{/number}","milestones_url":"https://api.github.com/repos/open-io/oio-sds/milestones{/number}","notifications_url":"https://api.github.com/repos/open-io/oio-sds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/open-io/oio-sds/labels{/name}","releases_url":"https://api.github.com/repos/open-io/oio-sds/releases{/id}","deployments_url":"https://api.github.com/repos/open-io/oio-sds/deployments","created_at":"2015-03-13T17:06:25Z","updated_at":"2018-11-13T17:46:38Z","pushed_at":"2018-11-14T15:28:43Z","git_url":"git://github.com/open-io/oio-sds.git","ssh_url":"git@github.com:open-io/oio-sds.git","clone_url":"https://github.com/open-io/oio-sds.git","svn_url":"https://github.com/open-io/oio-sds","homepage":"http://openio.io","size":17378,"stargazers_count":291,"watchers_count":291,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":34,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":64,"open_issues":34,"watchers":291,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/1598"},"html":{"href":"https://github.com/open-io/oio-sds/pull/1598"},"issue":{"href":"https://api.github.com/repos/open-io/oio-sds/issues/1598"},"comments":{"href":"https://api.github.com/repos/open-io/oio-sds/issues/1598/comments"},"review_comments":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/1598/comments"},"review_comment":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/open-io/oio-sds/pulls/1598/commits"},"statuses":{"href":"https://api.github.com/repos/open-io/oio-sds/statuses/cef43b9d3467ba977467a83f6cf974849992b622"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"murlock"}}