{"action":"created","comment":{"url":"https://api.github.com/repos/DataBiosphere/azul/pulls/comments/210799945","pull_request_review_id":147089184,"id":210799945,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMDc5OTk0NQ==","diff_hunk":"@@ -176,8 +196,60 @@ def merge(cur_bundles, new_bundles):\n             except KeyError:\n                 bundle = new_bundle\n             else:\n-                bundle = new_bundle if new_bundle['version'] >= cur_bundle['version'] else cur_bundle\n+                bundle = new_bundle if ((new_bundle['version'] >= cur_bundle['version']) or\n+                                        new_bundle['admin_deleted']) else cur_bundle\n             assert bundles.setdefault(bundle_uuid, bundle) is bundle\n         for bundle in cur_bundles_by_id.values():\n             assert bundles.setdefault(bundle['uuid'], bundle) is bundle\n         return list(bundles.values())\n+\n+    def delete(self, dss_notification: Mapping[str, Any]) -> None:\n+        bundle_uuid = dss_notification['match']['bundle_uuid']\n+        bundle_version = dss_notification['match']['bundle_version']\n+\n+        es_client = self.properties.elastic_search_client\n+\n+        search_query = {\n+            \"query\": {\n+                \"bool\": {\n+                    \"must\": [\n+                        {\n+                            \"term\": {","path":"src/azul/indexer.py","position":139,"original_position":139,"commit_id":"655be6c5e6fb6fe42ad56d54d658b90ecc92c17b","original_commit_id":"655be6c5e6fb6fe42ad56d54d658b90ecc92c17b","user":{"login":"hannes-ucsc","id":5143256,"node_id":"MDQ6VXNlcjUxNDMyNTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5143256?v=4","gravatar_id":"","url":"https://api.github.com/users/hannes-ucsc","html_url":"https://github.com/hannes-ucsc","followers_url":"https://api.github.com/users/hannes-ucsc/followers","following_url":"https://api.github.com/users/hannes-ucsc/following{/other_user}","gists_url":"https://api.github.com/users/hannes-ucsc/gists{/gist_id}","starred_url":"https://api.github.com/users/hannes-ucsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannes-ucsc/subscriptions","organizations_url":"https://api.github.com/users/hannes-ucsc/orgs","repos_url":"https://api.github.com/users/hannes-ucsc/repos","events_url":"https://api.github.com/users/hannes-ucsc/events{/privacy}","received_events_url":"https://api.github.com/users/hannes-ucsc/received_events","type":"User","site_admin":false},"body":"I think this query could be simplified using one `terms` branch instead of two `term` branches.","created_at":"2018-08-17T04:02:07Z","updated_at":"2018-08-17T04:03:49Z","html_url":"https://github.com/DataBiosphere/azul/pull/157#discussion_r210799945","pull_request_url":"https://api.github.com/repos/DataBiosphere/azul/pulls/157","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/comments/210799945"},"html":{"href":"https://github.com/DataBiosphere/azul/pull/157#discussion_r210799945"},"pull_request":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/157"}}},"pull_request":{"url":"https://api.github.com/repos/DataBiosphere/azul/pulls/157","id":205777649,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1Nzc3NjQ5","html_url":"https://github.com/DataBiosphere/azul/pull/157","diff_url":"https://github.com/DataBiosphere/azul/pull/157.diff","patch_url":"https://github.com/DataBiosphere/azul/pull/157.patch","issue_url":"https://api.github.com/repos/DataBiosphere/azul/issues/157","number":157,"state":"open","locked":false,"title":"Added end-point to delete bundles (fixes #45)","user":{"login":"jyotheeshwar","id":1765811,"node_id":"MDQ6VXNlcjE3NjU4MTE=","avatar_url":"https://avatars2.githubusercontent.com/u/1765811?v=4","gravatar_id":"","url":"https://api.github.com/users/jyotheeshwar","html_url":"https://github.com/jyotheeshwar","followers_url":"https://api.github.com/users/jyotheeshwar/followers","following_url":"https://api.github.com/users/jyotheeshwar/following{/other_user}","gists_url":"https://api.github.com/users/jyotheeshwar/gists{/gist_id}","starred_url":"https://api.github.com/users/jyotheeshwar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyotheeshwar/subscriptions","organizations_url":"https://api.github.com/users/jyotheeshwar/orgs","repos_url":"https://api.github.com/users/jyotheeshwar/repos","events_url":"https://api.github.com/users/jyotheeshwar/events{/privacy}","received_events_url":"https://api.github.com/users/jyotheeshwar/received_events","type":"User","site_admin":false},"body":"Sample payload format:\r\n\r\n```\r\n{\r\n            \"match\": {\r\n                              \"bundle_uuid\":\"9dec1bd6-ced8-448a-8e45-1fc7846d8995\",\r\n                              \"bundle_version\":\"2018-03-29T154319.834528Z\",\r\n                              \"index\": \"browser_files_dev\"\r\n                           }\r\n}\r\n```","created_at":"2018-08-02T15:37:28Z","updated_at":"2018-08-17T04:03:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"74ba7415fd8b7b587de94ade0ebab82bb1abbc37","assignee":{"login":"hannes-ucsc","id":5143256,"node_id":"MDQ6VXNlcjUxNDMyNTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5143256?v=4","gravatar_id":"","url":"https://api.github.com/users/hannes-ucsc","html_url":"https://github.com/hannes-ucsc","followers_url":"https://api.github.com/users/hannes-ucsc/followers","following_url":"https://api.github.com/users/hannes-ucsc/following{/other_user}","gists_url":"https://api.github.com/users/hannes-ucsc/gists{/gist_id}","starred_url":"https://api.github.com/users/hannes-ucsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannes-ucsc/subscriptions","organizations_url":"https://api.github.com/users/hannes-ucsc/orgs","repos_url":"https://api.github.com/users/hannes-ucsc/repos","events_url":"https://api.github.com/users/hannes-ucsc/events{/privacy}","received_events_url":"https://api.github.com/users/hannes-ucsc/received_events","type":"User","site_admin":false},"assignees":[{"login":"hannes-ucsc","id":5143256,"node_id":"MDQ6VXNlcjUxNDMyNTY=","avatar_url":"https://avatars2.githubusercontent.com/u/5143256?v=4","gravatar_id":"","url":"https://api.github.com/users/hannes-ucsc","html_url":"https://github.com/hannes-ucsc","followers_url":"https://api.github.com/users/hannes-ucsc/followers","following_url":"https://api.github.com/users/hannes-ucsc/following{/other_user}","gists_url":"https://api.github.com/users/hannes-ucsc/gists{/gist_id}","starred_url":"https://api.github.com/users/hannes-ucsc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hannes-ucsc/subscriptions","organizations_url":"https://api.github.com/users/hannes-ucsc/orgs","repos_url":"https://api.github.com/users/hannes-ucsc/repos","events_url":"https://api.github.com/users/hannes-ucsc/events{/privacy}","received_events_url":"https://api.github.com/users/hannes-ucsc/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":{"url":"https://api.github.com/repos/DataBiosphere/azul/milestones/3","html_url":"https://github.com/DataBiosphere/azul/milestone/3","labels_url":"https://api.github.com/repos/DataBiosphere/azul/milestones/3/labels","id":3545480,"node_id":"MDk6TWlsZXN0b25lMzU0NTQ4MA==","number":3,"title":"Sprint 7 - Aug 17","description":"","creator":{"login":"kozbo","id":17557555,"node_id":"MDQ6VXNlcjE3NTU3NTU1","avatar_url":"https://avatars2.githubusercontent.com/u/17557555?v=4","gravatar_id":"","url":"https://api.github.com/users/kozbo","html_url":"https://github.com/kozbo","followers_url":"https://api.github.com/users/kozbo/followers","following_url":"https://api.github.com/users/kozbo/following{/other_user}","gists_url":"https://api.github.com/users/kozbo/gists{/gist_id}","starred_url":"https://api.github.com/users/kozbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kozbo/subscriptions","organizations_url":"https://api.github.com/users/kozbo/orgs","repos_url":"https://api.github.com/users/kozbo/repos","events_url":"https://api.github.com/users/kozbo/events{/privacy}","received_events_url":"https://api.github.com/users/kozbo/received_events","type":"User","site_admin":false},"open_issues":26,"closed_issues":23,"state":"open","created_at":"2018-08-03T19:44:05Z","updated_at":"2018-08-17T00:39:33Z","due_on":"2018-08-17T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/DataBiosphere/azul/pulls/157/commits","review_comments_url":"https://api.github.com/repos/DataBiosphere/azul/pulls/157/comments","review_comment_url":"https://api.github.com/repos/DataBiosphere/azul/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataBiosphere/azul/issues/157/comments","statuses_url":"https://api.github.com/repos/DataBiosphere/azul/statuses/655be6c5e6fb6fe42ad56d54d658b90ecc92c17b","head":{"label":"DataBiosphere:feature/jyo/45-deletion-handlers","ref":"feature/jyo/45-deletion-handlers","sha":"655be6c5e6fb6fe42ad56d54d658b90ecc92c17b","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":139095537,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwOTU1Mzc=","name":"azul","full_name":"DataBiosphere/azul","owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/azul","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/azul","forks_url":"https://api.github.com/repos/DataBiosphere/azul/forks","keys_url":"https://api.github.com/repos/DataBiosphere/azul/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/azul/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/azul/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/azul/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/azul/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/azul/events","assignees_url":"https://api.github.com/repos/DataBiosphere/azul/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/azul/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/azul/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/azul/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/azul/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/azul/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/azul/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/azul/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/azul/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/azul/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/azul/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/azul/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/azul/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/azul/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/azul/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/azul/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/azul/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/azul/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/azul/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/azul/merges","archive_url":"https://api.github.com/repos/DataBiosphere/azul/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/azul/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/azul/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/azul/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/azul/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/azul/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/azul/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/azul/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/azul/deployments","created_at":"2018-06-29T03:18:14Z","updated_at":"2018-08-16T19:28:58Z","pushed_at":"2018-08-17T00:28:50Z","git_url":"git://github.com/DataBiosphere/azul.git","ssh_url":"git@github.com:DataBiosphere/azul.git","clone_url":"https://github.com/DataBiosphere/azul.git","svn_url":"https://github.com/DataBiosphere/azul","homepage":null,"size":10601,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":87,"watchers":1,"default_branch":"develop"}},"base":{"label":"DataBiosphere:develop","ref":"develop","sha":"172c8db33d2092a5e38cb3e668117774b4c52a02","user":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":139095537,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkwOTU1Mzc=","name":"azul","full_name":"DataBiosphere/azul","owner":{"login":"DataBiosphere","id":32805087,"node_id":"MDEyOk9yZ2FuaXphdGlvbjMyODA1MDg3","avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/azul","description":null,"fork":false,"url":"https://api.github.com/repos/DataBiosphere/azul","forks_url":"https://api.github.com/repos/DataBiosphere/azul/forks","keys_url":"https://api.github.com/repos/DataBiosphere/azul/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/azul/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/azul/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/azul/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/azul/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/azul/events","assignees_url":"https://api.github.com/repos/DataBiosphere/azul/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/azul/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/azul/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/azul/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/azul/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/azul/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/azul/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/azul/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/azul/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/azul/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/azul/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/azul/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/azul/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/azul/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/azul/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/azul/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/azul/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/azul/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/azul/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/azul/merges","archive_url":"https://api.github.com/repos/DataBiosphere/azul/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/azul/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/azul/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/azul/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/azul/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/azul/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/azul/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/azul/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/azul/deployments","created_at":"2018-06-29T03:18:14Z","updated_at":"2018-08-16T19:28:58Z","pushed_at":"2018-08-17T00:28:50Z","git_url":"git://github.com/DataBiosphere/azul.git","ssh_url":"git@github.com:DataBiosphere/azul.git","clone_url":"https://github.com/DataBiosphere/azul.git","svn_url":"https://github.com/DataBiosphere/azul","homepage":null,"size":10601,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":87,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":87,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/157"},"html":{"href":"https://github.com/DataBiosphere/azul/pull/157"},"issue":{"href":"https://api.github.com/repos/DataBiosphere/azul/issues/157"},"comments":{"href":"https://api.github.com/repos/DataBiosphere/azul/issues/157/comments"},"review_comments":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/157/comments"},"review_comment":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataBiosphere/azul/pulls/157/commits"},"statuses":{"href":"https://api.github.com/repos/DataBiosphere/azul/statuses/655be6c5e6fb6fe42ad56d54d658b90ecc92c17b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"hannes-ucsc"}}