{"action":"created","issue":{"url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/1302","repository_url":"https://api.github.com/repos/cargomedia/puppet-packages","labels_url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/1302/labels{/name}","comments_url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/1302/comments","events_url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/1302/events","html_url":"https://github.com/cargomedia/puppet-packages/pull/1302","id":153007239,"number":1302,"title":"Add a retry loop for phantomjs download","user":{"login":"ppp0","id":1888714,"avatar_url":"https://avatars.githubusercontent.com/u/1888714?v=3","gravatar_id":"","url":"https://api.github.com/users/ppp0","html_url":"https://github.com/ppp0","followers_url":"https://api.github.com/users/ppp0/followers","following_url":"https://api.github.com/users/ppp0/following{/other_user}","gists_url":"https://api.github.com/users/ppp0/gists{/gist_id}","starred_url":"https://api.github.com/users/ppp0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppp0/subscriptions","organizations_url":"https://api.github.com/users/ppp0/orgs","repos_url":"https://api.github.com/users/ppp0/repos","events_url":"https://api.github.com/users/ppp0/events{/privacy}","received_events_url":"https://api.github.com/users/ppp0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cargomedia/puppet-packages/labels/in%20progress","name":"in progress","color":"ededed"}],"state":"open","locked":false,"assignee":{"login":"ppp0","id":1888714,"avatar_url":"https://avatars.githubusercontent.com/u/1888714?v=3","gravatar_id":"","url":"https://api.github.com/users/ppp0","html_url":"https://github.com/ppp0","followers_url":"https://api.github.com/users/ppp0/followers","following_url":"https://api.github.com/users/ppp0/following{/other_user}","gists_url":"https://api.github.com/users/ppp0/gists{/gist_id}","starred_url":"https://api.github.com/users/ppp0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ppp0/subscriptions","organizations_url":"https://api.github.com/users/ppp0/orgs","repos_url":"https://api.github.com/users/ppp0/repos","events_url":"https://api.github.com/users/ppp0/events{/privacy}","received_events_url":"https://api.github.com/users/ppp0/received_events","type":"User","site_admin":false},"milestone":null,"comments":5,"created_at":"2016-05-04T13:09:08Z","updated_at":"2016-05-04T14:37:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cargomedia/puppet-packages/pulls/1302","html_url":"https://github.com/cargomedia/puppet-packages/pull/1302","diff_url":"https://github.com/cargomedia/puppet-packages/pull/1302.diff","patch_url":"https://github.com/cargomedia/puppet-packages/pull/1302.patch"},"body":"We experienced quite often that our tests fail, due to some unknown temporary glitch at Bitbucket\r\n\r\nCould be solved by #885 - doing it locally for now"},"comment":{"url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/comments/216884961","html_url":"https://github.com/cargomedia/puppet-packages/pull/1302#issuecomment-216884961","issue_url":"https://api.github.com/repos/cargomedia/puppet-packages/issues/1302","id":216884961,"user":{"login":"njam","id":360800,"avatar_url":"https://avatars.githubusercontent.com/u/360800?v=3","gravatar_id":"","url":"https://api.github.com/users/njam","html_url":"https://github.com/njam","followers_url":"https://api.github.com/users/njam/followers","following_url":"https://api.github.com/users/njam/following{/other_user}","gists_url":"https://api.github.com/users/njam/gists{/gist_id}","starred_url":"https://api.github.com/users/njam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njam/subscriptions","organizations_url":"https://api.github.com/users/njam/orgs","repos_url":"https://api.github.com/users/njam/repos","events_url":"https://api.github.com/users/njam/events{/privacy}","received_events_url":"https://api.github.com/users/njam/received_events","type":"User","site_admin":false},"created_at":"2016-05-04T14:37:04Z","updated_at":"2016-05-04T14:37:04Z","body":"So `curl --retry` is not what we want, because it only retries *transient* HTTP errors (5** code).\r\nLet's implement a simple and reusable mechanism to retry any command, so we can reuse it.\r\n\r\nSomething like:\r\n```sh\r\nretry --tries 3 curl --fail 'http://example.com/foo' | unp\r\n```\r\nWhere `--tries` would be optional and default to 3:\r\n```sh\r\nretry curl --fail 'http://example.com/foo' | unp\r\n```\r\n\r\nWdyt?\r\nEither we can implement such a `retry` script in `helper`, or maybe there is an existing program like that we can use?"}}