{"action":"created","comment":{"url":"https://api.github.com/repos/mozilla/balrog/pulls/comments/84988481","pull_request_review_id":5729548,"id":84988481,"diff_hunk":"@@ -854,3 +870,19 @@ def testSentryRealError(self):\n             with mock.patch(\"auslib.web.base.sentry\") as sentry:\n                 self.client.get(\"/update/4/b/1.0/1/p/l/a/a/a/a/1/update.xml\")\n                 self.assertTrue(sentry.captureException.called)\n+\n+    def testNonSubstitutedUrlVariablesReturnEmptyUpdate(self):\n+        request1 = '/update/1/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/update.xml'\n+        request2 = '/update/2/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/update.xml'\n+        request3 = '/update/3/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/' \\\n+            'update.xml'\n+        request4 = '/update/4/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/' \\\n+            '%MOZ_VERSION%/update.xml'\n+        request5 = '/update/5/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%DISTRIBUTION%/%DISTRIBUTION_VERSION%/' \\\n+            '%IMEI%/update.xml'\n+        request6 = '/update/6/%PRODUCT%/%VERSION%/%BUILD_ID%/%BUILD_TARGET%/%LOCALE%/%CHANNEL%/%OS_VERSION%/%SYSTEM_CAPABILITIES%/%DISTRIBUTION%/' \\\n+            '%DISTRIBUTION_VERSION%/update.xml'\n+\n+        for request in [request1, request2, request3, request4, request5, request6]:\n+            ret = self.client.get(request)\n+            self.assertUpdatesAreEmpty(ret)","path":"auslib/test/web/test_client.py","position":42,"original_position":42,"commit_id":"b0da4abd6a1e35f4d3f3947c214cf291bc77ccd1","original_commit_id":"b0da4abd6a1e35f4d3f3947c214cf291bc77ccd1","user":{"login":"mozbhearsum","id":49649,"avatar_url":"https://avatars.githubusercontent.com/u/49649?v=3","gravatar_id":"","url":"https://api.github.com/users/mozbhearsum","html_url":"https://github.com/mozbhearsum","followers_url":"https://api.github.com/users/mozbhearsum/followers","following_url":"https://api.github.com/users/mozbhearsum/following{/other_user}","gists_url":"https://api.github.com/users/mozbhearsum/gists{/gist_id}","starred_url":"https://api.github.com/users/mozbhearsum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozbhearsum/subscriptions","organizations_url":"https://api.github.com/users/mozbhearsum/orgs","repos_url":"https://api.github.com/users/mozbhearsum/repos","events_url":"https://api.github.com/users/mozbhearsum/events{/privacy}","received_events_url":"https://api.github.com/users/mozbhearsum/received_events","type":"User","site_admin":false},"body":"I think it's better to do these tests without error handlers, actually. We currently eat 404s, so you can't check that this is working. AFAICT, the routes you added aren't working, but because you're testing for empty updates you don't know that. Try moving this to ClientTest and checking for 404 instead - that should uncover the issue.","created_at":"2016-10-25T20:04:28Z","updated_at":"2016-10-25T20:04:36Z","html_url":"https://github.com/mozilla/balrog/pull/161#discussion_r84988481","pull_request_url":"https://api.github.com/repos/mozilla/balrog/pulls/161","_links":{"self":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/comments/84988481"},"html":{"href":"https://github.com/mozilla/balrog/pull/161#discussion_r84988481"},"pull_request":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/161"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla/balrog/pulls/161","id":90654311,"html_url":"https://github.com/mozilla/balrog/pull/161","diff_url":"https://github.com/mozilla/balrog/pull/161.diff","patch_url":"https://github.com/mozilla/balrog/pull/161.patch","issue_url":"https://api.github.com/repos/mozilla/balrog/issues/161","number":161,"state":"open","locked":false,"title":"[client_view] Non-substituted url variables return empty response","user":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"body":"We get tens of thousands of requests per day that don't substitute\r\nthe URL variables. A route has been added that quickly returns an\r\nempty response for these. There's no reason query the rules table,\r\n we'll never find anything useful in there.\r\n\r\nFixes bug #1282569","created_at":"2016-10-24T17:10:50Z","updated_at":"2016-10-25T20:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b3d93adbf3dfde1e0fda302578063d36b9d94e47","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mozilla/balrog/pulls/161/commits","review_comments_url":"https://api.github.com/repos/mozilla/balrog/pulls/161/comments","review_comment_url":"https://api.github.com/repos/mozilla/balrog/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mozilla/balrog/issues/161/comments","statuses_url":"https://api.github.com/repos/mozilla/balrog/statuses/b0da4abd6a1e35f4d3f3947c214cf291bc77ccd1","head":{"label":"njirap:bug_1282569","ref":"bug_1282569","sha":"b0da4abd6a1e35f4d3f3947c214cf291bc77ccd1","user":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"repo":{"id":69882987,"name":"balrog","full_name":"njirap/balrog","owner":{"login":"njirap","id":2056512,"avatar_url":"https://avatars.githubusercontent.com/u/2056512?v=3","gravatar_id":"","url":"https://api.github.com/users/njirap","html_url":"https://github.com/njirap","followers_url":"https://api.github.com/users/njirap/followers","following_url":"https://api.github.com/users/njirap/following{/other_user}","gists_url":"https://api.github.com/users/njirap/gists{/gist_id}","starred_url":"https://api.github.com/users/njirap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/njirap/subscriptions","organizations_url":"https://api.github.com/users/njirap/orgs","repos_url":"https://api.github.com/users/njirap/repos","events_url":"https://api.github.com/users/njirap/events{/privacy}","received_events_url":"https://api.github.com/users/njirap/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/njirap/balrog","description":"Next generation update service for Mozilla products","fork":true,"url":"https://api.github.com/repos/njirap/balrog","forks_url":"https://api.github.com/repos/njirap/balrog/forks","keys_url":"https://api.github.com/repos/njirap/balrog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/njirap/balrog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/njirap/balrog/teams","hooks_url":"https://api.github.com/repos/njirap/balrog/hooks","issue_events_url":"https://api.github.com/repos/njirap/balrog/issues/events{/number}","events_url":"https://api.github.com/repos/njirap/balrog/events","assignees_url":"https://api.github.com/repos/njirap/balrog/assignees{/user}","branches_url":"https://api.github.com/repos/njirap/balrog/branches{/branch}","tags_url":"https://api.github.com/repos/njirap/balrog/tags","blobs_url":"https://api.github.com/repos/njirap/balrog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/njirap/balrog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/njirap/balrog/git/refs{/sha}","trees_url":"https://api.github.com/repos/njirap/balrog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/njirap/balrog/statuses/{sha}","languages_url":"https://api.github.com/repos/njirap/balrog/languages","stargazers_url":"https://api.github.com/repos/njirap/balrog/stargazers","contributors_url":"https://api.github.com/repos/njirap/balrog/contributors","subscribers_url":"https://api.github.com/repos/njirap/balrog/subscribers","subscription_url":"https://api.github.com/repos/njirap/balrog/subscription","commits_url":"https://api.github.com/repos/njirap/balrog/commits{/sha}","git_commits_url":"https://api.github.com/repos/njirap/balrog/git/commits{/sha}","comments_url":"https://api.github.com/repos/njirap/balrog/comments{/number}","issue_comment_url":"https://api.github.com/repos/njirap/balrog/issues/comments{/number}","contents_url":"https://api.github.com/repos/njirap/balrog/contents/{+path}","compare_url":"https://api.github.com/repos/njirap/balrog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/njirap/balrog/merges","archive_url":"https://api.github.com/repos/njirap/balrog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/njirap/balrog/downloads","issues_url":"https://api.github.com/repos/njirap/balrog/issues{/number}","pulls_url":"https://api.github.com/repos/njirap/balrog/pulls{/number}","milestones_url":"https://api.github.com/repos/njirap/balrog/milestones{/number}","notifications_url":"https://api.github.com/repos/njirap/balrog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/njirap/balrog/labels{/name}","releases_url":"https://api.github.com/repos/njirap/balrog/releases{/id}","deployments_url":"https://api.github.com/repos/njirap/balrog/deployments","created_at":"2016-10-03T15:17:22Z","updated_at":"2016-10-03T15:17:25Z","pushed_at":"2016-10-25T14:44:49Z","git_url":"git://github.com/njirap/balrog.git","ssh_url":"git@github.com:njirap/balrog.git","clone_url":"https://github.com/njirap/balrog.git","svn_url":"https://github.com/njirap/balrog","homepage":"","size":60810,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"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":"mozilla:master","ref":"master","sha":"2b4eab7acccc089419ed0ec87c92089e5798dea6","user":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"repo":{"id":2570444,"name":"balrog","full_name":"mozilla/balrog","owner":{"login":"mozilla","id":131524,"avatar_url":"https://avatars.githubusercontent.com/u/131524?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla","html_url":"https://github.com/mozilla","followers_url":"https://api.github.com/users/mozilla/followers","following_url":"https://api.github.com/users/mozilla/following{/other_user}","gists_url":"https://api.github.com/users/mozilla/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla/subscriptions","organizations_url":"https://api.github.com/users/mozilla/orgs","repos_url":"https://api.github.com/users/mozilla/repos","events_url":"https://api.github.com/users/mozilla/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla/balrog","description":"Next generation update service for Mozilla products","fork":false,"url":"https://api.github.com/repos/mozilla/balrog","forks_url":"https://api.github.com/repos/mozilla/balrog/forks","keys_url":"https://api.github.com/repos/mozilla/balrog/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla/balrog/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla/balrog/teams","hooks_url":"https://api.github.com/repos/mozilla/balrog/hooks","issue_events_url":"https://api.github.com/repos/mozilla/balrog/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla/balrog/events","assignees_url":"https://api.github.com/repos/mozilla/balrog/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla/balrog/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla/balrog/tags","blobs_url":"https://api.github.com/repos/mozilla/balrog/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla/balrog/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla/balrog/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla/balrog/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla/balrog/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla/balrog/languages","stargazers_url":"https://api.github.com/repos/mozilla/balrog/stargazers","contributors_url":"https://api.github.com/repos/mozilla/balrog/contributors","subscribers_url":"https://api.github.com/repos/mozilla/balrog/subscribers","subscription_url":"https://api.github.com/repos/mozilla/balrog/subscription","commits_url":"https://api.github.com/repos/mozilla/balrog/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla/balrog/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla/balrog/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla/balrog/issues/comments{/number}","contents_url":"https://api.github.com/repos/mozilla/balrog/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla/balrog/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla/balrog/merges","archive_url":"https://api.github.com/repos/mozilla/balrog/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla/balrog/downloads","issues_url":"https://api.github.com/repos/mozilla/balrog/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla/balrog/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla/balrog/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla/balrog/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla/balrog/labels{/name}","releases_url":"https://api.github.com/repos/mozilla/balrog/releases{/id}","deployments_url":"https://api.github.com/repos/mozilla/balrog/deployments","created_at":"2011-10-13T15:51:47Z","updated_at":"2016-10-24T13:58:41Z","pushed_at":"2016-10-25T18:50:54Z","git_url":"git://github.com/mozilla/balrog.git","ssh_url":"git@github.com:mozilla/balrog.git","clone_url":"https://github.com/mozilla/balrog.git","svn_url":"https://github.com/mozilla/balrog","homepage":"","size":61588,"stargazers_count":25,"watchers_count":25,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":45,"mirror_url":null,"open_issues_count":5,"forks":45,"open_issues":5,"watchers":25,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/161"},"html":{"href":"https://github.com/mozilla/balrog/pull/161"},"issue":{"href":"https://api.github.com/repos/mozilla/balrog/issues/161"},"comments":{"href":"https://api.github.com/repos/mozilla/balrog/issues/161/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/161/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mozilla/balrog/pulls/161/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla/balrog/statuses/b0da4abd6a1e35f4d3f3947c214cf291bc77ccd1"}}}}
{"actor":{"display_login":"mozbhearsum"}}