)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0cae8da93b7dd90e0d97352e790c16804d039ae1","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This commit changes the os-reset_status snapshot-api"},{"line_number":10,"context_line":"to handle the below use case"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1.reset snapshot to the \"ing\" state"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial implement blueprint reset-state-robustification"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":42,"id":"c2a022d9_305c269d","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":35},"updated":"2022-03-08 00:34:16.000000000","message":"You should probably just list the now-disallowed states, because in addition to creating and restoring, you aren\u0027t letting someone reset state to backing_up or deleted.\n\nAlso, don\u0027t forget the boilerplate note:\nhttps://etherpad.opendev.org/p/no-foot-shooting","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"c6d862f91254b326d51a2e7f9ec93f974cf39b25","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This commit changes the os-reset_status snapshot-api"},{"line_number":10,"context_line":"to handle the below use case"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1.reset snapshot to the \"ing\" state"},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Partial implement blueprint reset-state-robustification"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":42,"id":"922e80b9_4843ef08","line":12,"range":{"start_line":12,"start_character":0,"end_line":12,"end_character":35},"in_reply_to":"c2a022d9_305c269d","updated":"2022-03-08 08:42:04.000000000","message":"Done","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":9,"context_line":"This commit changes the os-reset_status snapshot-api"},{"line_number":10,"context_line":"to handle the below use case"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"1.reset snapshot to the \u0027restoring\u0027 or \u0027backing-up\u0027"},{"line_number":13,"context_line":"or \u0027creating\u0027 or \u0027deleted\u0027 status is now disallowed"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"NOTE: with this change, some requests that previously succeeded will"},{"line_number":16,"context_line":"return a 400.  However, these were requests that would leave a resource"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":51,"id":"6e3fe9b7_8ef62248","line":13,"range":{"start_line":12,"start_character":24,"end_line":13,"end_character":51},"updated":"2022-11-02 07:14:38.000000000","message":"I\u0027m not 100% sure if these are the states we want to block, will leave it to other reviewers to comment.","commit_id":"693582e5fe9a74696523b6881d1501e070481431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":16,"context_line":"return a 400.  However, these were requests that would leave a resource"},{"line_number":17,"context_line":"in an inconsistent state with an inaccurate status, so a 400 is"},{"line_number":18,"context_line":"appropriate.  We use a 400 (not 409) to be consistent with the current"},{"line_number":19,"context_line":"Block Storage API. This change is not microversioned because it doesn\u0027t"},{"line_number":20,"context_line":"make sense to only prevent operators from shooting themselves in the"},{"line_number":21,"context_line":"foot if they happen to specify an appropriate microversion,"},{"line_number":22,"context_line":"and be grievously wounded otherwise."},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"Partial implement blueprint reset-state-robustification"},{"line_number":25,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":51,"id":"f202ef42_ea7ee49f","line":22,"range":{"start_line":19,"start_character":19,"end_line":22,"end_character":36},"updated":"2022-11-02 07:14:38.000000000","message":"We are failing requests that would pass in previous releases, I would like to have more reasoning as to why this doesn\u0027t require a microversion change since we\u0027re changing the API behavior.","commit_id":"693582e5fe9a74696523b6881d1501e070481431"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"b78fddfe54201efbee28cbe604048eaeb68adbe3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"3d188520_457bc179","updated":"2021-11-22 09:50:03.000000000","message":"recheck","commit_id":"f568b18b31923d21e3269d06ebeb0fc7aad100b4"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"1e374f57d3f9165daec08d6e197f0a33038d357b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"e320e164_0dae7f9c","updated":"2021-10-29 08:10:17.000000000","message":"recheck","commit_id":"f568b18b31923d21e3269d06ebeb0fc7aad100b4"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"1b8732a578a268d1b7945100dce56f4c7850b4ee","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":27,"id":"aaf48644_9526ec40","updated":"2022-01-27 16:41:08.000000000","message":"I am fixing the tempest tests in https://review.opendev.org/c/openstack/tempest/+/825702/4\n\nPlease get one +2 on this change and then we can merge the tempest fix to pass the gate here.","commit_id":"2062fd353b635050deb6261683cfbe759d760e4f"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"1a1707297f60cedd4076a2c51124fe3021b4b697","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"20b6d075_2ce402a9","updated":"2022-01-28 14:31:38.000000000","message":"Brian rosmaita order to pass the zuul test we need merge the tempest patch push by gmann https://review.opendev.org/c/openstack/tempest/+/825702/4 i need one +2 on this one to do it","commit_id":"dea5638fa2ad8ba0ff9a8eabeb4f7d7096f61779"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d0147e025a5ad6ffbfb84309215c470834263c9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"6dcdbf97_d15b06d6","updated":"2022-01-28 08:15:03.000000000","message":"One suggestion inline to reduce the lines of code!","commit_id":"dea5638fa2ad8ba0ff9a8eabeb4f7d7096f61779"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"0986e2016fbb31be5ac25ebd9ae9d306e9545372","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"e264a84b_9904e478","updated":"2022-02-02 16:07:41.000000000","message":"ping","commit_id":"dea5638fa2ad8ba0ff9a8eabeb4f7d7096f61779"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"323aa88abe6500b3e0270301c67db988b234bbad","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"39cbcd32_d982d1ea","updated":"2022-02-08 13:46:21.000000000","message":"I think it makes sense to handle this case.","commit_id":"2d360592ea17c60deb27f6274ec552b109df92b4"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"56844ecfee82117f73b1610607d09c35646bdd27","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":29,"id":"d22e333f_b6fb644a","updated":"2022-02-08 13:42:39.000000000","message":"recheck","commit_id":"2d360592ea17c60deb27f6274ec552b109df92b4"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"1f7e4178a6c5537abb8d3c0dbd99bee020e3f9c6","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":40,"id":"c683d271_e603499e","updated":"2022-02-24 03:50:35.000000000","message":"recheck","commit_id":"c584000d0ac91eb79c8cdff2a5cc733288764ccc"},{"author":{"_account_id":7198,"name":"Jay Bryant","email":"jungleboyj@electronicjungle.net","username":"jsbryant"},"change_message_id":"81e0a67ad31197926ec254eb6a3ce6765b1a9c49","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":41,"id":"22d463cf_01549f5b","updated":"2022-03-07 16:01:00.000000000","message":"Looks ok to me but should get other eye on it.","commit_id":"781cd9a372d06f5fead38df6b1211f5bd21b5a50"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"dbe2e77b3fdf664df5d4a034a172df75ba588203","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":41,"id":"7881558a_f35fd000","updated":"2022-03-02 03:09:54.000000000","message":"recheck","commit_id":"781cd9a372d06f5fead38df6b1211f5bd21b5a50"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0cae8da93b7dd90e0d97352e790c16804d039ae1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":42,"id":"e25ccc57_1c8f760f","updated":"2022-03-08 00:34:16.000000000","message":"See comments inline.","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"96c40a74b103eb6ea45e2fe57728e9e2a208eb45","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":43,"id":"2cb4556a_c8080318","updated":"2022-03-10 03:11:24.000000000","message":"Question about the states you\u0027re rejecting, plus a suggestion for restructuring the unit tests.","commit_id":"d004034dd7dfbeb9aa5eda40c121980679a64454"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"986a594ae9fd4a3f1c8ae8a891abe548284f5a7f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":45,"id":"6c66d996_79b98331","updated":"2022-05-12 11:00:26.000000000","message":"recheck","commit_id":"aa0c894a449d9c47f4ddf871b4a3ea4d026ba80e"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"6e3d5b87a25c61e1a2e17d93ae294f22c54d2638","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":48,"id":"5151388f_2bf72c23","updated":"2022-09-06 14:36:58.000000000","message":"Thank you Tushar, please, see comment.","commit_id":"7402bdf1efae95c0691b41ca9901875d4cc61697"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"850ad7901a429564ddf46d99802cf4d3759974bc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":48,"id":"c5fc9197_2b5f6c73","updated":"2022-09-01 10:35:14.000000000","message":"hi core reviewers could you help me to merge this patch.","commit_id":"7402bdf1efae95c0691b41ca9901875d4cc61697"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":51,"id":"6874b751_d05611ff","updated":"2022-11-02 07:14:38.000000000","message":"Even if we don\u0027t plan on adding a new microversion for this, a releasenote would be useful since we\u0027re changing API behavior here that operators should be aware about.\nOne releasenote should suffice to mention all reset state changes and we can modify that releasenote in different patches.","commit_id":"693582e5fe9a74696523b6881d1501e070481431"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"d34fcbdee2e70c4b570e7479d023f100327c4257","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":51,"id":"22766027_b7b2e3d9","updated":"2022-11-02 10:51:23.000000000","message":"THanks rajat for review will do rework on this\n","commit_id":"693582e5fe9a74696523b6881d1501e070481431"}],"cinder/api/contrib/admin_actions.py":[{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"9436f62a12924fb92323a8523e77c5a29e42040f","unresolved":true,"context_lines":[{"line_number":333,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":334,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":335,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":336,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d current_snapshot.get(\u0027status\u0027):"},{"line_number":337,"context_line":"            msg \u003d _(\"Cannot reset-state to same state\")"},{"line_number":338,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027backing-up\u0027:"},{"line_number":340,"context_line":"            msg \u003d _(\"Cannot reset-state to backing-up\")"},{"line_number":341,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":26,"id":"0ab0ea03_ca168c91","line":338,"range":{"start_line":336,"start_character":0,"end_line":338,"end_character":59},"updated":"2022-01-27 16:39:49.000000000","message":"this needs to be raise error right? why you removed it","commit_id":"1dbf76c747ff46124165bb5ddaa3ec6b32528c8a"},{"author":{"_account_id":8556,"name":"Ghanshyam Maan","display_name":"Ghanshyam Maan","email":"gmaan.os14@gmail.com","username":"ghanshyam"},"change_message_id":"ece3b5c8d3024fac7e66cae2a94f887bc7456e5d","unresolved":true,"context_lines":[{"line_number":333,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":334,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":335,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":336,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d current_snapshot.get(\u0027status\u0027):"},{"line_number":337,"context_line":"            msg \u003d _(\"Cannot reset-state to same state\")"},{"line_number":338,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027backing-up\u0027:"},{"line_number":340,"context_line":"            msg \u003d _(\"Cannot reset-state to backing-up\")"},{"line_number":341,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":26,"id":"aa0dc355_03f5bf3b","line":338,"range":{"start_line":336,"start_character":0,"end_line":338,"end_character":59},"in_reply_to":"0ab0ea03_ca168c91","updated":"2022-01-28 16:12:56.000000000","message":"thanks, this lgtm","commit_id":"1dbf76c747ff46124165bb5ddaa3ec6b32528c8a"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"6557cefb2de2fba8b067093a3981f91e55b06895","unresolved":false,"context_lines":[{"line_number":333,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":334,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":335,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":336,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d current_snapshot.get(\u0027status\u0027):"},{"line_number":337,"context_line":"            msg \u003d _(\"Cannot reset-state to same state\")"},{"line_number":338,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027backing-up\u0027:"},{"line_number":340,"context_line":"            msg \u003d _(\"Cannot reset-state to backing-up\")"},{"line_number":341,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":26,"id":"461ec972_bcada19e","line":338,"range":{"start_line":336,"start_character":0,"end_line":338,"end_character":59},"in_reply_to":"aa0dc355_03f5bf3b","updated":"2022-02-24 06:31:55.000000000","message":"Done","commit_id":"1dbf76c747ff46124165bb5ddaa3ec6b32528c8a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d0147e025a5ad6ffbfb84309215c470834263c9","unresolved":true,"context_lines":[{"line_number":336,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d current_snapshot.get(\u0027status\u0027):"},{"line_number":337,"context_line":"            msg \u003d _(\"Cannot reset-state to same state\")"},{"line_number":338,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027backing-up\u0027:"},{"line_number":340,"context_line":"            msg \u003d _(\"Cannot reset-state to backing-up\")"},{"line_number":341,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":342,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027deleted\u0027:"},{"line_number":343,"context_line":"            msg \u003d _(\"Cannot reset-state to deleted\")"},{"line_number":344,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":345,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027error_deleting\u0027:"},{"line_number":346,"context_line":"            msg \u003d _(\"Cannot reset-state to error_deleting\")"},{"line_number":347,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        self._update(context, id, update)"},{"line_number":350,"context_line":"        self._remove_worker(context, id)"}],"source_content_type":"text/x-python","patch_set":28,"id":"603418b7_70d93e07","line":347,"range":{"start_line":339,"start_character":8,"end_line":347,"end_character":59},"updated":"2022-01-28 08:15:03.000000000","message":"you can do it in one condition\n\nif update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027deleted\u0027, \u0027error_deleting\u0027):\n    msg \u003d _(\"Cannot reset-state to %s\" % update.get(\u0027status\u0027))\n    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)","commit_id":"dea5638fa2ad8ba0ff9a8eabeb4f7d7096f61779"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"6557cefb2de2fba8b067093a3981f91e55b06895","unresolved":false,"context_lines":[{"line_number":336,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d current_snapshot.get(\u0027status\u0027):"},{"line_number":337,"context_line":"            msg \u003d _(\"Cannot reset-state to same state\")"},{"line_number":338,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":339,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027backing-up\u0027:"},{"line_number":340,"context_line":"            msg \u003d _(\"Cannot reset-state to backing-up\")"},{"line_number":341,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":342,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027deleted\u0027:"},{"line_number":343,"context_line":"            msg \u003d _(\"Cannot reset-state to deleted\")"},{"line_number":344,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":345,"context_line":"        if update.get(\u0027status\u0027) \u003d\u003d \u0027error_deleting\u0027:"},{"line_number":346,"context_line":"            msg \u003d _(\"Cannot reset-state to error_deleting\")"},{"line_number":347,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        self._update(context, id, update)"},{"line_number":350,"context_line":"        self._remove_worker(context, id)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7da1cda2_62577e99","line":347,"range":{"start_line":339,"start_character":8,"end_line":347,"end_character":59},"in_reply_to":"603418b7_70d93e07","updated":"2022-02-24 06:31:55.000000000","message":"Done","commit_id":"dea5638fa2ad8ba0ff9a8eabeb4f7d7096f61779"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0cae8da93b7dd90e0d97352e790c16804d039ae1","unresolved":true,"context_lines":[{"line_number":306,"context_line":"        snapshot_id \u003d args[1]"},{"line_number":307,"context_line":"        fields \u003d args[2]"},{"line_number":308,"context_line":"        snapshot \u003d objects.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":309,"context_line":"        self.authorize(context, \u0027reset_status\u0027, target_obj\u003dsnapshot)"},{"line_number":310,"context_line":"        snapshot.update(fields)"},{"line_number":311,"context_line":"        snapshot.save()"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"9e0a5759_97207138","line":309,"range":{"start_line":309,"start_character":0,"end_line":309,"end_character":68},"updated":"2022-03-08 00:34:16.000000000","message":"Don\u0027t need to do this any more, you\u0027re doing it at line 334 before you call this function.  Also, you already have the snapshot object from line 333, you could pass it in to this function so you don\u0027t need to re-get it at line 308.","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"c6d862f91254b326d51a2e7f9ec93f974cf39b25","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        snapshot_id \u003d args[1]"},{"line_number":307,"context_line":"        fields \u003d args[2]"},{"line_number":308,"context_line":"        snapshot \u003d objects.Snapshot.get_by_id(context, snapshot_id)"},{"line_number":309,"context_line":"        self.authorize(context, \u0027reset_status\u0027, target_obj\u003dsnapshot)"},{"line_number":310,"context_line":"        snapshot.update(fields)"},{"line_number":311,"context_line":"        snapshot.save()"},{"line_number":312,"context_line":""}],"source_content_type":"text/x-python","patch_set":42,"id":"9de88ea7_3c9a9294","line":309,"range":{"start_line":309,"start_character":0,"end_line":309,"end_character":68},"in_reply_to":"9e0a5759_97207138","updated":"2022-03-08 08:42:04.000000000","message":"Done","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"0cae8da93b7dd90e0d97352e790c16804d039ae1","unresolved":true,"context_lines":[{"line_number":327,"context_line":"        LOG.debug(msg, {\u0027resource\u0027: self.resource_name, \u0027id\u0027: id,"},{"line_number":328,"context_line":"                        \u0027update\u0027: update})"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        self._notify_reset_status(context, id, \u0027reset_status.start\u0027)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":333,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"}],"source_content_type":"text/x-python","patch_set":42,"id":"3ec46354_7d9f3498","line":330,"updated":"2022-03-08 00:34:16.000000000","message":"I think you should move this to after line 340, because there\u0027s no sense sending the start notification until *after* we know we won\u0027t get a 404 or a 403, or aren\u0027t passing a bad status.","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"c6d862f91254b326d51a2e7f9ec93f974cf39b25","unresolved":false,"context_lines":[{"line_number":327,"context_line":"        LOG.debug(msg, {\u0027resource\u0027: self.resource_name, \u0027id\u0027: id,"},{"line_number":328,"context_line":"                        \u0027update\u0027: update})"},{"line_number":329,"context_line":""},{"line_number":330,"context_line":"        self._notify_reset_status(context, id, \u0027reset_status.start\u0027)"},{"line_number":331,"context_line":""},{"line_number":332,"context_line":"        # Not found exception will be handled at the wsgi level"},{"line_number":333,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"}],"source_content_type":"text/x-python","patch_set":42,"id":"8e2e3492_25721a51","line":330,"in_reply_to":"3ec46354_7d9f3498","updated":"2022-03-08 08:42:04.000000000","message":"Done","commit_id":"9c2ce30d93ba7b7fc97dae57de866ee0791c69bf"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"96c40a74b103eb6ea45e2fe57728e9e2a208eb45","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":331,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":332,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":333,"context_line":"        if update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027restoring\u0027):"},{"line_number":334,"context_line":"            msg \u003d _(\"Cannot reset-state to %s\""},{"line_number":335,"context_line":"                    % update.get(\u0027status\u0027))"},{"line_number":336,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":43,"id":"44a53022_a0237375","line":333,"range":{"start_line":333,"start_character":36,"end_line":333,"end_character":61},"updated":"2022-03-10 03:11:24.000000000","message":"The set of states you\u0027re checking for seems to change from patch to patch.  For example, on PS 42 you were also prohibiting reset to \u0027creating\u0027 and \u0027deleted\u0027.  Why the change?","commit_id":"d004034dd7dfbeb9aa5eda40c121980679a64454"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"c0b7c9888a98b328a015725667090fe243dff93b","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":331,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":332,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":333,"context_line":"        if update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027restoring\u0027):"},{"line_number":334,"context_line":"            msg \u003d _(\"Cannot reset-state to %s\""},{"line_number":335,"context_line":"                    % update.get(\u0027status\u0027))"},{"line_number":336,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":43,"id":"101e1bb8_b407dbaa","line":333,"range":{"start_line":333,"start_character":36,"end_line":333,"end_character":61},"in_reply_to":"44a53022_a0237375","updated":"2022-03-10 08:21:08.000000000","message":"Done","commit_id":"d004034dd7dfbeb9aa5eda40c121980679a64454"},{"author":{"_account_id":31721,"name":"Felipe Rodrigues","email":"felipefuty01@gmail.com","username":"felipefutty"},"change_message_id":"6e3d5b87a25c61e1a2e17d93ae294f22c54d2638","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":331,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":332,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":333,"context_line":"        if update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027creating\u0027"},{"line_number":334,"context_line":"                                    \u0027deleted\u0027, \u0027restoring\u0027):"},{"line_number":335,"context_line":"            msg \u003d _(\"Cannot reset-state to %s\""},{"line_number":336,"context_line":"                    % update.get(\u0027status\u0027))"},{"line_number":337,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":48,"id":"3a6a653d_a3d180b3","line":334,"range":{"start_line":333,"start_character":36,"end_line":334,"end_character":57},"updated":"2022-09-06 14:36:58.000000000","message":"Should you use the fields.SnapshotStatus() instead of hard coding the strings here ?","commit_id":"7402bdf1efae95c0691b41ca9901875d4cc61697"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"e1f694475624c32b4b5a5b9a4c0567ce315c80c7","unresolved":true,"context_lines":[{"line_number":330,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":331,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":332,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":333,"context_line":"        if update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027creating\u0027"},{"line_number":334,"context_line":"                                    \u0027deleted\u0027, \u0027restoring\u0027):"},{"line_number":335,"context_line":"            msg \u003d _(\"Cannot reset-state to %s\""},{"line_number":336,"context_line":"                    % update.get(\u0027status\u0027))"},{"line_number":337,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":48,"id":"b6a2b37d_48be85b9","line":334,"range":{"start_line":333,"start_character":36,"end_line":334,"end_character":57},"in_reply_to":"3a6a653d_a3d180b3","updated":"2022-09-07 09:35:56.000000000","message":"No this four are only invalid state in all status which which you can request in reset state command","commit_id":"7402bdf1efae95c0691b41ca9901875d4cc61697"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"9b5298c7083fc03b92584d67b200059ba9add878","unresolved":false,"context_lines":[{"line_number":330,"context_line":"        current_snapshot \u003d objects.Snapshot.get_by_id(context, id)"},{"line_number":331,"context_line":"        context.authorize(policy.RESET_STATUS_POLICY,"},{"line_number":332,"context_line":"                          target_obj\u003dcurrent_snapshot)"},{"line_number":333,"context_line":"        if update.get(\u0027status\u0027) in (\u0027backing-up\u0027, \u0027creating\u0027"},{"line_number":334,"context_line":"                                    \u0027deleted\u0027, \u0027restoring\u0027):"},{"line_number":335,"context_line":"            msg \u003d _(\"Cannot reset-state to %s\""},{"line_number":336,"context_line":"                    % update.get(\u0027status\u0027))"},{"line_number":337,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":48,"id":"6a21650c_45f89dce","line":334,"range":{"start_line":333,"start_character":36,"end_line":334,"end_character":57},"in_reply_to":"b6a2b37d_48be85b9","updated":"2022-09-07 09:36:16.000000000","message":"Done","commit_id":"7402bdf1efae95c0691b41ca9901875d4cc61697"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":315,"context_line":"    def _delete(self, *args, **kwargs):"},{"line_number":316,"context_line":"        return self.volume_api.delete_snapshot(*args, **kwargs)"},{"line_number":317,"context_line":""},{"line_number":318,"context_line":"    @wsgi.response(HTTPStatus.ACCEPTED)"},{"line_number":319,"context_line":"    @wsgi.action(\u0027os-reset_status\u0027)"},{"line_number":320,"context_line":"    def _reset_status(self, req, id, body):"},{"line_number":321,"context_line":"        \"\"\"Reset status on the resource.\"\"\""}],"source_content_type":"text/x-python","patch_set":51,"id":"872b3dc8_6b74ef78","line":318,"range":{"start_line":318,"start_character":30,"end_line":318,"end_character":38},"updated":"2022-11-02 07:14:38.000000000","message":"I\u0027m not sure if this is correct, we are mostly dealing with the API-DB layer and this shouldn\u0027t be an async operation. maybe HTTPStatus.OK should be good here?","commit_id":"693582e5fe9a74696523b6881d1501e070481431"}],"cinder/tests/unit/api/contrib/test_admin_actions.py":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"96c40a74b103eb6ea45e2fe57728e9e2a208eb45","unresolved":true,"context_lines":[{"line_number":624,"context_line":"        resp \u003d self._issue_snapshot_reset(self.ctx, snapshot, updated_status)"},{"line_number":625,"context_line":"        self.assertEqual(HTTPStatus.BAD_REQUEST, resp.status_int)"},{"line_number":626,"context_line":"        self.assertEqual(fields.SnapshotStatus.BACKING_UP, snapshot.status)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    @ddt.data({\u0027os-reset_status\u0027: {}})"},{"line_number":629,"context_line":"    def test_snapshot_reset_status_with_invalid_body(self, body):"},{"line_number":630,"context_line":"        volume \u003d db.volume_create(self.ctx,"}],"source_content_type":"text/x-python","patch_set":43,"id":"6eedb92a_3f197832","line":627,"updated":"2022-03-10 03:11:24.000000000","message":"I think you should restructure these tests, but we can see what other reviewers think.  What I have in mind is that you can change the name of the first test to \u0027test_negative_reset_snapshot_to_restoring\u0027, and instead of using ddt to change the update, keep the update constant at {\u0027status\u0027: restoring\u0027} and let ddt range over fields.SnapshotStatus.ALL to give you the status of the the snapshot object you create.  (I think you\u0027ll need to unpack the ALL in the ddt.data declaration (that is, \u0027@ddt.data(*fields.SnapshotStatus.ALL)\u0027.)  Same thing for the second test.","commit_id":"d004034dd7dfbeb9aa5eda40c121980679a64454"},{"author":{"_account_id":30615,"name":"Tushar Trambak Gite","email":"tushargite96@gmail.com","username":"tushargite96"},"change_message_id":"c0b7c9888a98b328a015725667090fe243dff93b","unresolved":false,"context_lines":[{"line_number":624,"context_line":"        resp \u003d self._issue_snapshot_reset(self.ctx, snapshot, updated_status)"},{"line_number":625,"context_line":"        self.assertEqual(HTTPStatus.BAD_REQUEST, resp.status_int)"},{"line_number":626,"context_line":"        self.assertEqual(fields.SnapshotStatus.BACKING_UP, snapshot.status)"},{"line_number":627,"context_line":""},{"line_number":628,"context_line":"    @ddt.data({\u0027os-reset_status\u0027: {}})"},{"line_number":629,"context_line":"    def test_snapshot_reset_status_with_invalid_body(self, body):"},{"line_number":630,"context_line":"        volume \u003d db.volume_create(self.ctx,"}],"source_content_type":"text/x-python","patch_set":43,"id":"c75de503_6c4ff820","line":627,"in_reply_to":"6eedb92a_3f197832","updated":"2022-03-10 08:21:08.000000000","message":"Done","commit_id":"d004034dd7dfbeb9aa5eda40c121980679a64454"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":546,"context_line":"        self.assertEqual(fields.VolumeAttachStatus.DETACHED,"},{"line_number":547,"context_line":"                         volume[\u0027attach_status\u0027])"},{"line_number":548,"context_line":""},{"line_number":549,"context_line":"    def test_snapshot_reset_status(self):"},{"line_number":550,"context_line":"        volume \u003d db.volume_create(self.ctx,"},{"line_number":551,"context_line":"                                  {\u0027status\u0027: \u0027available\u0027, \u0027host\u0027: \u0027test\u0027,"},{"line_number":552,"context_line":"                                   \u0027provider_location\u0027: \u0027\u0027, \u0027size\u0027: 1,"}],"source_content_type":"text/x-python","patch_set":51,"id":"c37adac5_b3ae526c","line":549,"updated":"2022-11-02 07:14:38.000000000","message":"Adding the decorator to test reset from all snapshots status to error here would be good\n\n@ddt.data(*fields.SnapshotStatus.ALL)","commit_id":"693582e5fe9a74696523b6881d1501e070481431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":596,"context_line":"    @ddt.data(*fields.SnapshotStatus.ALL)"},{"line_number":597,"context_line":"    def test_negative_reset_snapshot_to_restoring(self, updated_status):"},{"line_number":598,"context_line":"        volume \u003d db.volume_create(self.ctx,"},{"line_number":599,"context_line":"                                  {\u0027status\u0027: \u0027restoring\u0027, \u0027host\u0027: \u0027test\u0027,"},{"line_number":600,"context_line":"                                   \u0027provider_location\u0027: \u0027\u0027, \u0027size\u0027: 1,"},{"line_number":601,"context_line":"                                   \u0027volume_type_id\u0027: fake.VOLUME_TYPE_ID})"},{"line_number":602,"context_line":"        snapshot \u003d objects.Snapshot(self.ctx,"}],"source_content_type":"text/x-python","patch_set":51,"id":"b9b28c84_be9a235f","line":599,"range":{"start_line":599,"start_character":46,"end_line":599,"end_character":55},"updated":"2022-11-02 07:14:38.000000000","message":"do we really need the volume status same as the snapshot status? but it doesn\u0027t matter much to what we\u0027re testing here.","commit_id":"693582e5fe9a74696523b6881d1501e070481431"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"fdf87b9cf337116d79ce3e7bcb57ad3ed76bfdf0","unresolved":true,"context_lines":[{"line_number":654,"context_line":"        resp \u003d self._issue_snapshot_reset(self.ctx, snapshot, updated_status)"},{"line_number":655,"context_line":"        self.assertEqual(HTTPStatus.BAD_REQUEST, resp.status_int)"},{"line_number":656,"context_line":"        self.assertEqual(fields.SnapshotStatus.DELETED, snapshot.status)"},{"line_number":657,"context_line":""},{"line_number":658,"context_line":"    @ddt.data({\u0027os-reset_status\u0027: {}})"},{"line_number":659,"context_line":"    def test_snapshot_reset_status_with_invalid_body(self, body):"},{"line_number":660,"context_line":"        volume \u003d db.volume_create(self.ctx,"}],"source_content_type":"text/x-python","patch_set":51,"id":"60c3b156_1aa1def7","line":657,"updated":"2022-11-02 07:14:38.000000000","message":"I think we lack coverage of reset state and this is a good opportunity to add it rather than just only focusing on the negative cases.\nEven the tests to reset from any state to available or error is worth adding the tests for. We already have a test for available to error state (however, it would be good to have a DDT having other snapshot states to test with resetting to error).\nAnother test with fields.SnapshotStatus.ALL to \u0027available\u0027 would be good here.","commit_id":"693582e5fe9a74696523b6881d1501e070481431"}]}
