)]}'
{"heat/engine/resources/openstack/heat/resource_group.py":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"a120ce8a8e1732a84c3a06559a22ab621affedb9","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _run_update(self, total_capacity, max_updates, timeout):"},{"line_number":398,"context_line":"        if self.action \u003d\u003d self.DELETE:"},{"line_number":399,"context_line":"            template \u003d self._assemble_for_rolling_delete(total_capacity)"},{"line_number":400,"context_line":"        else:"},{"line_number":401,"context_line":"            template \u003d self._assemble_for_rolling_update(total_capacity,"},{"line_number":402,"context_line":"                                                         max_updates)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_23ad1d88","line":399,"updated":"2017-11-13 22:56:42.000000000","message":"Can you elaborate on why _assemble_for_rolling_update() doesn\u0027t do what we want here?","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":12404,"name":"Rico Lin","email":"ricolin@ricolky.com","username":"rico.lin"},"change_message_id":"4ce39b4689e7a2f255518affe7d341906b6f7ae3","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _run_update(self, total_capacity, max_updates, timeout):"},{"line_number":398,"context_line":"        if self.action \u003d\u003d self.DELETE:"},{"line_number":399,"context_line":"            template \u003d self._assemble_for_rolling_delete(total_capacity)"},{"line_number":400,"context_line":"        else:"},{"line_number":401,"context_line":"            template \u003d self._assemble_for_rolling_update(total_capacity,"},{"line_number":402,"context_line":"                                                         max_updates)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_45952a86","line":399,"in_reply_to":"1f485f77_23ad1d88","updated":"2017-11-19 17:34:20.000000000","message":"IMO _assemble_for_rolling_update got too much extra logic for delete case(like revoke blacklist, sorting replace priority).","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"a120ce8a8e1732a84c3a06559a22ab621affedb9","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _assemble_for_rolling_delete(self, total_capacity,"},{"line_number":582,"context_line":"                                     template_version\u003d(\u0027heat_template_version\u0027,"},{"line_number":583,"context_line":"                                                       \u0027queens\u0027)):"},{"line_number":584,"context_line":"        definitions \u003d grouputils.get_member_definitions(self)[:-total_capacity]"},{"line_number":585,"context_line":"        return scl_template.make_template(definitions,"},{"line_number":586,"context_line":"                                          version\u003dtemplate_version)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_6322f554","line":583,"updated":"2017-11-13 22:56:42.000000000","message":"Let\u0027s not change the template version while deleting the stack, that\u0027s a little scary.\n\nMaybe we can define the nested template version as a constant so that we can use it both here and in _assemble_for_rolling_update().","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":12404,"name":"Rico Lin","email":"ricolin@ricolky.com","username":"rico.lin"},"change_message_id":"4ce39b4689e7a2f255518affe7d341906b6f7ae3","unresolved":false,"context_lines":[{"line_number":580,"context_line":""},{"line_number":581,"context_line":"    def _assemble_for_rolling_delete(self, total_capacity,"},{"line_number":582,"context_line":"                                     template_version\u003d(\u0027heat_template_version\u0027,"},{"line_number":583,"context_line":"                                                       \u0027queens\u0027)):"},{"line_number":584,"context_line":"        definitions \u003d grouputils.get_member_definitions(self)[:-total_capacity]"},{"line_number":585,"context_line":"        return scl_template.make_template(definitions,"},{"line_number":586,"context_line":"                                          version\u003dtemplate_version)"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_197fa4e0","line":583,"in_reply_to":"1f485f77_6322f554","updated":"2017-11-19 17:34:20.000000000","message":"Done","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"a120ce8a8e1732a84c3a06559a22ab621affedb9","unresolved":false,"context_lines":[{"line_number":581,"context_line":"    def _assemble_for_rolling_delete(self, total_capacity,"},{"line_number":582,"context_line":"                                     template_version\u003d(\u0027heat_template_version\u0027,"},{"line_number":583,"context_line":"                                                       \u0027queens\u0027)):"},{"line_number":584,"context_line":"        definitions \u003d grouputils.get_member_definitions(self)[:-total_capacity]"},{"line_number":585,"context_line":"        return scl_template.make_template(definitions,"},{"line_number":586,"context_line":"                                          version\u003dtemplate_version)"},{"line_number":587,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_83873110","line":584,"range":{"start_line":584,"start_character":61,"end_line":584,"end_character":79},"updated":"2017-11-13 22:56:42.000000000","message":"I don\u0027t think this is correct - it will *remove* total_capacity resources. I think we want to *leave* total_capacity resources, so there should be no \u0027-\u0027 sign here.","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":12404,"name":"Rico Lin","email":"ricolin@ricolky.com","username":"rico.lin"},"change_message_id":"4ce39b4689e7a2f255518affe7d341906b6f7ae3","unresolved":false,"context_lines":[{"line_number":581,"context_line":"    def _assemble_for_rolling_delete(self, total_capacity,"},{"line_number":582,"context_line":"                                     template_version\u003d(\u0027heat_template_version\u0027,"},{"line_number":583,"context_line":"                                                       \u0027queens\u0027)):"},{"line_number":584,"context_line":"        definitions \u003d grouputils.get_member_definitions(self)[:-total_capacity]"},{"line_number":585,"context_line":"        return scl_template.make_template(definitions,"},{"line_number":586,"context_line":"                                          version\u003dtemplate_version)"},{"line_number":587,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_59fcfcb3","line":584,"range":{"start_line":584,"start_character":61,"end_line":584,"end_character":79},"in_reply_to":"1f485f77_83873110","updated":"2017-11-19 17:34:20.000000000","message":"We generate template with _assemble_for_rolling_delete and send it to compare with original one. So we take the rest part besides capacity and assemble as a template.\n\nFor example with t_c \u003d3 and resources \u003d [r1,r2,r3,r4,r5,r6,r7]\n_assemble_for_rolling_delete will assemble template with resources [r1,r2,r3,r4] so the stack will delete [r5,r6,r7] in first batch","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"a120ce8a8e1732a84c3a06559a22ab621affedb9","unresolved":false,"context_lines":[{"line_number":666,"context_line":"                checker.start()"},{"line_number":667,"context_line":"            if not checker.step():"},{"line_number":668,"context_line":"                return False"},{"line_number":669,"context_line":"        return True"},{"line_number":670,"context_line":""},{"line_number":671,"context_line":"    @staticmethod"},{"line_number":672,"context_line":"    def _get_batches(targ_cap, curr_cap, batch_size, min_in_service):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_e305c5c3","line":669,"updated":"2017-11-13 22:56:42.000000000","message":"Shouldn\u0027t we call super().handle_delete() at this point? Currently it looks like we end up with a nested stack containing 0 resources, instead of deleting the nested stack.","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":12404,"name":"Rico Lin","email":"ricolin@ricolky.com","username":"rico.lin"},"change_message_id":"4ce39b4689e7a2f255518affe7d341906b6f7ae3","unresolved":false,"context_lines":[{"line_number":666,"context_line":"                checker.start()"},{"line_number":667,"context_line":"            if not checker.step():"},{"line_number":668,"context_line":"                return False"},{"line_number":669,"context_line":"        return True"},{"line_number":670,"context_line":""},{"line_number":671,"context_line":"    @staticmethod"},{"line_number":672,"context_line":"    def _get_batches(targ_cap, curr_cap, batch_size, min_in_service):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f485f77_65b14647","line":669,"in_reply_to":"1f485f77_e305c5c3","updated":"2017-11-19 17:34:20.000000000","message":"Done","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"08f10a23b5773c36bbeef3442260448e3db16935","unresolved":false,"context_lines":[{"line_number":256,"context_line":"            default\u003d0"},{"line_number":257,"context_line":"        ),"},{"line_number":258,"context_line":"    }"},{"line_number":259,"context_line":"    batch_delete_schema \u003d batch_create_schema"},{"line_number":260,"context_line":""},{"line_number":261,"context_line":"    update_policy_schema \u003d {"},{"line_number":262,"context_line":"        ROLLING_UPDATE: properties.Schema("}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_38593d8d","line":259,"updated":"2018-01-16 21:42:31.000000000","message":"It\u0027d be easier to just rename it than to give it two names.","commit_id":"04c663bfda2ff2efa371dd12f1c7e207d169de23"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"08f10a23b5773c36bbeef3442260448e3db16935","unresolved":false,"context_lines":[{"line_number":396,"context_line":""},{"line_number":397,"context_line":"    def _run_update(self, total_capacity, max_updates, timeout):"},{"line_number":398,"context_line":"        if self.action \u003d\u003d self.DELETE:"},{"line_number":399,"context_line":"            template \u003d self._assemble_for_rolling_delete(total_capacity)"},{"line_number":400,"context_line":"        else:"},{"line_number":401,"context_line":"            template \u003d self._assemble_for_rolling_update(total_capacity,"},{"line_number":402,"context_line":"                                                         max_updates)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_75bd8ed6","line":399,"updated":"2018-01-16 21:42:31.000000000","message":"You should be passing max_updates here, not total_capacity.","commit_id":"04c663bfda2ff2efa371dd12f1c7e207d169de23"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"08f10a23b5773c36bbeef3442260448e3db16935","unresolved":false,"context_lines":[{"line_number":580,"context_line":"    def _assemble_for_rolling_delete(self, total_capacity,"},{"line_number":581,"context_line":"                                     template_version\u003dNESTED_TEMPLATE_VERSION):"},{"line_number":582,"context_line":"        # remove number (as `total_capacity` size) of resources from back to"},{"line_number":583,"context_line":"        # front, so stack will delete those resources later."},{"line_number":584,"context_line":"        definitions \u003d grouputils.get_member_definitions(self)[:-total_capacity]"},{"line_number":585,"context_line":""},{"line_number":586,"context_line":"        return scl_template.make_template(definitions,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_b5c6b667","line":583,"updated":"2018-01-16 21:42:31.000000000","message":"It\u0027s not the total_capacity at all then, we should call it something like max_deletes.","commit_id":"04c663bfda2ff2efa371dd12f1c7e207d169de23"},{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"08f10a23b5773c36bbeef3442260448e3db16935","unresolved":false,"context_lines":[{"line_number":698,"context_line":""},{"line_number":699,"context_line":"        if self.action \u003d\u003d self.DELETE:"},{"line_number":700,"context_line":"            batches \u003d list(self._get_batches(curr_cap, 0, batch_size,"},{"line_number":701,"context_line":"                                             min_in_service))"},{"line_number":702,"context_line":"        else:"},{"line_number":703,"context_line":"            batches \u003d list(self._get_batches(self.get_size(), curr_cap,"},{"line_number":704,"context_line":"                                             batch_size, min_in_service))"}],"source_content_type":"text/x-python","patch_set":3,"id":"7f96bb07_b8478d4c","line":701,"updated":"2018-01-16 21:42:31.000000000","message":"OK, so we\u0027re kind of subverting the meaning of all the variables here by getting the batches it would take to reach the current capacity by creating resources starting from 0, when in fact we\u0027re doing the opposite...\n\nSo in the example from the tests (initial size 10, batch_size 3), we\u0027ll end up with the curr_cap, max_upd pairs: (3, 3) (6, 3), (9, 3), (10, 3)\n\n_run_update() ignores the max_upd, so the curr_caps it passes on to _assemble_for_rolling_delete() will be 3, 6, 9, 10. And each time that many resources are removed so the size will go from 10 -\u003e 7 -\u003e 1 -\u003e 0 -\u003e 0.\n\nObviously we want 10 -\u003e 7 -\u003e 4 -\u003e 1 -\u003e 0.","commit_id":"04c663bfda2ff2efa371dd12f1c7e207d169de23"}],"releasenotes/notes/batch_delete-in-resource-group-3b7d82e5d817e3ea.yaml":[{"author":{"_account_id":4257,"name":"Zane Bitter","email":"zbitter@redhat.com","username":"zaneb"},"change_message_id":"a120ce8a8e1732a84c3a06559a22ab621affedb9","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add `batch_delete` in update_policy for resource group. Allow us to request"},{"line_number":5,"context_line":"    batch delete when delete a resource group. With option `max_batch_size` and"},{"line_number":6,"context_line":"    `pause_time`, we can make sure there\u0027re enough pause time between batches"},{"line_number":7,"context_line":"    and enough of number of resources triggered at same batch."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1f485f77_c3bbe9c1","line":6,"range":{"start_line":6,"start_character":35,"end_line":6,"end_character":43},"updated":"2017-11-13 22:56:42.000000000","message":"there is","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"},{"author":{"_account_id":12404,"name":"Rico Lin","email":"ricolin@ricolky.com","username":"rico.lin"},"change_message_id":"4ce39b4689e7a2f255518affe7d341906b6f7ae3","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    Add `batch_delete` in update_policy for resource group. Allow us to request"},{"line_number":5,"context_line":"    batch delete when delete a resource group. With option `max_batch_size` and"},{"line_number":6,"context_line":"    `pause_time`, we can make sure there\u0027re enough pause time between batches"},{"line_number":7,"context_line":"    and enough of number of resources triggered at same batch."}],"source_content_type":"text/x-yaml","patch_set":2,"id":"1f485f77_a4754934","line":6,"range":{"start_line":6,"start_character":35,"end_line":6,"end_character":43},"in_reply_to":"1f485f77_c3bbe9c1","updated":"2017-11-19 17:34:20.000000000","message":"Done","commit_id":"52a11dc8733a2fa7bbaa8b3db6a12e5b8b519d4d"}]}
