{"action":"opened","issue":{"url":"https://api.github.com/repos/clearlinux/swupd-client/issues/322","repository_url":"https://api.github.com/repos/clearlinux/swupd-client","labels_url":"https://api.github.com/repos/clearlinux/swupd-client/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/clearlinux/swupd-client/issues/322/comments","events_url":"https://api.github.com/repos/clearlinux/swupd-client/issues/322/events","html_url":"https://github.com/clearlinux/swupd-client/issues/322","id":267164625,"number":322,"title":"configurable download retries","user":{"login":"pohly","id":22076,"avatar_url":"https://avatars1.githubusercontent.com/u/22076?v=4","gravatar_id":"","url":"https://api.github.com/users/pohly","html_url":"https://github.com/pohly","followers_url":"https://api.github.com/users/pohly/followers","following_url":"https://api.github.com/users/pohly/following{/other_user}","gists_url":"https://api.github.com/users/pohly/gists{/gist_id}","starred_url":"https://api.github.com/users/pohly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pohly/subscriptions","organizations_url":"https://api.github.com/users/pohly/orgs","repos_url":"https://api.github.com/users/pohly/repos","events_url":"https://api.github.com/users/pohly/events{/privacy}","received_events_url":"https://api.github.com/users/pohly/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-20T12:47:55Z","updated_at":"2017-10-20T12:47:55Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I am writing tests for issue #249 that simulate network errors. Right now, the tests run very slowly due to the hard-coded retry interval of 10 seconds and MAX_TRIES = 3.\r\n\r\nCan interval and max retries be made configurable?\r\n\r\nHow do you handle this in your own tests?\r\n\r\nOn a related note, I am seeing \"swupd update\" trying to download Manifest.MoM.tar four times, for an overall duration of 1:10min. It all depends on the definition of MAX_TRIES of course, but to me this looks like an off-by-one error.\r\n\r\nIf we had a command line option --max-tries=3, I would expect three GET requests at most. For --max-retries=3, one initial GET followed by three retries would also make sense.\r\n\r\nIt's trying the second manifest only once.\r\n\r\nHTTP log:\r\n```\r\n2017-10-20 14:32:04,915 - oe-selftest - INFO - \"GET /10/Manifest.MoM.tar HTTP/1.1\" 500 -\r\n2017-10-20 14:32:14,776 - oe-selftest - INFO - \"GET /10/Manifest.MoM.tar HTTP/1.1\" 500 -\r\n2017-10-20 14:32:34,717 - oe-selftest - INFO - \"GET /10/Manifest.MoM.tar HTTP/1.1\" 500 -\r\n2017-10-20 14:33:14,724 - oe-selftest - INFO - \"GET /10/Manifest.MoM.tar HTTP/1.1\" 500 -\r\n2017-10-20 14:33:14,752 - oe-selftest - INFO - \"GET /20/Manifest.MoM.tar HTTP/1.1\" 500 -\r\n````\r\n\r\nOutput:\r\n```\r\nAttempting to download version string to memory\r\nUpdate started.\r\nPreparing to update from 10 to 20\r\nFailed to retrieve 10 MoM manifest\r\nRetry #1 downloading from/to MoM Manifests\r\nFailed to retrieve 10 MoM manifest\r\nRetry #2 downloading from/to MoM Manifests\r\nFailed to retrieve 10 MoM manifest\r\nRetry #3 downloading from/to MoM Manifests\r\nFailed to retrieve 10 MoM manifest\r\nFailure retrieving manifest from server\r\nUpdate took 69.8 seconds\r\n```\r\n\r\nThis is with file:// version URL and http:// content URL. Conceptually this tests mirrors a functioning version server while the content server has some internal issue.\r\n"}}
{"actor":{"display_login":"pohly"}}