)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74413da6ccc2e98e94a57b5aa9ffcd303a409cb7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"ac023dad_6c47b6b3","updated":"2024-11-21 23:57:01.000000000","message":"Thanks for looking at my ninja patch 😂","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"}],"nova/conductor/tasks/migrate.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"51b19b12c1e3469a9156d4cc08d299676a2e8fac","unresolved":true,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":"from oslo_serialization import jsonutils"},{"line_number":15,"context_line":"import retrying"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova import availability_zones"},{"line_number":18,"context_line":"from nova.compute import utils as compute_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"1e273f9f_3d986db4","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":2},"updated":"2024-11-21 23:48:49.000000000","message":"nit this is a third party lib so it shoul be in its own group\nnot mixed with the other openstack services\n\ni alos try not to mix import and form import but thats less imporant.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74413da6ccc2e98e94a57b5aa9ffcd303a409cb7","unresolved":true,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":"from oslo_serialization import jsonutils"},{"line_number":15,"context_line":"import retrying"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova import availability_zones"},{"line_number":18,"context_line":"from nova.compute import utils as compute_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"b543e68a_f0020d3c","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":2},"in_reply_to":"1e273f9f_3d986db4","updated":"2024-11-21 23:57:01.000000000","message":"oslo libraries are treated as third party also. At least in my experience.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"13f022bc9e599e8df6cea1ac74271bb0f93a2a12","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":"from oslo_serialization import jsonutils"},{"line_number":15,"context_line":"import retrying"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova import availability_zones"},{"line_number":18,"context_line":"from nova.compute import utils as compute_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"1fadcc03_d5149133","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":2},"in_reply_to":"3b56afae_394eeace","updated":"2024-11-22 00:30:07.000000000","message":"Ah ok. I\u0027m basic.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e62a8f3c0a7ffca92916369ac6330d0f3ff5c2ea","unresolved":false,"context_lines":[{"line_number":12,"context_line":""},{"line_number":13,"context_line":"from oslo_log import log as logging"},{"line_number":14,"context_line":"from oslo_serialization import jsonutils"},{"line_number":15,"context_line":"import retrying"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from nova import availability_zones"},{"line_number":18,"context_line":"from nova.compute import utils as compute_utils"}],"source_content_type":"text/x-python","patch_set":1,"id":"3b56afae_394eeace","line":15,"range":{"start_line":15,"start_character":0,"end_line":15,"end_character":2},"in_reply_to":"b543e68a_f0020d3c","updated":"2024-11-22 00:14:59.000000000","message":"i end to break things up more then most.\n\ni create 4 or 8 groups dependign on how you look at it\nfor each group i tend to split import and form import\n\nso i alwasy do\n\n```\nimport stdlib\n\nfrom stdlib import\n\nimport thirdpaty \n\nfrom thirdparty\n\nimport other_openstack\n\nfrom other_openstack\n\nimport current_project\n\nfrom current_project\n```\n\nhacking allow some level of variation here\n\nas long as we are mostly consitent i dont mind\n\nif we could endorce this automaticly with tooling i would but we cant.\n\ni find it very hard to reason abotu how hackign matches when you mix imports and from imports so i just dont do that any more.\n\nif the pep8 env is happy then its fine","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"51b19b12c1e3469a9156d4cc08d299676a2e8fac","unresolved":true,"context_lines":[{"line_number":351,"context_line":"    # schedule attempt here in this case."},{"line_number":352,"context_line":"    @retrying.retry(stop_max_attempt_number\u003d4,"},{"line_number":353,"context_line":"                    retry_on_exception\u003dlambda e: isinstance("},{"line_number":354,"context_line":"                        e, exception.AllocationUpdateFailed))"},{"line_number":355,"context_line":"    def _schedule(self):"},{"line_number":356,"context_line":"        selection_lists \u003d self.query_client.select_destinations("},{"line_number":357,"context_line":"            self.context, self.request_spec, [self.instance.uuid],"}],"source_content_type":"text/x-python","patch_set":1,"id":"1b2cc694_527926c3","line":354,"updated":"2024-11-21 23:48:49.000000000","message":"i guess using an inline lambda is fine rather than creating a predicate function.\n\nits perhaps slightly harder to test but not significantly.\n\nrather then unit testing this it proably makes more sence to test this with a functional test anyway.\n\nwith that said it usually possibel to reach in and unwrap decorated fucntions and mock out  schdule ectra.\n\nit just makes it harder to reppace the lamda with a mock but we proably can avoid that anyway.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"74413da6ccc2e98e94a57b5aa9ffcd303a409cb7","unresolved":true,"context_lines":[{"line_number":351,"context_line":"    # schedule attempt here in this case."},{"line_number":352,"context_line":"    @retrying.retry(stop_max_attempt_number\u003d4,"},{"line_number":353,"context_line":"                    retry_on_exception\u003dlambda e: isinstance("},{"line_number":354,"context_line":"                        e, exception.AllocationUpdateFailed))"},{"line_number":355,"context_line":"    def _schedule(self):"},{"line_number":356,"context_line":"        selection_lists \u003d self.query_client.select_destinations("},{"line_number":357,"context_line":"            self.context, self.request_spec, [self.instance.uuid],"}],"source_content_type":"text/x-python","patch_set":1,"id":"244dcb64_a59a2ad5","line":354,"in_reply_to":"1b2cc694_527926c3","updated":"2024-11-21 23:57:01.000000000","message":"I copied this pattern from the scheduler report client [1] for example:\n\n```\n    @retrying.retry(stop_max_attempt_number\u003d4,\n                    retry_on_exception\u003dlambda e: isinstance(\n                        e, exception.ResourceProviderUpdateConflict))\n    def aggregate_add_host(self, context, agg_uuid, host_name\u003dNone,\n                           rp_uuid\u003dNone):\n```\n\n[1] https://github.com/openstack/nova/blob/9a1872d30e98aa5b10afd6c1c42f29904f7ed6cb/nova/scheduler/client/report.py#L2441-L2444","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"cc529d8afc118dfbc3582c951ac7a881445bb97b","unresolved":true,"context_lines":[{"line_number":351,"context_line":"    # schedule attempt here in this case."},{"line_number":352,"context_line":"    @retrying.retry(stop_max_attempt_number\u003d4,"},{"line_number":353,"context_line":"                    retry_on_exception\u003dlambda e: isinstance("},{"line_number":354,"context_line":"                        e, exception.AllocationUpdateFailed))"},{"line_number":355,"context_line":"    def _schedule(self):"},{"line_number":356,"context_line":"        selection_lists \u003d self.query_client.select_destinations("},{"line_number":357,"context_line":"            self.context, self.request_spec, [self.instance.uuid],"}],"source_content_type":"text/x-python","patch_set":1,"id":"f006d7d0_9ca451ea","line":354,"in_reply_to":"244dcb64_a59a2ad5","updated":"2024-11-21 23:59:22.000000000","message":"Also the test I have in this patch is a functional test, not a unit test. It fails without the fix and passes with it.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"e62a8f3c0a7ffca92916369ac6330d0f3ff5c2ea","unresolved":false,"context_lines":[{"line_number":351,"context_line":"    # schedule attempt here in this case."},{"line_number":352,"context_line":"    @retrying.retry(stop_max_attempt_number\u003d4,"},{"line_number":353,"context_line":"                    retry_on_exception\u003dlambda e: isinstance("},{"line_number":354,"context_line":"                        e, exception.AllocationUpdateFailed))"},{"line_number":355,"context_line":"    def _schedule(self):"},{"line_number":356,"context_line":"        selection_lists \u003d self.query_client.select_destinations("},{"line_number":357,"context_line":"            self.context, self.request_spec, [self.instance.uuid],"}],"source_content_type":"text/x-python","patch_set":1,"id":"f9050221_9c05283f","line":354,"in_reply_to":"f006d7d0_9ca451ea","updated":"2024-11-22 00:14:59.000000000","message":"yep using the inline lambda is fine\n\ni was makeign the poitn that testing decorators like this in unit tests is annorying regardless of the lambda or not but much simpler to test in functional tests so no need to change this.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"13f022bc9e599e8df6cea1ac74271bb0f93a2a12","unresolved":false,"context_lines":[{"line_number":351,"context_line":"    # schedule attempt here in this case."},{"line_number":352,"context_line":"    @retrying.retry(stop_max_attempt_number\u003d4,"},{"line_number":353,"context_line":"                    retry_on_exception\u003dlambda e: isinstance("},{"line_number":354,"context_line":"                        e, exception.AllocationUpdateFailed))"},{"line_number":355,"context_line":"    def _schedule(self):"},{"line_number":356,"context_line":"        selection_lists \u003d self.query_client.select_destinations("},{"line_number":357,"context_line":"            self.context, self.request_spec, [self.instance.uuid],"}],"source_content_type":"text/x-python","patch_set":1,"id":"64f434fb_0198d02d","line":354,"in_reply_to":"f9050221_9c05283f","updated":"2024-11-22 00:30:07.000000000","message":"Oh, yeah. I wouldn\u0027t even try testing a decorator in a unit test unless I had to for some reason.","commit_id":"9e95c6e2601b7eee77fbe48e0e620037c6a400dc"}]}
