)]}'
{"cinder/tests/test_volume.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"7186e9161b31aa060bc96dbddba470cf1b72c25b","unresolved":false,"context_lines":[{"line_number":2329,"context_line":"                       fake_copy_image_to_volume)"},{"line_number":2330,"context_line":"        self.assertRaises(exception.ImageCopyFailure,"},{"line_number":2331,"context_line":"                          self._create_volume_from_image)"},{"line_number":2332,"context_line":"        # NOTE(dulek): Rescheduling should not occurr, so lets assert that"},{"line_number":2333,"context_line":"        # allocated_capacity is incremented."},{"line_number":2334,"context_line":"        self.assertDictEqual(self.volume.stats[\u0027pools\u0027],"},{"line_number":2335,"context_line":"                             {\u0027_pool0\u0027: {\u0027allocated_capacity_gb\u0027: 1}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_3269a48c","line":2332,"updated":"2015-02-11 20:45:19.000000000","message":"typo occurr -\u003e occur","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"afaec7a56f4b578bab0fcacd197452b7ce353110","unresolved":false,"context_lines":[{"line_number":2329,"context_line":"                       fake_copy_image_to_volume)"},{"line_number":2330,"context_line":"        self.assertRaises(exception.ImageCopyFailure,"},{"line_number":2331,"context_line":"                          self._create_volume_from_image)"},{"line_number":2332,"context_line":"        # NOTE(dulek): Rescheduling should not occurr, so lets assert that"},{"line_number":2333,"context_line":"        # allocated_capacity is incremented."},{"line_number":2334,"context_line":"        self.assertDictEqual(self.volume.stats[\u0027pools\u0027],"},{"line_number":2335,"context_line":"                             {\u0027_pool0\u0027: {\u0027allocated_capacity_gb\u0027: 1}})"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_4a82cac8","line":2332,"in_reply_to":"da86d52c_3269a48c","updated":"2015-02-12 08:41:52.000000000","message":"Done","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":12608,"name":"Curt Bruns","email":"curt.e.bruns@intel.com","username":"cebruns"},"change_message_id":"9da54522ab973590022c97d583e5a44a81dea2c6","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                          {\u0027volume_properties\u0027: self.volume_params})"},{"line_number":351,"context_line":"        # NOTE(dulek): Volume should be rescheduled as we passed request_spec,"},{"line_number":352,"context_line":"        # assert that it wasn\u0027t counted in allocated_capacity tracking."},{"line_number":353,"context_line":"        self.assertEqual(self.volume.stats[\u0027pools\u0027], {})"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        db.volume_destroy(context.get_admin_context(), volume_id)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_409d3465","line":353,"updated":"2015-02-13 02:21:09.000000000","message":"AssertEqual should be in form of (EXPECTED, MEASURED) - but it looks like this file is all backwards, not just yours.","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0da07d358c15ad1d29ccb3b5bb3e9be6b74c33af","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                          {\u0027volume_properties\u0027: self.volume_params})"},{"line_number":351,"context_line":"        # NOTE(dulek): Volume should be rescheduled as we passed request_spec,"},{"line_number":352,"context_line":"        # assert that it wasn\u0027t counted in allocated_capacity tracking."},{"line_number":353,"context_line":"        self.assertEqual(self.volume.stats[\u0027pools\u0027], {})"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        db.volume_destroy(context.get_admin_context(), volume_id)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_cf48515f","line":353,"in_reply_to":"da86d52c_409d3465","updated":"2015-02-13 09:22:46.000000000","message":"Yes, I\u0027ve followed convention of the file. Cinder unit test need some spring cleaning. ;)","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":12608,"name":"Curt Bruns","email":"curt.e.bruns@intel.com","username":"cebruns"},"change_message_id":"69620defa00283c43a85cdb417ad56681432e67b","unresolved":false,"context_lines":[{"line_number":350,"context_line":"                          {\u0027volume_properties\u0027: self.volume_params})"},{"line_number":351,"context_line":"        # NOTE(dulek): Volume should be rescheduled as we passed request_spec,"},{"line_number":352,"context_line":"        # assert that it wasn\u0027t counted in allocated_capacity tracking."},{"line_number":353,"context_line":"        self.assertEqual(self.volume.stats[\u0027pools\u0027], {})"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        db.volume_destroy(context.get_admin_context(), volume_id)"},{"line_number":356,"context_line":""}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_177fd6ac","line":353,"in_reply_to":"da86d52c_cf48515f","updated":"2015-02-13 15:28:09.000000000","message":"Agreed.","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"}],"cinder/volume/flows/manager/create_volume.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"7186e9161b31aa060bc96dbddba470cf1b72c25b","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    def revert(self, context, result, flow_failures, **kwargs):"},{"line_number":149,"context_line":"        # NOTE(dulek): Revert is occurring and manager need to know if"},{"line_number":150,"context_line":"        # rescheduling happened. We\u0027re injecting this information into"},{"line_number":151,"context_line":"        # exception that will be caugth there. This is ugly and we need"},{"line_number":152,"context_line":"        # TaskFlow to support better way of returning data from reverted flow."},{"line_number":153,"context_line":"        cause \u003d list(flow_failures.values())[0]"},{"line_number":154,"context_line":"        cause.exception.rescheduled \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_d20be821","line":151,"updated":"2015-02-11 20:45:19.000000000","message":"typo -caugth -\u003e caught","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"afaec7a56f4b578bab0fcacd197452b7ce353110","unresolved":false,"context_lines":[{"line_number":148,"context_line":"    def revert(self, context, result, flow_failures, **kwargs):"},{"line_number":149,"context_line":"        # NOTE(dulek): Revert is occurring and manager need to know if"},{"line_number":150,"context_line":"        # rescheduling happened. We\u0027re injecting this information into"},{"line_number":151,"context_line":"        # exception that will be caugth there. This is ugly and we need"},{"line_number":152,"context_line":"        # TaskFlow to support better way of returning data from reverted flow."},{"line_number":153,"context_line":"        cause \u003d list(flow_failures.values())[0]"},{"line_number":154,"context_line":"        cause.exception.rescheduled \u003d False"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_aa6a6617","line":151,"in_reply_to":"da86d52c_d20be821","updated":"2015-02-12 08:41:52.000000000","message":"Done","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"99910c6d5cff3c34db8fbfcece0988d49be29913","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # rescheduling happened. We\u0027re injecting this information into"},{"line_number":151,"context_line":"        # exception that will be caught there. This is ugly and we need"},{"line_number":152,"context_line":"        # TaskFlow to support better way of returning data from reverted flow."},{"line_number":153,"context_line":"        cause \u003d list(flow_failures.values())[0]"},{"line_number":154,"context_line":"        cause.exception.rescheduled \u003d False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Check if we have a cause which can tell us not to reschedule."}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_381bcc1d","line":153,"updated":"2015-02-14 22:22:35.000000000","message":"Did u try using the ``self.notifier`` object and emitting a notification (aka RESCHEDULED or NOT_RESCHEDULED event or both...) with all the needed data and then attaching a callback in the manager layer to do whatever is needed in this situation from the manager code? Although the idea of returning some kind of contextual data from revert could be useful...","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"479ba3f9a0d4b31ceb937a7ee551d0954df3b26e","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # rescheduling happened. We\u0027re injecting this information into"},{"line_number":151,"context_line":"        # exception that will be caught there. This is ugly and we need"},{"line_number":152,"context_line":"        # TaskFlow to support better way of returning data from reverted flow."},{"line_number":153,"context_line":"        cause \u003d list(flow_failures.values())[0]"},{"line_number":154,"context_line":"        cause.exception.rescheduled \u003d False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Check if we have a cause which can tell us not to reschedule."}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_a1a85778","line":153,"in_reply_to":"da86d52c_381bcc1d","updated":"2015-02-16 08:54:31.000000000","message":"I\u0027ve tried that, but the code came out even more complicated and that\u0027s why I followed this patch. That solution was also working fine, I\u0027ve only found it harder to understand.\n\nWhat would be useful is to be able to save something into the engine\u0027s store in revert method and be able to prevent revert operation from removing partial results (vol_ref is useful outside of the flow even if revert occurred).","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":1297,"name":"Joshua Harlow","email":"jxharlow@godaddy.com","username":"harlowja"},"change_message_id":"920c1d2105c826a2045326b6693d6e1c233ee3ad","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        # rescheduling happened. We\u0027re injecting this information into"},{"line_number":151,"context_line":"        # exception that will be caught there. This is ugly and we need"},{"line_number":152,"context_line":"        # TaskFlow to support better way of returning data from reverted flow."},{"line_number":153,"context_line":"        cause \u003d list(flow_failures.values())[0]"},{"line_number":154,"context_line":"        cause.exception.rescheduled \u003d False"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        # Check if we have a cause which can tell us not to reschedule."}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_a83f45b4","line":153,"in_reply_to":"da86d52c_a1a85778","updated":"2015-02-16 17:02:27.000000000","message":"Yup, I think its do-able to have some kind of place to save reverted info, not sure what to call said place but it\u0027s possible.","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"}],"cinder/volume/manager.py":[{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"7186e9161b31aa060bc96dbddba470cf1b72c25b","unresolved":false,"context_lines":[{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"},{"line_number":433,"context_line":"                if pool is None:"},{"line_number":434,"context_line":"                    # Legacy volume, put them into default pool"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_72ea3c10","line":431,"updated":"2015-02-11 20:45:19.000000000","message":"typo as as -\u003e as","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"afaec7a56f4b578bab0fcacd197452b7ce353110","unresolved":false,"context_lines":[{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"},{"line_number":433,"context_line":"                if pool is None:"},{"line_number":434,"context_line":"                    # Legacy volume, put them into default pool"}],"source_content_type":"text/x-python","patch_set":1,"id":"da86d52c_ea70de09","line":431,"in_reply_to":"da86d52c_72ea3c10","updated":"2015-02-12 08:41:52.000000000","message":"Done","commit_id":"9c15cf9f5e8b79aef7207356f31e0da1517f2f78"},{"author":{"_account_id":12608,"name":"Curt Bruns","email":"curt.e.bruns@intel.com","username":"cebruns"},"change_message_id":"9da54522ab973590022c97d583e5a44a81dea2c6","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                # Flow was reverted, fetching volume_ref from the DB."},{"line_number":427,"context_line":"                vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_c521204e","line":429,"updated":"2015-02-13 02:21:09.000000000","message":"I checked out the patch and ran unit test coverage as there are several try catch blocks here.  Looks good except there isn\u0027t a test when rescheduled is \u0027true\u0027.  Not sure it matters or if you can even unit test that condition with task flow?","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0a1dec9cdb6265e78e6989078a2cd0ed628fdf55","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                # Flow was reverted, fetching volume_ref from the DB."},{"line_number":427,"context_line":"                vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_cf7e91af","line":429,"in_reply_to":"da86d52c_8f3e59b8","updated":"2015-02-13 09:43:51.000000000","message":"Okay, got it. There is no case when two conditions are met:\n1. There were no exception - everything went fine.\n2. Rescheduling occurred.\n\nThis is impossible as rescheduling is done *only* in case of failure. It may indicate that better programming structure for this code exists but I\u0027m unable to find cleaner alternative. If you\u0027re aware of one please propose it. Thanks for paying attention to details, it really helps!","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":11600,"name":"Michał Dulko","email":"michal.dulko@gmail.com","username":"dulek"},"change_message_id":"0da07d358c15ad1d29ccb3b5bb3e9be6b74c33af","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                # Flow was reverted, fetching volume_ref from the DB."},{"line_number":427,"context_line":"                vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_8f3e59b8","line":429,"in_reply_to":"da86d52c_c521204e","updated":"2015-02-13 09:22:46.000000000","message":"Actually test test_create_driver_not_initialized_rescheduling is going this code path - I\u0027ve followed it with ipdb and rescheduled is clearly True there. Second test I\u0027ve added follows this path with rescheduled set to False. A case where there were no exception is covered by older testcases.\n\nDefinitely all cases can be unit tested here so I\u0027m not sure why coverage gave you wrong info (or maybe my debugging is wrong?).","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"},{"author":{"_account_id":12608,"name":"Curt Bruns","email":"curt.e.bruns@intel.com","username":"cebruns"},"change_message_id":"69620defa00283c43a85cdb417ad56681432e67b","unresolved":false,"context_lines":[{"line_number":426,"context_line":"                # Flow was reverted, fetching volume_ref from the DB."},{"line_number":427,"context_line":"                vol_ref \u003d self.db.volume_get(context, volume_id)"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"            if not rescheduled:"},{"line_number":430,"context_line":"                # NOTE(dulek): Volume wasn\u0027t rescheduled so we need to update"},{"line_number":431,"context_line":"                # volume stats as these are decremented on delete."},{"line_number":432,"context_line":"                pool \u003d vol_utils.extract_host(vol_ref[\u0027host\u0027], \u0027pool\u0027)"}],"source_content_type":"text/x-python","patch_set":2,"id":"da86d52c_7766522b","line":429,"in_reply_to":"da86d52c_cf7e91af","updated":"2015-02-13 15:28:09.000000000","message":"Ok, it makes sense that you won\u0027t get rescheduled in a non-error flow.  Thx.","commit_id":"da3eec012eff7e29ddadeb3678f16855f544ddef"}]}
