{"action":"opened","number":9016,"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/9016","id":92492573,"html_url":"https://github.com/highfidelity/hifi/pull/9016","diff_url":"https://github.com/highfidelity/hifi/pull/9016.diff","patch_url":"https://github.com/highfidelity/hifi/pull/9016.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/9016","number":9016,"state":"open","locked":false,"title":"Prevent Script retries when HTTP errors are irrecoverable","user":{"login":"humbletim","id":94753,"avatar_url":"https://avatars.githubusercontent.com/u/94753?v=3","gravatar_id":"","url":"https://api.github.com/users/humbletim","html_url":"https://github.com/humbletim","followers_url":"https://api.github.com/users/humbletim/followers","following_url":"https://api.github.com/users/humbletim/following{/other_user}","gists_url":"https://api.github.com/users/humbletim/gists{/gist_id}","starred_url":"https://api.github.com/users/humbletim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humbletim/subscriptions","organizations_url":"https://api.github.com/users/humbletim/orgs","repos_url":"https://api.github.com/users/humbletim/repos","events_url":"https://api.github.com/users/humbletim/events{/privacy}","received_events_url":"https://api.github.com/users/humbletim/received_events","type":"User","site_admin":false},"body":"This PR increases the resolution of errors reported by `HTTPResourceRequest` and then uses it in `ScriptCache` to bail early when automatic retry would be futile (such as in the case of HTTP 404 Not Found errors).\r\n\r\nHere are Client test scripts that trigger the different result states:\r\n\r\n* `ResourceRequest::NotFound` [test-client-404.js](https://raw.githubusercontent.com/humbletim/hifi-aux/master/tests/script-cache/test-client-404.js)\r\n* `ResourceRequest::InvalidURL` [test-client-400.js](https://raw.githubusercontent.com/humbletim/hifi-aux/master/tests/script-cache/test-client-400.js)\r\n* `ResourceRequest::AccessDenied` [test-client-401.js](https://raw.githubusercontent.com/humbletim/hifi-aux/master/tests/script-cache/test-client-401.js)\r\n* `ResourceRequest::ServerUnavailable` [test-client-503.js](https://raw.githubusercontent.com/humbletim/hifi-aux/master/tests/script-cache/test-client-503.js)  _*depends on #9013_\r\n\r\nAll but the last test script should bail early (and not retry the request again), showing nearby `BEFORE HTTP...` and `//AFTER HTTP....` messages in the debug log.\r\n\r\n_I also had a change available that adds debug stream support to ResourceRequest -- which then allows ScriptCache to quickly log a more specific reason as to why the request failed -- but wasn't sure about including as part of this PR._ https://github.com/highfidelity/hifi/compare/master...humbletim:add-resource-request-dbgstreams\r\n","created_at":"2016-11-06T16:14:24Z","updated_at":"2016-11-06T16:14:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f7b7101fc25dc76ecd703b4dfb6c1d8bb7614d51","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/9016/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/9016/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/9016/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/61452c21a2d877a75be54686e91e15cec6abb9cc","head":{"label":"humbletim:script-retry-improvements","ref":"script-retry-improvements","sha":"61452c21a2d877a75be54686e91e15cec6abb9cc","user":{"login":"humbletim","id":94753,"avatar_url":"https://avatars.githubusercontent.com/u/94753?v=3","gravatar_id":"","url":"https://api.github.com/users/humbletim","html_url":"https://github.com/humbletim","followers_url":"https://api.github.com/users/humbletim/followers","following_url":"https://api.github.com/users/humbletim/following{/other_user}","gists_url":"https://api.github.com/users/humbletim/gists{/gist_id}","starred_url":"https://api.github.com/users/humbletim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humbletim/subscriptions","organizations_url":"https://api.github.com/users/humbletim/orgs","repos_url":"https://api.github.com/users/humbletim/repos","events_url":"https://api.github.com/users/humbletim/events{/privacy}","received_events_url":"https://api.github.com/users/humbletim/received_events","type":"User","site_admin":false},"repo":{"id":61489633,"name":"hifi","full_name":"humbletim/hifi","owner":{"login":"humbletim","id":94753,"avatar_url":"https://avatars.githubusercontent.com/u/94753?v=3","gravatar_id":"","url":"https://api.github.com/users/humbletim","html_url":"https://github.com/humbletim","followers_url":"https://api.github.com/users/humbletim/followers","following_url":"https://api.github.com/users/humbletim/following{/other_user}","gists_url":"https://api.github.com/users/humbletim/gists{/gist_id}","starred_url":"https://api.github.com/users/humbletim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/humbletim/subscriptions","organizations_url":"https://api.github.com/users/humbletim/orgs","repos_url":"https://api.github.com/users/humbletim/repos","events_url":"https://api.github.com/users/humbletim/events{/privacy}","received_events_url":"https://api.github.com/users/humbletim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/humbletim/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/humbletim/hifi","forks_url":"https://api.github.com/repos/humbletim/hifi/forks","keys_url":"https://api.github.com/repos/humbletim/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/humbletim/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/humbletim/hifi/teams","hooks_url":"https://api.github.com/repos/humbletim/hifi/hooks","issue_events_url":"https://api.github.com/repos/humbletim/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/humbletim/hifi/events","assignees_url":"https://api.github.com/repos/humbletim/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/humbletim/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/humbletim/hifi/tags","blobs_url":"https://api.github.com/repos/humbletim/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/humbletim/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/humbletim/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/humbletim/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/humbletim/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/humbletim/hifi/languages","stargazers_url":"https://api.github.com/repos/humbletim/hifi/stargazers","contributors_url":"https://api.github.com/repos/humbletim/hifi/contributors","subscribers_url":"https://api.github.com/repos/humbletim/hifi/subscribers","subscription_url":"https://api.github.com/repos/humbletim/hifi/subscription","commits_url":"https://api.github.com/repos/humbletim/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/humbletim/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/humbletim/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/humbletim/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/humbletim/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/humbletim/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/humbletim/hifi/merges","archive_url":"https://api.github.com/repos/humbletim/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/humbletim/hifi/downloads","issues_url":"https://api.github.com/repos/humbletim/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/humbletim/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/humbletim/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/humbletim/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/humbletim/hifi/labels{/name}","releases_url":"https://api.github.com/repos/humbletim/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/humbletim/hifi/deployments","created_at":"2016-06-19T16:34:54Z","updated_at":"2016-06-19T16:35:03Z","pushed_at":"2016-11-06T15:56:20Z","git_url":"git://github.com/humbletim/hifi.git","ssh_url":"git@github.com:humbletim/hifi.git","clone_url":"https://github.com/humbletim/hifi.git","svn_url":"https://github.com/humbletim/hifi","homepage":"","size":253397,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"highfidelity:master","ref":"master","sha":"d108d2fa706df052a9e04efd0b0481c8f9f6d89e","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","deployments_url":"https://api.github.com/repos/highfidelity/hifi/deployments","created_at":"2012-08-10T18:26:22Z","updated_at":"2016-11-05T07:01:16Z","pushed_at":"2016-11-06T16:14:24Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":302967,"stargazers_count":447,"watchers_count":447,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":258,"mirror_url":null,"open_issues_count":60,"forks":258,"open_issues":60,"watchers":447,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/9016"},"html":{"href":"https://github.com/highfidelity/hifi/pull/9016"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/9016"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/9016/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/9016/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/9016/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/61452c21a2d877a75be54686e91e15cec6abb9cc"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":35,"deletions":1,"changed_files":2}}
{"actor":{"display_login":"humbletim"}}