{"action":"created","comment":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/230477075","pull_request_review_id":171231816,"id":230477075,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzMDQ3NzA3NQ==","diff_hunk":"@@ -215,193 +243,186 @@ def export_list(self):\n         exports = [self.download_export_form.format_export_data(e) for e in exports]\n         return exports\n \n-    def _get_export(self, domain, export_id):\n-        raise NotImplementedError()\n-\n     @property\n     def max_column_size(self):\n         try:\n             return int(self.request.GET.get('max_column_size', 2000))\n         except TypeError:\n             return 2000\n \n-    def get_filters(self, filter_form_data, mobile_user_and_group_slugs):\n-        raise NotImplementedError(\"Must return a list of export filter objects\")\n-\n-    @allow_remote_invocation\n-    def poll_custom_export_download(self, in_data):\n-        \"\"\"Polls celery to see how the export download task is going.\n-        :param in_data: dict passed by the  angular js controller.\n-        :return: final response: {\n-            'success': True,\n-            'dropbox_url': '<url>',\n-            'download_url: '<url>',\n-            <task info>\n-        }\n-        \"\"\"\n-        try:\n-            download_id = in_data['download_id']\n-        except KeyError:\n-            return format_angular_error(_(\"Requires a download id\"), log_error=False)\n-        try:\n-            context = get_download_context(download_id)\n-        except TaskFailedError:\n-            notify_exception(self.request, \"Export download failed\",\n-                             details={'download_id': download_id})\n-            return format_angular_error(\n-                _(\"Download Task Failed to Start. It seems that the server \"\n-                  \"might be under maintenance.\"),\n-                log_error=False,\n-            )\n-        if context.get('is_ready', False):\n-            context.update({\n-                'dropbox_url': reverse('dropbox_upload', args=(download_id,)),\n-                'download_url': \"{}?get_file\".format(\n-                    reverse('retrieve_download', args=(download_id,))\n-                ),\n-            })\n-        context['is_poll_successful'] = True\n-        return context\n \n-    def _get_download_task(self, in_data):\n-        export_filters, export_specs = self._process_filters_and_specs(in_data)\n-        export_instances = [self._get_export(self.domain, spec['export_id']) for spec in export_specs]\n-        self._check_deid_permissions(export_instances)\n-        self._check_export_size(export_instances, export_filters)\n-        return get_export_download(\n-            export_instances=export_instances,\n-            filters=export_filters,\n-            filename=self._get_filename(export_instances)\n+def _check_export_size(export_instances, export_filters):\n+    count = 0\n+    for instance in export_instances:\n+        count += get_export_size(instance, export_filters)\n+    if count > MAX_EXPORTABLE_ROWS and not PAGINATED_EXPORTS.enabled(domain):","path":"corehq/apps/export/views/download.py","position":187,"original_position":187,"commit_id":"3b3a76508989fd1b6b21445255ba45de4a7fbdef","original_commit_id":"3b3a76508989fd1b6b21445255ba45de4a7fbdef","user":{"login":"stickler-ci","id":16011037,"node_id":"MDQ6VXNlcjE2MDExMDM3","avatar_url":"https://avatars3.githubusercontent.com/u/16011037?v=4","gravatar_id":"","url":"https://api.github.com/users/stickler-ci","html_url":"https://github.com/stickler-ci","followers_url":"https://api.github.com/users/stickler-ci/followers","following_url":"https://api.github.com/users/stickler-ci/following{/other_user}","gists_url":"https://api.github.com/users/stickler-ci/gists{/gist_id}","starred_url":"https://api.github.com/users/stickler-ci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stickler-ci/subscriptions","organizations_url":"https://api.github.com/users/stickler-ci/orgs","repos_url":"https://api.github.com/users/stickler-ci/repos","events_url":"https://api.github.com/users/stickler-ci/events{/privacy}","received_events_url":"https://api.github.com/users/stickler-ci/received_events","type":"User","site_admin":false},"body":"F821 undefined name 'domain'","created_at":"2018-11-02T19:01:07Z","updated_at":"2018-11-02T19:01:08Z","html_url":"https://github.com/dimagi/commcare-hq/pull/22268#discussion_r230477075","pull_request_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments/230477075"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/22268#discussion_r230477075"},"pull_request":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268"}}},"pull_request":{"url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268","id":228019783,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4MDE5Nzgz","html_url":"https://github.com/dimagi/commcare-hq/pull/22268","diff_url":"https://github.com/dimagi/commcare-hq/pull/22268.diff","patch_url":"https://github.com/dimagi/commcare-hq/pull/22268.patch","issue_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22268","number":22268,"state":"open","locked":false,"title":"Download export: angular => knockout","user":{"login":"orangejenny","id":1486591,"node_id":"MDQ6VXNlcjE0ODY1OTE=","avatar_url":"https://avatars1.githubusercontent.com/u/1486591?v=4","gravatar_id":"","url":"https://api.github.com/users/orangejenny","html_url":"https://github.com/orangejenny","followers_url":"https://api.github.com/users/orangejenny/followers","following_url":"https://api.github.com/users/orangejenny/following{/other_user}","gists_url":"https://api.github.com/users/orangejenny/gists{/gist_id}","starred_url":"https://api.github.com/users/orangejenny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangejenny/subscriptions","organizations_url":"https://api.github.com/users/orangejenny/orgs","repos_url":"https://api.github.com/users/orangejenny/repos","events_url":"https://api.github.com/users/orangejenny/events{/privacy}","received_events_url":"https://api.github.com/users/orangejenny/received_events","type":"User","site_admin":false},"body":"This combines https://github.com/dimagi/commcare-hq/pull/22197 and https://github.com/dimagi/commcare-hq/pull/22158 into one PR, because they're going through QA together and keeping them separate is getting difficult to manage.\r\n\r\n@esoergel @nickpell You've both reviewed the early commits. The first unreviewed commit is [\r\nAdded support for list of exports](https://github.com/dimagi/commcare-hq/commit/2fee0de2375cbea83d755cca1a751a7f6fd2b29d)  \r\n\r\nNo rush on review - I'm still working on responding to the feedback you both gave on the early commits, plus QA hasn't started yet.\r\n\r\n[QA ticket](http://manage.dimagi.com/default.asp?285073)","created_at":"2018-11-02T18:15:23Z","updated_at":"2018-11-02T19:01:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b090e9deff7abfe7b3451e05da5a3780c8860461","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":79032211,"node_id":"MDU6TGFiZWw3OTAzMjIxMQ==","url":"https://api.github.com/repos/dimagi/commcare-hq/labels/Open%20for%20review:%20do%20not%20merge","name":"Open for review: do not merge","color":"5319e7","default":false},{"id":87923342,"node_id":"MDU6TGFiZWw4NzkyMzM0Mg==","url":"https://api.github.com/repos/dimagi/commcare-hq/labels/awaiting%20QA","name":"awaiting QA","color":"fbca04","default":false},{"id":724787015,"node_id":"MDU6TGFiZWw3MjQ3ODcwMTU=","url":"https://api.github.com/repos/dimagi/commcare-hq/labels/product/invisible","name":"product/invisible","color":"cfd2d6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268/commits","review_comments_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268/comments","review_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/22268/comments","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/3b3a76508989fd1b6b21445255ba45de4a7fbdef","head":{"label":"dimagi:jls/rebased-ko-export-download","ref":"jls/rebased-ko-export-download","sha":"3b3a76508989fd1b6b21445255ba45de4a7fbdef","user":{"login":"dimagi","id":94514,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NTE0","avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"node_id":"MDEwOlJlcG9zaXRvcnkyNDcyNzg=","name":"commcare-hq","full_name":"dimagi/commcare-hq","private":false,"owner":{"login":"dimagi","id":94514,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NTE0","avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2018-11-02T18:46:02Z","pushed_at":"2018-11-02T19:00:24Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"https://www.commcarehq.org","size":469648,"stargazers_count":319,"watchers_count":319,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":123,"open_issues":83,"watchers":319,"default_branch":"master"}},"base":{"label":"dimagi:master","ref":"master","sha":"2a7a109d35dc64d2b20d3f72391173201ca24690","user":{"login":"dimagi","id":94514,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NTE0","avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"repo":{"id":247278,"node_id":"MDEwOlJlcG9zaXRvcnkyNDcyNzg=","name":"commcare-hq","full_name":"dimagi/commcare-hq","private":false,"owner":{"login":"dimagi","id":94514,"node_id":"MDEyOk9yZ2FuaXphdGlvbjk0NTE0","avatar_url":"https://avatars1.githubusercontent.com/u/94514?v=4","gravatar_id":"","url":"https://api.github.com/users/dimagi","html_url":"https://github.com/dimagi","followers_url":"https://api.github.com/users/dimagi/followers","following_url":"https://api.github.com/users/dimagi/following{/other_user}","gists_url":"https://api.github.com/users/dimagi/gists{/gist_id}","starred_url":"https://api.github.com/users/dimagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimagi/subscriptions","organizations_url":"https://api.github.com/users/dimagi/orgs","repos_url":"https://api.github.com/users/dimagi/repos","events_url":"https://api.github.com/users/dimagi/events{/privacy}","received_events_url":"https://api.github.com/users/dimagi/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/dimagi/commcare-hq","description":"A server-side tool to help manage community health workers, written in Django","fork":false,"url":"https://api.github.com/repos/dimagi/commcare-hq","forks_url":"https://api.github.com/repos/dimagi/commcare-hq/forks","keys_url":"https://api.github.com/repos/dimagi/commcare-hq/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dimagi/commcare-hq/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dimagi/commcare-hq/teams","hooks_url":"https://api.github.com/repos/dimagi/commcare-hq/hooks","issue_events_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/events{/number}","events_url":"https://api.github.com/repos/dimagi/commcare-hq/events","assignees_url":"https://api.github.com/repos/dimagi/commcare-hq/assignees{/user}","branches_url":"https://api.github.com/repos/dimagi/commcare-hq/branches{/branch}","tags_url":"https://api.github.com/repos/dimagi/commcare-hq/tags","blobs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dimagi/commcare-hq/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dimagi/commcare-hq/git/refs{/sha}","trees_url":"https://api.github.com/repos/dimagi/commcare-hq/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dimagi/commcare-hq/statuses/{sha}","languages_url":"https://api.github.com/repos/dimagi/commcare-hq/languages","stargazers_url":"https://api.github.com/repos/dimagi/commcare-hq/stargazers","contributors_url":"https://api.github.com/repos/dimagi/commcare-hq/contributors","subscribers_url":"https://api.github.com/repos/dimagi/commcare-hq/subscribers","subscription_url":"https://api.github.com/repos/dimagi/commcare-hq/subscription","commits_url":"https://api.github.com/repos/dimagi/commcare-hq/commits{/sha}","git_commits_url":"https://api.github.com/repos/dimagi/commcare-hq/git/commits{/sha}","comments_url":"https://api.github.com/repos/dimagi/commcare-hq/comments{/number}","issue_comment_url":"https://api.github.com/repos/dimagi/commcare-hq/issues/comments{/number}","contents_url":"https://api.github.com/repos/dimagi/commcare-hq/contents/{+path}","compare_url":"https://api.github.com/repos/dimagi/commcare-hq/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dimagi/commcare-hq/merges","archive_url":"https://api.github.com/repos/dimagi/commcare-hq/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dimagi/commcare-hq/downloads","issues_url":"https://api.github.com/repos/dimagi/commcare-hq/issues{/number}","pulls_url":"https://api.github.com/repos/dimagi/commcare-hq/pulls{/number}","milestones_url":"https://api.github.com/repos/dimagi/commcare-hq/milestones{/number}","notifications_url":"https://api.github.com/repos/dimagi/commcare-hq/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dimagi/commcare-hq/labels{/name}","releases_url":"https://api.github.com/repos/dimagi/commcare-hq/releases{/id}","deployments_url":"https://api.github.com/repos/dimagi/commcare-hq/deployments","created_at":"2009-07-09T17:00:07Z","updated_at":"2018-11-02T18:46:02Z","pushed_at":"2018-11-02T19:00:24Z","git_url":"git://github.com/dimagi/commcare-hq.git","ssh_url":"git@github.com:dimagi/commcare-hq.git","clone_url":"https://github.com/dimagi/commcare-hq.git","svn_url":"https://github.com/dimagi/commcare-hq","homepage":"https://www.commcarehq.org","size":469648,"stargazers_count":319,"watchers_count":319,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":123,"mirror_url":null,"archived":false,"open_issues_count":83,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":123,"open_issues":83,"watchers":319,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268"},"html":{"href":"https://github.com/dimagi/commcare-hq/pull/22268"},"issue":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/22268"},"comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/issues/22268/comments"},"review_comments":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268/comments"},"review_comment":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dimagi/commcare-hq/pulls/22268/commits"},"statuses":{"href":"https://api.github.com/repos/dimagi/commcare-hq/statuses/3b3a76508989fd1b6b21445255ba45de4a7fbdef"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"stickler-ci"}}