{"action":"created","comment":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments/125982525","pull_request_review_id":48426298,"id":125982525,"diff_hunk":"@@ -206,3 +206,34 @@ test('TarballFetcher.fetch properly stores tarball of scoped package in offline\n   const exists = await fs.exists(path.join(offlineMirrorDir, '@exponent-configurator-1.0.2.tgz'));\n   expect(exists).toBe(true);\n });\n+\n+test.only('TarballFetcher.fetch retry on 500', async () => {\n+  // jest.useRealTimers();\n+  const dir = await mkdir('tarball-fetcher');\n+  jest.mock('request', factory => options => {\n+    return {\n+      on: (name, cb) => {\n+        if (name === 'response') {","path":"__tests__/fetchers.js","position":20,"original_position":20,"commit_id":"c1a2fe8d2a488a1bd25a89ea4b25dd3f5566eb4f","original_commit_id":"c1a2fe8d2a488a1bd25a89ea4b25dd3f5566eb4f","user":{"login":"bestander","id":2121048,"avatar_url":"https://avatars0.githubusercontent.com/u/2121048?v=3","gravatar_id":"","url":"https://api.github.com/users/bestander","html_url":"https://github.com/bestander","followers_url":"https://api.github.com/users/bestander/followers","following_url":"https://api.github.com/users/bestander/following{/other_user}","gists_url":"https://api.github.com/users/bestander/gists{/gist_id}","starred_url":"https://api.github.com/users/bestander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bestander/subscriptions","organizations_url":"https://api.github.com/users/bestander/orgs","repos_url":"https://api.github.com/users/bestander/repos","events_url":"https://api.github.com/users/bestander/events{/privacy}","received_events_url":"https://api.github.com/users/bestander/received_events","type":"User","site_admin":false},"body":"Thanks, @torifat, if you are too busy right now it would be better to merge the fix and add the test to the backlog.","created_at":"2017-07-06T18:41:15Z","updated_at":"2017-07-06T18:41:15Z","html_url":"https://github.com/yarnpkg/yarn/pull/3686#discussion_r125982525","pull_request_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686","_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments/125982525"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/3686#discussion_r125982525"},"pull_request":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686"}}},"pull_request":{"url":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686","id":126763166,"html_url":"https://github.com/yarnpkg/yarn/pull/3686","diff_url":"https://github.com/yarnpkg/yarn/pull/3686.diff","patch_url":"https://github.com/yarnpkg/yarn/pull/3686.patch","issue_url":"https://api.github.com/repos/yarnpkg/yarn/issues/3686","number":3686,"state":"open","locked":false,"title":"Add retry on 5xx errors. Fixes #2849","user":{"login":"torifat","id":208544,"avatar_url":"https://avatars1.githubusercontent.com/u/208544?v=3","gravatar_id":"","url":"https://api.github.com/users/torifat","html_url":"https://github.com/torifat","followers_url":"https://api.github.com/users/torifat/followers","following_url":"https://api.github.com/users/torifat/following{/other_user}","gists_url":"https://api.github.com/users/torifat/gists{/gist_id}","starred_url":"https://api.github.com/users/torifat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torifat/subscriptions","organizations_url":"https://api.github.com/users/torifat/orgs","repos_url":"https://api.github.com/users/torifat/repos","events_url":"https://api.github.com/users/torifat/events{/privacy}","received_events_url":"https://api.github.com/users/torifat/received_events","type":"User","site_admin":false},"body":"This is not a very elegant solution but it will do the job for now.\r\n\r\nDuring fetching tarball for any **5xx** errors, it will show `warning There appears to be trouble with our server. Retrying...` and try again after `3000ms`. If it fails again then it will show the error like before.\r\n\r\n**Future Work**\r\nRefactor `RequestManager` to add support for retry.\r\n\r\nI spent some time trying to refactor `RequestManager`, but it will take some time and effort to finish it.  And, since `RequestManager` is a very important part of **Yarn**. So, it is important that it doesn't degrade the speed after refactor.","created_at":"2017-06-21T13:26:45Z","updated_at":"2017-07-06T18:41:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"874cfd7e70e23cb1c0dca66e9b49c28efe5bf93a","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686/commits","review_comments_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686/comments","review_comment_url":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/issues/3686/comments","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/c1a2fe8d2a488a1bd25a89ea4b25dd3f5566eb4f","head":{"label":"torifat:master","ref":"master","sha":"c1a2fe8d2a488a1bd25a89ea4b25dd3f5566eb4f","user":{"login":"torifat","id":208544,"avatar_url":"https://avatars1.githubusercontent.com/u/208544?v=3","gravatar_id":"","url":"https://api.github.com/users/torifat","html_url":"https://github.com/torifat","followers_url":"https://api.github.com/users/torifat/followers","following_url":"https://api.github.com/users/torifat/following{/other_user}","gists_url":"https://api.github.com/users/torifat/gists{/gist_id}","starred_url":"https://api.github.com/users/torifat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torifat/subscriptions","organizations_url":"https://api.github.com/users/torifat/orgs","repos_url":"https://api.github.com/users/torifat/repos","events_url":"https://api.github.com/users/torifat/events{/privacy}","received_events_url":"https://api.github.com/users/torifat/received_events","type":"User","site_admin":false},"repo":{"id":71784359,"name":"yarn","full_name":"torifat/yarn","owner":{"login":"torifat","id":208544,"avatar_url":"https://avatars1.githubusercontent.com/u/208544?v=3","gravatar_id":"","url":"https://api.github.com/users/torifat","html_url":"https://github.com/torifat","followers_url":"https://api.github.com/users/torifat/followers","following_url":"https://api.github.com/users/torifat/following{/other_user}","gists_url":"https://api.github.com/users/torifat/gists{/gist_id}","starred_url":"https://api.github.com/users/torifat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/torifat/subscriptions","organizations_url":"https://api.github.com/users/torifat/orgs","repos_url":"https://api.github.com/users/torifat/repos","events_url":"https://api.github.com/users/torifat/events{/privacy}","received_events_url":"https://api.github.com/users/torifat/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/torifat/yarn","description":"📦🐈 Fast, reliable, and secure dependency management.","fork":true,"url":"https://api.github.com/repos/torifat/yarn","forks_url":"https://api.github.com/repos/torifat/yarn/forks","keys_url":"https://api.github.com/repos/torifat/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/torifat/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/torifat/yarn/teams","hooks_url":"https://api.github.com/repos/torifat/yarn/hooks","issue_events_url":"https://api.github.com/repos/torifat/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/torifat/yarn/events","assignees_url":"https://api.github.com/repos/torifat/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/torifat/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/torifat/yarn/tags","blobs_url":"https://api.github.com/repos/torifat/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/torifat/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/torifat/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/torifat/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/torifat/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/torifat/yarn/languages","stargazers_url":"https://api.github.com/repos/torifat/yarn/stargazers","contributors_url":"https://api.github.com/repos/torifat/yarn/contributors","subscribers_url":"https://api.github.com/repos/torifat/yarn/subscribers","subscription_url":"https://api.github.com/repos/torifat/yarn/subscription","commits_url":"https://api.github.com/repos/torifat/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/torifat/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/torifat/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/torifat/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/torifat/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/torifat/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/torifat/yarn/merges","archive_url":"https://api.github.com/repos/torifat/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/torifat/yarn/downloads","issues_url":"https://api.github.com/repos/torifat/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/torifat/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/torifat/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/torifat/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/torifat/yarn/labels{/name}","releases_url":"https://api.github.com/repos/torifat/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/torifat/yarn/deployments","created_at":"2016-10-24T11:59:54Z","updated_at":"2017-06-28T02:31:20Z","pushed_at":"2017-06-30T00:06:16Z","git_url":"git://github.com/torifat/yarn.git","ssh_url":"git@github.com:torifat/yarn.git","clone_url":"https://github.com/torifat/yarn.git","svn_url":"https://github.com/torifat/yarn","homepage":"https://yarnpkg.com","size":107819,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"yarnpkg:master","ref":"master","sha":"35ee7de206e3078df32f1626d1dde6ba1ed41d0b","user":{"login":"yarnpkg","id":22247014,"avatar_url":"https://avatars0.githubusercontent.com/u/22247014?v=3","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"repo":{"id":49970642,"name":"yarn","full_name":"yarnpkg/yarn","owner":{"login":"yarnpkg","id":22247014,"avatar_url":"https://avatars0.githubusercontent.com/u/22247014?v=3","gravatar_id":"","url":"https://api.github.com/users/yarnpkg","html_url":"https://github.com/yarnpkg","followers_url":"https://api.github.com/users/yarnpkg/followers","following_url":"https://api.github.com/users/yarnpkg/following{/other_user}","gists_url":"https://api.github.com/users/yarnpkg/gists{/gist_id}","starred_url":"https://api.github.com/users/yarnpkg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yarnpkg/subscriptions","organizations_url":"https://api.github.com/users/yarnpkg/orgs","repos_url":"https://api.github.com/users/yarnpkg/repos","events_url":"https://api.github.com/users/yarnpkg/events{/privacy}","received_events_url":"https://api.github.com/users/yarnpkg/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/yarnpkg/yarn","description":"📦🐈 Fast, reliable, and secure dependency management.","fork":false,"url":"https://api.github.com/repos/yarnpkg/yarn","forks_url":"https://api.github.com/repos/yarnpkg/yarn/forks","keys_url":"https://api.github.com/repos/yarnpkg/yarn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/yarnpkg/yarn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/yarnpkg/yarn/teams","hooks_url":"https://api.github.com/repos/yarnpkg/yarn/hooks","issue_events_url":"https://api.github.com/repos/yarnpkg/yarn/issues/events{/number}","events_url":"https://api.github.com/repos/yarnpkg/yarn/events","assignees_url":"https://api.github.com/repos/yarnpkg/yarn/assignees{/user}","branches_url":"https://api.github.com/repos/yarnpkg/yarn/branches{/branch}","tags_url":"https://api.github.com/repos/yarnpkg/yarn/tags","blobs_url":"https://api.github.com/repos/yarnpkg/yarn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/yarnpkg/yarn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/yarnpkg/yarn/git/refs{/sha}","trees_url":"https://api.github.com/repos/yarnpkg/yarn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/yarnpkg/yarn/statuses/{sha}","languages_url":"https://api.github.com/repos/yarnpkg/yarn/languages","stargazers_url":"https://api.github.com/repos/yarnpkg/yarn/stargazers","contributors_url":"https://api.github.com/repos/yarnpkg/yarn/contributors","subscribers_url":"https://api.github.com/repos/yarnpkg/yarn/subscribers","subscription_url":"https://api.github.com/repos/yarnpkg/yarn/subscription","commits_url":"https://api.github.com/repos/yarnpkg/yarn/commits{/sha}","git_commits_url":"https://api.github.com/repos/yarnpkg/yarn/git/commits{/sha}","comments_url":"https://api.github.com/repos/yarnpkg/yarn/comments{/number}","issue_comment_url":"https://api.github.com/repos/yarnpkg/yarn/issues/comments{/number}","contents_url":"https://api.github.com/repos/yarnpkg/yarn/contents/{+path}","compare_url":"https://api.github.com/repos/yarnpkg/yarn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/yarnpkg/yarn/merges","archive_url":"https://api.github.com/repos/yarnpkg/yarn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/yarnpkg/yarn/downloads","issues_url":"https://api.github.com/repos/yarnpkg/yarn/issues{/number}","pulls_url":"https://api.github.com/repos/yarnpkg/yarn/pulls{/number}","milestones_url":"https://api.github.com/repos/yarnpkg/yarn/milestones{/number}","notifications_url":"https://api.github.com/repos/yarnpkg/yarn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/yarnpkg/yarn/labels{/name}","releases_url":"https://api.github.com/repos/yarnpkg/yarn/releases{/id}","deployments_url":"https://api.github.com/repos/yarnpkg/yarn/deployments","created_at":"2016-01-19T17:39:16Z","updated_at":"2017-07-06T18:09:34Z","pushed_at":"2017-07-06T16:45:33Z","git_url":"git://github.com/yarnpkg/yarn.git","ssh_url":"git@github.com:yarnpkg/yarn.git","clone_url":"https://github.com/yarnpkg/yarn.git","svn_url":"https://github.com/yarnpkg/yarn","homepage":"https://yarnpkg.com","size":111194,"stargazers_count":26113,"watchers_count":26113,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1265,"mirror_url":null,"open_issues_count":745,"forks":1265,"open_issues":745,"watchers":26113,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686"},"html":{"href":"https://github.com/yarnpkg/yarn/pull/3686"},"issue":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/3686"},"comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/issues/3686/comments"},"review_comments":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686/comments"},"review_comment":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/yarnpkg/yarn/pulls/3686/commits"},"statuses":{"href":"https://api.github.com/repos/yarnpkg/yarn/statuses/c1a2fe8d2a488a1bd25a89ea4b25dd3f5566eb4f"}}}}
{"actor":{"display_login":"bestander"}}