{"action":"created","comment":{"url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/comments/366499197","pull_request_review_id":342743020,"id":366499197,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM2NjQ5OTE5Nw==","diff_hunk":"@@ -113,10 +116,13 @@ func GetHost() (string, error) {\n }\n \n func GetStateDir() string {\n-\tstateDir := os.Getenv(\"GPUPGRADE_HOME\")\n-\tif stateDir == \"\" {\n-\t\tstateDir = filepath.Join(os.Getenv(\"HOME\"), \".gpupgrade\")\n-\t}\n+\n+\tsetStateDirOnce.Do(func() {","path":"utils/sys_utils.go","position":24,"original_position":28,"commit_id":"09c5aec5c1e4e417955437336e36b77afcf3336c","original_commit_id":"c85ee896916bc4be25d08dc3510299be41d44a27","user":{"login":"dkrieger-pvtl","id":42985115,"node_id":"MDQ6VXNlcjQyOTg1MTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42985115?v=4","gravatar_id":"","url":"https://api.github.com/users/dkrieger-pvtl","html_url":"https://github.com/dkrieger-pvtl","followers_url":"https://api.github.com/users/dkrieger-pvtl/followers","following_url":"https://api.github.com/users/dkrieger-pvtl/following{/other_user}","gists_url":"https://api.github.com/users/dkrieger-pvtl/gists{/gist_id}","starred_url":"https://api.github.com/users/dkrieger-pvtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkrieger-pvtl/subscriptions","organizations_url":"https://api.github.com/users/dkrieger-pvtl/orgs","repos_url":"https://api.github.com/users/dkrieger-pvtl/repos","events_url":"https://api.github.com/users/dkrieger-pvtl/events{/privacy}","received_events_url":"https://api.github.com/users/dkrieger-pvtl/received_events","type":"User","site_admin":false},"body":"That's outside the scope of the current gpupgrade...we never intended to support this.","created_at":"2020-01-14T18:24:44Z","updated_at":"2020-01-14T18:24:44Z","html_url":"https://github.com/greenplum-db/gpupgrade/pull/175#discussion_r366499197","pull_request_url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/comments/366499197"},"html":{"href":"https://github.com/greenplum-db/gpupgrade/pull/175#discussion_r366499197"},"pull_request":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175"}},"in_reply_to_id":366074963},"pull_request":{"url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175","id":361683637,"node_id":"MDExOlB1bGxSZXF1ZXN0MzYxNjgzNjM3","html_url":"https://github.com/greenplum-db/gpupgrade/pull/175","diff_url":"https://github.com/greenplum-db/gpupgrade/pull/175.diff","patch_url":"https://github.com/greenplum-db/gpupgrade/pull/175.patch","issue_url":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/175","number":175,"state":"open","locked":false,"title":"make creation of the state directory a singleton","user":{"login":"dkrieger-pvtl","id":42985115,"node_id":"MDQ6VXNlcjQyOTg1MTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42985115?v=4","gravatar_id":"","url":"https://api.github.com/users/dkrieger-pvtl","html_url":"https://github.com/dkrieger-pvtl","followers_url":"https://api.github.com/users/dkrieger-pvtl/followers","following_url":"https://api.github.com/users/dkrieger-pvtl/following{/other_user}","gists_url":"https://api.github.com/users/dkrieger-pvtl/gists{/gist_id}","starred_url":"https://api.github.com/users/dkrieger-pvtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkrieger-pvtl/subscriptions","organizations_url":"https://api.github.com/users/dkrieger-pvtl/orgs","repos_url":"https://api.github.com/users/dkrieger-pvtl/repos","events_url":"https://api.github.com/users/dkrieger-pvtl/events{/privacy}","received_events_url":"https://api.github.com/users/dkrieger-pvtl/received_events","type":"User","site_admin":false},"body":"GetStateDir(): make this a singleton via sync.Once\r\n\r\nThis function uses the GPUPGRADE_HOME or HOME environment variables, so\r\nwe must latch the value on the first call of any process and keep it. \r\nOtherwise, havoc occurs: the state directory might end up being\r\ninconsistent or the program might behave in unexpected ways.\r\n\r\nBecause the existing initialize_test.go file used GPUPGRADE_HOME twice\r\nwith different values, we split those tests into diffferent files.","created_at":"2020-01-11T02:11:18Z","updated_at":"2020-01-14T18:24:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1f91dd77f58075f2ee293bbd212961807751237b","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175/commits","review_comments_url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175/comments","review_comment_url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/175/comments","statuses_url":"https://api.github.com/repos/greenplum-db/gpupgrade/statuses/09c5aec5c1e4e417955437336e36b77afcf3336c","head":{"label":"dkrieger-pvtl:stateDir_once","ref":"stateDir_once","sha":"09c5aec5c1e4e417955437336e36b77afcf3336c","user":{"login":"dkrieger-pvtl","id":42985115,"node_id":"MDQ6VXNlcjQyOTg1MTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42985115?v=4","gravatar_id":"","url":"https://api.github.com/users/dkrieger-pvtl","html_url":"https://github.com/dkrieger-pvtl","followers_url":"https://api.github.com/users/dkrieger-pvtl/followers","following_url":"https://api.github.com/users/dkrieger-pvtl/following{/other_user}","gists_url":"https://api.github.com/users/dkrieger-pvtl/gists{/gist_id}","starred_url":"https://api.github.com/users/dkrieger-pvtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkrieger-pvtl/subscriptions","organizations_url":"https://api.github.com/users/dkrieger-pvtl/orgs","repos_url":"https://api.github.com/users/dkrieger-pvtl/repos","events_url":"https://api.github.com/users/dkrieger-pvtl/events{/privacy}","received_events_url":"https://api.github.com/users/dkrieger-pvtl/received_events","type":"User","site_admin":false},"repo":{"id":152785756,"node_id":"MDEwOlJlcG9zaXRvcnkxNTI3ODU3NTY=","name":"gpupgrade","full_name":"dkrieger-pvtl/gpupgrade","private":false,"owner":{"login":"dkrieger-pvtl","id":42985115,"node_id":"MDQ6VXNlcjQyOTg1MTE1","avatar_url":"https://avatars1.githubusercontent.com/u/42985115?v=4","gravatar_id":"","url":"https://api.github.com/users/dkrieger-pvtl","html_url":"https://github.com/dkrieger-pvtl","followers_url":"https://api.github.com/users/dkrieger-pvtl/followers","following_url":"https://api.github.com/users/dkrieger-pvtl/following{/other_user}","gists_url":"https://api.github.com/users/dkrieger-pvtl/gists{/gist_id}","starred_url":"https://api.github.com/users/dkrieger-pvtl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkrieger-pvtl/subscriptions","organizations_url":"https://api.github.com/users/dkrieger-pvtl/orgs","repos_url":"https://api.github.com/users/dkrieger-pvtl/repos","events_url":"https://api.github.com/users/dkrieger-pvtl/events{/privacy}","received_events_url":"https://api.github.com/users/dkrieger-pvtl/received_events","type":"User","site_admin":false},"html_url":"https://github.com/dkrieger-pvtl/gpupgrade","description":"Greenplum Database major version upgrade utility called gpupgrade","fork":true,"url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade","forks_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/forks","keys_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/teams","hooks_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/hooks","issue_events_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/issues/events{/number}","events_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/events","assignees_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/assignees{/user}","branches_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/branches{/branch}","tags_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/tags","blobs_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/languages","stargazers_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/stargazers","contributors_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/contributors","subscribers_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/subscribers","subscription_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/subscription","commits_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/contents/{+path}","compare_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/merges","archive_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/downloads","issues_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/issues{/number}","pulls_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/labels{/name}","releases_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/releases{/id}","deployments_url":"https://api.github.com/repos/dkrieger-pvtl/gpupgrade/deployments","created_at":"2018-10-12T17:29:38Z","updated_at":"2019-11-06T23:11:45Z","pushed_at":"2020-01-14T17:19:51Z","git_url":"git://github.com/dkrieger-pvtl/gpupgrade.git","ssh_url":"git@github.com:dkrieger-pvtl/gpupgrade.git","clone_url":"https://github.com/dkrieger-pvtl/gpupgrade.git","svn_url":"https://github.com/dkrieger-pvtl/gpupgrade","homepage":"","size":1936,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":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":"greenplum-db:master","ref":"master","sha":"d697a71c8ff12ba06f2ce046243a3cb3c31d66cf","user":{"login":"greenplum-db","id":14097842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDk3ODQy","avatar_url":"https://avatars2.githubusercontent.com/u/14097842?v=4","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"repo":{"id":128096570,"node_id":"MDEwOlJlcG9zaXRvcnkxMjgwOTY1NzA=","name":"gpupgrade","full_name":"greenplum-db/gpupgrade","private":false,"owner":{"login":"greenplum-db","id":14097842,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MDk3ODQy","avatar_url":"https://avatars2.githubusercontent.com/u/14097842?v=4","gravatar_id":"","url":"https://api.github.com/users/greenplum-db","html_url":"https://github.com/greenplum-db","followers_url":"https://api.github.com/users/greenplum-db/followers","following_url":"https://api.github.com/users/greenplum-db/following{/other_user}","gists_url":"https://api.github.com/users/greenplum-db/gists{/gist_id}","starred_url":"https://api.github.com/users/greenplum-db/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenplum-db/subscriptions","organizations_url":"https://api.github.com/users/greenplum-db/orgs","repos_url":"https://api.github.com/users/greenplum-db/repos","events_url":"https://api.github.com/users/greenplum-db/events{/privacy}","received_events_url":"https://api.github.com/users/greenplum-db/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/greenplum-db/gpupgrade","description":"GPDB major version upgrade utility","fork":false,"url":"https://api.github.com/repos/greenplum-db/gpupgrade","forks_url":"https://api.github.com/repos/greenplum-db/gpupgrade/forks","keys_url":"https://api.github.com/repos/greenplum-db/gpupgrade/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenplum-db/gpupgrade/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenplum-db/gpupgrade/teams","hooks_url":"https://api.github.com/repos/greenplum-db/gpupgrade/hooks","issue_events_url":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/events{/number}","events_url":"https://api.github.com/repos/greenplum-db/gpupgrade/events","assignees_url":"https://api.github.com/repos/greenplum-db/gpupgrade/assignees{/user}","branches_url":"https://api.github.com/repos/greenplum-db/gpupgrade/branches{/branch}","tags_url":"https://api.github.com/repos/greenplum-db/gpupgrade/tags","blobs_url":"https://api.github.com/repos/greenplum-db/gpupgrade/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenplum-db/gpupgrade/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenplum-db/gpupgrade/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenplum-db/gpupgrade/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenplum-db/gpupgrade/statuses/{sha}","languages_url":"https://api.github.com/repos/greenplum-db/gpupgrade/languages","stargazers_url":"https://api.github.com/repos/greenplum-db/gpupgrade/stargazers","contributors_url":"https://api.github.com/repos/greenplum-db/gpupgrade/contributors","subscribers_url":"https://api.github.com/repos/greenplum-db/gpupgrade/subscribers","subscription_url":"https://api.github.com/repos/greenplum-db/gpupgrade/subscription","commits_url":"https://api.github.com/repos/greenplum-db/gpupgrade/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenplum-db/gpupgrade/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenplum-db/gpupgrade/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenplum-db/gpupgrade/contents/{+path}","compare_url":"https://api.github.com/repos/greenplum-db/gpupgrade/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenplum-db/gpupgrade/merges","archive_url":"https://api.github.com/repos/greenplum-db/gpupgrade/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenplum-db/gpupgrade/downloads","issues_url":"https://api.github.com/repos/greenplum-db/gpupgrade/issues{/number}","pulls_url":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls{/number}","milestones_url":"https://api.github.com/repos/greenplum-db/gpupgrade/milestones{/number}","notifications_url":"https://api.github.com/repos/greenplum-db/gpupgrade/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenplum-db/gpupgrade/labels{/name}","releases_url":"https://api.github.com/repos/greenplum-db/gpupgrade/releases{/id}","deployments_url":"https://api.github.com/repos/greenplum-db/gpupgrade/deployments","created_at":"2018-04-04T17:26:51Z","updated_at":"2020-01-09T23:06:31Z","pushed_at":"2020-01-14T17:19:53Z","git_url":"git://github.com/greenplum-db/gpupgrade.git","ssh_url":"git@github.com:greenplum-db/gpupgrade.git","clone_url":"https://github.com/greenplum-db/gpupgrade.git","svn_url":"https://github.com/greenplum-db/gpupgrade","homepage":"","size":1787,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":14,"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":13,"open_issues":14,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175"},"html":{"href":"https://github.com/greenplum-db/gpupgrade/pull/175"},"issue":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/175"},"comments":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/issues/175/comments"},"review_comments":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175/comments"},"review_comment":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/pulls/175/commits"},"statuses":{"href":"https://api.github.com/repos/greenplum-db/gpupgrade/statuses/09c5aec5c1e4e417955437336e36b77afcf3336c"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"dkrieger-pvtl"}}