{"action":"created","comment":{"url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/comments/352175103","pull_request_review_id":324769824,"id":352175103,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDM1MjE3NTEwMw==","diff_hunk":"@@ -39,22 +72,19 @@ func (s *API) WaitForServer(req *WaitForServerRequest) (*Server, scw.SdkError) {\n \t\t\t\tServerID: req.ServerID,\n \t\t\t\tZone:     req.Zone,\n \t\t\t})\n-\n \t\t\tif err != nil {\n \t\t\t\treturn nil, err, false\n \t\t\t}\n-\t\t\t_, isTerminal := terminalStatus[res.Status]\n-\t\t\tisTerminalInstall := true\n-\t\t\tif res.Install != nil {\n-\t\t\t\t_, isTerminalInstall = installTerminalStatus[res.Install.Status]\n+\n+\t\t\tif res.Install == nil {\n+\t\t\t\treturn nil, errors.New(\"server creation has not begun for server %s\", req.ServerID), false\n \t\t\t}\n \n-\t\t\treturn res, err, isTerminal && isTerminalInstall\n+\t\t\t_, isTerminal := installTerminalStatus[res.Install.Status]\n+\t\t\treturn res, err, isTerminal\n \t\t},\n-\t\tTimeout: req.Timeout,\n-\t\t// TODO: Install is a long process, we should increase the\n-\t\t// interval when isTerminalInstall == true.\n-\t\tIntervalStrategy: async.LinearIntervalStrategy(5 * time.Second),\n+\t\tTimeout:          req.Timeout,\n+\t\tIntervalStrategy: async.LinearIntervalStrategy(15 * time.Second),\n \t})\n \tif err != nil {\n \t\treturn nil, errors.Wrap(err, \"waiting for server failed\")","path":"api/baremetal/v1alpha1/server_utils.go","position":97,"original_position":90,"commit_id":"5bc5a314ebfda9f221538c518911de0991efee1c","original_commit_id":"5bc5a314ebfda9f221538c518911de0991efee1c","user":{"login":"kindermoumoute","id":10092554,"node_id":"MDQ6VXNlcjEwMDkyNTU0","avatar_url":"https://avatars1.githubusercontent.com/u/10092554?v=4","gravatar_id":"","url":"https://api.github.com/users/kindermoumoute","html_url":"https://github.com/kindermoumoute","followers_url":"https://api.github.com/users/kindermoumoute/followers","following_url":"https://api.github.com/users/kindermoumoute/following{/other_user}","gists_url":"https://api.github.com/users/kindermoumoute/gists{/gist_id}","starred_url":"https://api.github.com/users/kindermoumoute/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kindermoumoute/subscriptions","organizations_url":"https://api.github.com/users/kindermoumoute/orgs","repos_url":"https://api.github.com/users/kindermoumoute/repos","events_url":"https://api.github.com/users/kindermoumoute/events{/privacy}","received_events_url":"https://api.github.com/users/kindermoumoute/received_events","type":"User","site_admin":false},"body":"update message","created_at":"2019-11-29T15:21:58Z","updated_at":"2019-11-29T15:22:34Z","html_url":"https://github.com/scaleway/scaleway-sdk-go/pull/263#discussion_r352175103","pull_request_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/comments/352175103"},"html":{"href":"https://github.com/scaleway/scaleway-sdk-go/pull/263#discussion_r352175103"},"pull_request":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263"}}},"pull_request":{"url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263","id":347060909,"node_id":"MDExOlB1bGxSZXF1ZXN0MzQ3MDYwOTA5","html_url":"https://github.com/scaleway/scaleway-sdk-go/pull/263","diff_url":"https://github.com/scaleway/scaleway-sdk-go/pull/263.diff","patch_url":"https://github.com/scaleway/scaleway-sdk-go/pull/263.patch","issue_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/263","number":263,"state":"open","locked":false,"title":"feat(baremetal): fix WaitForServer and add WaitForServerInstall","user":{"login":"QuentinBrosse","id":10938538,"node_id":"MDQ6VXNlcjEwOTM4NTM4","avatar_url":"https://avatars1.githubusercontent.com/u/10938538?v=4","gravatar_id":"","url":"https://api.github.com/users/QuentinBrosse","html_url":"https://github.com/QuentinBrosse","followers_url":"https://api.github.com/users/QuentinBrosse/followers","following_url":"https://api.github.com/users/QuentinBrosse/following{/other_user}","gists_url":"https://api.github.com/users/QuentinBrosse/gists{/gist_id}","starred_url":"https://api.github.com/users/QuentinBrosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuentinBrosse/subscriptions","organizations_url":"https://api.github.com/users/QuentinBrosse/orgs","repos_url":"https://api.github.com/users/QuentinBrosse/repos","events_url":"https://api.github.com/users/QuentinBrosse/events{/privacy}","received_events_url":"https://api.github.com/users/QuentinBrosse/received_events","type":"User","site_admin":false},"body":"Split `WaitForServer` into two methods:\r\n\r\n- `WaitForServer`: waits for server creation.\r\n- `WaitForServerInstall` waits for server installation.\r\n\r\nFix status:\r\n- `ServerStatusUndelivered` means \"delivering\" so it is not a terminal state.\r\n- `ServerInstallStatusToInstall` means \"ready to start an installation\" so it is not a terminal state either.","created_at":"2019-11-29T14:06:04Z","updated_at":"2019-11-29T15:22:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c09db57677179f42e70add5d74ac283a270a5d87","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263/commits","review_comments_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263/comments","review_comment_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/263/comments","statuses_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/statuses/5bc5a314ebfda9f221538c518911de0991efee1c","head":{"label":"QuentinBrosse:baremetal/fix-wait-server","ref":"baremetal/fix-wait-server","sha":"5bc5a314ebfda9f221538c518911de0991efee1c","user":{"login":"QuentinBrosse","id":10938538,"node_id":"MDQ6VXNlcjEwOTM4NTM4","avatar_url":"https://avatars1.githubusercontent.com/u/10938538?v=4","gravatar_id":"","url":"https://api.github.com/users/QuentinBrosse","html_url":"https://github.com/QuentinBrosse","followers_url":"https://api.github.com/users/QuentinBrosse/followers","following_url":"https://api.github.com/users/QuentinBrosse/following{/other_user}","gists_url":"https://api.github.com/users/QuentinBrosse/gists{/gist_id}","starred_url":"https://api.github.com/users/QuentinBrosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuentinBrosse/subscriptions","organizations_url":"https://api.github.com/users/QuentinBrosse/orgs","repos_url":"https://api.github.com/users/QuentinBrosse/repos","events_url":"https://api.github.com/users/QuentinBrosse/events{/privacy}","received_events_url":"https://api.github.com/users/QuentinBrosse/received_events","type":"User","site_admin":false},"repo":{"id":184732111,"node_id":"MDEwOlJlcG9zaXRvcnkxODQ3MzIxMTE=","name":"scaleway-sdk-go","full_name":"QuentinBrosse/scaleway-sdk-go","private":false,"owner":{"login":"QuentinBrosse","id":10938538,"node_id":"MDQ6VXNlcjEwOTM4NTM4","avatar_url":"https://avatars1.githubusercontent.com/u/10938538?v=4","gravatar_id":"","url":"https://api.github.com/users/QuentinBrosse","html_url":"https://github.com/QuentinBrosse","followers_url":"https://api.github.com/users/QuentinBrosse/followers","following_url":"https://api.github.com/users/QuentinBrosse/following{/other_user}","gists_url":"https://api.github.com/users/QuentinBrosse/gists{/gist_id}","starred_url":"https://api.github.com/users/QuentinBrosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QuentinBrosse/subscriptions","organizations_url":"https://api.github.com/users/QuentinBrosse/orgs","repos_url":"https://api.github.com/users/QuentinBrosse/repos","events_url":"https://api.github.com/users/QuentinBrosse/events{/privacy}","received_events_url":"https://api.github.com/users/QuentinBrosse/received_events","type":"User","site_admin":false},"html_url":"https://github.com/QuentinBrosse/scaleway-sdk-go","description":"(BETA) Integrate Scaleway with your Go application","fork":true,"url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go","forks_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/forks","keys_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/teams","hooks_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/hooks","issue_events_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/issues/events{/number}","events_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/events","assignees_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/assignees{/user}","branches_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/branches{/branch}","tags_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/tags","blobs_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/statuses/{sha}","languages_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/languages","stargazers_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/stargazers","contributors_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/contributors","subscribers_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/subscribers","subscription_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/subscription","commits_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/contents/{+path}","compare_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/merges","archive_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/downloads","issues_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/issues{/number}","pulls_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/pulls{/number}","milestones_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/milestones{/number}","notifications_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/labels{/name}","releases_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/releases{/id}","deployments_url":"https://api.github.com/repos/QuentinBrosse/scaleway-sdk-go/deployments","created_at":"2019-05-03T09:43:17Z","updated_at":"2019-11-29T11:24:47Z","pushed_at":"2019-11-29T15:15:33Z","git_url":"git://github.com/QuentinBrosse/scaleway-sdk-go.git","ssh_url":"git@github.com:QuentinBrosse/scaleway-sdk-go.git","clone_url":"https://github.com/QuentinBrosse/scaleway-sdk-go.git","svn_url":"https://github.com/QuentinBrosse/scaleway-sdk-go","homepage":"https://godoc.org/github.com/scaleway/scaleway-sdk-go","size":855,"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":1,"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":1,"watchers":0,"default_branch":"master"}},"base":{"label":"scaleway:master","ref":"master","sha":"a32c9bdb51f2a2722b4702a0e473323b106cec89","user":{"login":"scaleway","id":5185491,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxODU0OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/5185491?v=4","gravatar_id":"","url":"https://api.github.com/users/scaleway","html_url":"https://github.com/scaleway","followers_url":"https://api.github.com/users/scaleway/followers","following_url":"https://api.github.com/users/scaleway/following{/other_user}","gists_url":"https://api.github.com/users/scaleway/gists{/gist_id}","starred_url":"https://api.github.com/users/scaleway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scaleway/subscriptions","organizations_url":"https://api.github.com/users/scaleway/orgs","repos_url":"https://api.github.com/users/scaleway/repos","events_url":"https://api.github.com/users/scaleway/events{/privacy}","received_events_url":"https://api.github.com/users/scaleway/received_events","type":"Organization","site_admin":false},"repo":{"id":183247201,"node_id":"MDEwOlJlcG9zaXRvcnkxODMyNDcyMDE=","name":"scaleway-sdk-go","full_name":"scaleway/scaleway-sdk-go","private":false,"owner":{"login":"scaleway","id":5185491,"node_id":"MDEyOk9yZ2FuaXphdGlvbjUxODU0OTE=","avatar_url":"https://avatars0.githubusercontent.com/u/5185491?v=4","gravatar_id":"","url":"https://api.github.com/users/scaleway","html_url":"https://github.com/scaleway","followers_url":"https://api.github.com/users/scaleway/followers","following_url":"https://api.github.com/users/scaleway/following{/other_user}","gists_url":"https://api.github.com/users/scaleway/gists{/gist_id}","starred_url":"https://api.github.com/users/scaleway/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scaleway/subscriptions","organizations_url":"https://api.github.com/users/scaleway/orgs","repos_url":"https://api.github.com/users/scaleway/repos","events_url":"https://api.github.com/users/scaleway/events{/privacy}","received_events_url":"https://api.github.com/users/scaleway/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/scaleway/scaleway-sdk-go","description":"(BETA) Integrate Scaleway with your Go application","fork":false,"url":"https://api.github.com/repos/scaleway/scaleway-sdk-go","forks_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/forks","keys_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/teams","hooks_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/hooks","issue_events_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/events{/number}","events_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/events","assignees_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/assignees{/user}","branches_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/branches{/branch}","tags_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/tags","blobs_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/statuses/{sha}","languages_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/languages","stargazers_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/stargazers","contributors_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/contributors","subscribers_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/subscribers","subscription_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/subscription","commits_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/contents/{+path}","compare_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/merges","archive_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/downloads","issues_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues{/number}","pulls_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls{/number}","milestones_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/milestones{/number}","notifications_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/labels{/name}","releases_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/releases{/id}","deployments_url":"https://api.github.com/repos/scaleway/scaleway-sdk-go/deployments","created_at":"2019-04-24T14:35:32Z","updated_at":"2019-11-29T14:20:48Z","pushed_at":"2019-11-29T15:15:35Z","git_url":"git://github.com/scaleway/scaleway-sdk-go.git","ssh_url":"git@github.com:scaleway/scaleway-sdk-go.git","clone_url":"https://github.com/scaleway/scaleway-sdk-go.git","svn_url":"https://github.com/scaleway/scaleway-sdk-go","homepage":"https://godoc.org/github.com/scaleway/scaleway-sdk-go","size":848,"stargazers_count":42,"watchers_count":42,"language":"Go","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":5,"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":17,"open_issues":5,"watchers":42,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263"},"html":{"href":"https://github.com/scaleway/scaleway-sdk-go/pull/263"},"issue":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/263"},"comments":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/issues/263/comments"},"review_comments":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263/comments"},"review_comment":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/pulls/263/commits"},"statuses":{"href":"https://api.github.com/repos/scaleway/scaleway-sdk-go/statuses/5bc5a314ebfda9f221538c518911de0991efee1c"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"kindermoumoute"}}