{"action":"created","comment":{"url":"https://api.github.com/repos/citusdata/citus/pulls/comments/166493453","pull_request_review_id":94563699,"id":166493453,"diff_hunk":"@@ -145,20 +149,26 @@ CollectBasicUsageStatistics(void)\n \t\treturn false;\n \t}\n \n+#ifndef WIN32\n \tunameResult = uname(&unameData);\n \tAssert(unameResult == 0);  /* uname() always succeeds if we pass valid buffer */\n+#endif\n \n \tappendStringInfoString(fields, \"{\\\"citus_version\\\": \");\n \tescape_json(fields, CITUS_VERSION);\n \tappendStringInfo(fields, \",\\\"table_count\\\": \" UINT64_FORMAT, roundedDistTableCount);\n \tappendStringInfo(fields, \",\\\"cluster_size\\\": \" UINT64_FORMAT, roundedClusterSize);\n \tappendStringInfo(fields, \",\\\"worker_node_count\\\": %u\", workerNodeCount);\n+#ifndef WIN32\n \tappendStringInfoString(fields, \",\\\"os_name\\\": \");\n \tescape_json(fields, unameData.sysname);\n \tappendStringInfoString(fields, \",\\\"os_release\\\": \");\n \tescape_json(fields, unameData.release);\n \tappendStringInfoString(fields, \",\\\"hwid\\\": \");\n \tescape_json(fields, unameData.machine);\n+#else\n+\tappendStringInfoString(fields, \",\\\"os_name\\\": \\\"Windows\\\"\");","path":"src/backend/distributed/utils/statistics_collection.c","position":46,"original_position":46,"commit_id":"f1b87b927a602a5c693604a0743ccc0005e0b7d1","original_commit_id":"f1b87b927a602a5c693604a0743ccc0005e0b7d1","user":{"login":"jasonmp85","id":50673,"avatar_url":"https://avatars3.githubusercontent.com/u/50673?v=4","gravatar_id":"","url":"https://api.github.com/users/jasonmp85","html_url":"https://github.com/jasonmp85","followers_url":"https://api.github.com/users/jasonmp85/followers","following_url":"https://api.github.com/users/jasonmp85/following{/other_user}","gists_url":"https://api.github.com/users/jasonmp85/gists{/gist_id}","starred_url":"https://api.github.com/users/jasonmp85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasonmp85/subscriptions","organizations_url":"https://api.github.com/users/jasonmp85/orgs","repos_url":"https://api.github.com/users/jasonmp85/repos","events_url":"https://api.github.com/users/jasonmp85/events{/privacy}","received_events_url":"https://api.github.com/users/jasonmp85/received_events","type":"User","site_admin":false},"body":"OK, so here's how Python does it: https://github.com/python/cpython/blob/aa0735f597b072c0eb00404c4d7df359ddc26755/Python/sysmodule.c#L1050-L1115\r\n\r\nThis just leaves the architecture. Largely academic, I suppose, but Perl's `POSIX` module has a good implementation (they have an entire `uname` shim for Windows)… https://github.com/Perl/perl5/blob/69374fe705978962b85217f3eb828a93f836fd8d/win32/win32.c#L2109-L2137","created_at":"2018-02-07T01:11:28Z","updated_at":"2018-02-07T01:11:28Z","html_url":"https://github.com/citusdata/citus/pull/2002#discussion_r166493453","pull_request_url":"https://api.github.com/repos/citusdata/citus/pulls/2002","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments/166493453"},"html":{"href":"https://github.com/citusdata/citus/pull/2002#discussion_r166493453"},"pull_request":{"href":"https://api.github.com/repos/citusdata/citus/pulls/2002"}},"in_reply_to_id":166485658},"pull_request":{"url":"https://api.github.com/repos/citusdata/citus/pulls/2002","id":167533781,"html_url":"https://github.com/citusdata/citus/pull/2002","diff_url":"https://github.com/citusdata/citus/pull/2002.diff","patch_url":"https://github.com/citusdata/citus/pull/2002.patch","issue_url":"https://api.github.com/repos/citusdata/citus/issues/2002","number":2002,"state":"open","locked":false,"title":"Make statistics collection work on Windows","user":{"login":"lithp","id":466333,"avatar_url":"https://avatars3.githubusercontent.com/u/466333?v=4","gravatar_id":"","url":"https://api.github.com/users/lithp","html_url":"https://github.com/lithp","followers_url":"https://api.github.com/users/lithp/followers","following_url":"https://api.github.com/users/lithp/following{/other_user}","gists_url":"https://api.github.com/users/lithp/gists{/gist_id}","starred_url":"https://api.github.com/users/lithp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lithp/subscriptions","organizations_url":"https://api.github.com/users/lithp/orgs","repos_url":"https://api.github.com/users/lithp/repos","events_url":"https://api.github.com/users/lithp/events{/privacy}","received_events_url":"https://api.github.com/users/lithp/received_events","type":"User","site_admin":false},"body":"Windows doesn't have uname","created_at":"2018-02-06T21:27:53Z","updated_at":"2018-02-07T01:11:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c45b10f532b843f7bfe3b76a0535da978fbab547","assignee":null,"assignees":[],"requested_reviewers":[{"login":"pykello","id":628106,"avatar_url":"https://avatars3.githubusercontent.com/u/628106?v=4","gravatar_id":"","url":"https://api.github.com/users/pykello","html_url":"https://github.com/pykello","followers_url":"https://api.github.com/users/pykello/followers","following_url":"https://api.github.com/users/pykello/following{/other_user}","gists_url":"https://api.github.com/users/pykello/gists{/gist_id}","starred_url":"https://api.github.com/users/pykello/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pykello/subscriptions","organizations_url":"https://api.github.com/users/pykello/orgs","repos_url":"https://api.github.com/users/pykello/repos","events_url":"https://api.github.com/users/pykello/events{/privacy}","received_events_url":"https://api.github.com/users/pykello/received_events","type":"User","site_admin":false}],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/citusdata/citus/pulls/2002/commits","review_comments_url":"https://api.github.com/repos/citusdata/citus/pulls/2002/comments","review_comment_url":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/citusdata/citus/issues/2002/comments","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/f1b87b927a602a5c693604a0743ccc0005e0b7d1","head":{"label":"citusdata:call-home-without-uname","ref":"call-home-without-uname","sha":"f1b87b927a602a5c693604a0743ccc0005e0b7d1","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars2.githubusercontent.com/u/2545424?v=4","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars2.githubusercontent.com/u/2545424?v=4","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for multi-tenant and real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2018-02-06T19:34:35Z","pushed_at":"2018-02-07T00:31:16Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":9667,"stargazers_count":2488,"watchers_count":2488,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":173,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":173,"open_issues":495,"watchers":2488,"default_branch":"master"}},"base":{"label":"citusdata:master","ref":"master","sha":"7332244c8ca3b912ae2f34c157dc6bd8e9c4b904","user":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars2.githubusercontent.com/u/2545424?v=4","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"repo":{"id":50874442,"name":"citus","full_name":"citusdata/citus","owner":{"login":"citusdata","id":2545424,"avatar_url":"https://avatars2.githubusercontent.com/u/2545424?v=4","gravatar_id":"","url":"https://api.github.com/users/citusdata","html_url":"https://github.com/citusdata","followers_url":"https://api.github.com/users/citusdata/followers","following_url":"https://api.github.com/users/citusdata/following{/other_user}","gists_url":"https://api.github.com/users/citusdata/gists{/gist_id}","starred_url":"https://api.github.com/users/citusdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/citusdata/subscriptions","organizations_url":"https://api.github.com/users/citusdata/orgs","repos_url":"https://api.github.com/users/citusdata/repos","events_url":"https://api.github.com/users/citusdata/events{/privacy}","received_events_url":"https://api.github.com/users/citusdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/citusdata/citus","description":"Scalable PostgreSQL for multi-tenant and real-time workloads","fork":false,"url":"https://api.github.com/repos/citusdata/citus","forks_url":"https://api.github.com/repos/citusdata/citus/forks","keys_url":"https://api.github.com/repos/citusdata/citus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/citusdata/citus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/citusdata/citus/teams","hooks_url":"https://api.github.com/repos/citusdata/citus/hooks","issue_events_url":"https://api.github.com/repos/citusdata/citus/issues/events{/number}","events_url":"https://api.github.com/repos/citusdata/citus/events","assignees_url":"https://api.github.com/repos/citusdata/citus/assignees{/user}","branches_url":"https://api.github.com/repos/citusdata/citus/branches{/branch}","tags_url":"https://api.github.com/repos/citusdata/citus/tags","blobs_url":"https://api.github.com/repos/citusdata/citus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/citusdata/citus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/citusdata/citus/git/refs{/sha}","trees_url":"https://api.github.com/repos/citusdata/citus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/citusdata/citus/statuses/{sha}","languages_url":"https://api.github.com/repos/citusdata/citus/languages","stargazers_url":"https://api.github.com/repos/citusdata/citus/stargazers","contributors_url":"https://api.github.com/repos/citusdata/citus/contributors","subscribers_url":"https://api.github.com/repos/citusdata/citus/subscribers","subscription_url":"https://api.github.com/repos/citusdata/citus/subscription","commits_url":"https://api.github.com/repos/citusdata/citus/commits{/sha}","git_commits_url":"https://api.github.com/repos/citusdata/citus/git/commits{/sha}","comments_url":"https://api.github.com/repos/citusdata/citus/comments{/number}","issue_comment_url":"https://api.github.com/repos/citusdata/citus/issues/comments{/number}","contents_url":"https://api.github.com/repos/citusdata/citus/contents/{+path}","compare_url":"https://api.github.com/repos/citusdata/citus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/citusdata/citus/merges","archive_url":"https://api.github.com/repos/citusdata/citus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/citusdata/citus/downloads","issues_url":"https://api.github.com/repos/citusdata/citus/issues{/number}","pulls_url":"https://api.github.com/repos/citusdata/citus/pulls{/number}","milestones_url":"https://api.github.com/repos/citusdata/citus/milestones{/number}","notifications_url":"https://api.github.com/repos/citusdata/citus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/citusdata/citus/labels{/name}","releases_url":"https://api.github.com/repos/citusdata/citus/releases{/id}","deployments_url":"https://api.github.com/repos/citusdata/citus/deployments","created_at":"2016-02-01T21:58:39Z","updated_at":"2018-02-06T19:34:35Z","pushed_at":"2018-02-07T00:31:16Z","git_url":"git://github.com/citusdata/citus.git","ssh_url":"git@github.com:citusdata/citus.git","clone_url":"https://github.com/citusdata/citus.git","svn_url":"https://github.com/citusdata/citus","homepage":"https://www.citusdata.com","size":9667,"stargazers_count":2488,"watchers_count":2488,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":173,"mirror_url":null,"archived":false,"open_issues_count":495,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":173,"open_issues":495,"watchers":2488,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/citusdata/citus/pulls/2002"},"html":{"href":"https://github.com/citusdata/citus/pull/2002"},"issue":{"href":"https://api.github.com/repos/citusdata/citus/issues/2002"},"comments":{"href":"https://api.github.com/repos/citusdata/citus/issues/2002/comments"},"review_comments":{"href":"https://api.github.com/repos/citusdata/citus/pulls/2002/comments"},"review_comment":{"href":"https://api.github.com/repos/citusdata/citus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/citusdata/citus/pulls/2002/commits"},"statuses":{"href":"https://api.github.com/repos/citusdata/citus/statuses/f1b87b927a602a5c693604a0743ccc0005e0b7d1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"jasonmp85"}}