)]}'
{"nova/accelerator/cyborg.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    def _call_cyborg(self, func, *args, **kwargs):"},{"line_number":93,"context_line":"        resp \u003d err_msg \u003d None"},{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            if kwargs.get(\u0027version\u0027):"},{"line_number":96,"context_line":"                version \u003d kwargs.get(\u0027version\u0027)"},{"line_number":97,"context_line":"                kwargs[\u0027headers\u0027] \u003d {"},{"line_number":98,"context_line":"                    \u0027OpenStack-API-Version\u0027: \u0027accelerator %s\u0027 % version"}],"source_content_type":"text/x-python","patch_set":8,"id":"fd4f1c75_597c6276","line":95,"range":{"start_line":95,"start_character":15,"end_line":95,"end_character":21},"updated":"2021-01-05 18:57:19.000000000","message":"Note this for my comment below on L224.","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    def _call_cyborg(self, func, *args, **kwargs):"},{"line_number":93,"context_line":"        resp \u003d err_msg \u003d None"},{"line_number":94,"context_line":"        try:"},{"line_number":95,"context_line":"            if kwargs.get(\u0027version\u0027):"},{"line_number":96,"context_line":"                version \u003d kwargs.get(\u0027version\u0027)"},{"line_number":97,"context_line":"                kwargs[\u0027headers\u0027] \u003d {"},{"line_number":98,"context_line":"                    \u0027OpenStack-API-Version\u0027: \u0027accelerator %s\u0027 % version"},{"line_number":99,"context_line":"                }"},{"line_number":100,"context_line":"            resp \u003d func(*args, **kwargs)"},{"line_number":101,"context_line":"            if not resp:"},{"line_number":102,"context_line":"                msg \u003d _(\u0027Invalid response from Cyborg: \u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"0ef84859_9ee9f12b","line":99,"range":{"start_line":95,"start_character":0,"end_line":99,"end_character":17},"updated":"2021-01-05 18:57:19.000000000","message":"This code isn\u0027t going to raise ClientException, and as such should be outside the try..except. Further, it seems to me like we should probably always be passing a version, defaulting to 1.0 or whatever the existing code all supports. I believe that\u0027s what we do with placement.","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":212,"context_line":"        # Create a JSON patch in RFC 6902 format"},{"line_number":213,"context_line":"        patch_list \u003d {}"},{"line_number":214,"context_line":"        for arq_uuid, binding in bindings.items():"},{"line_number":215,"context_line":"            if binding.get(\u0027project_id\u0027):"},{"line_number":216,"context_line":"                patch_list[\u0027version\u0027] \u003d PROJECT_ID_OF_ARQ_IN_CYBORG"},{"line_number":217,"context_line":"            patch \u003d [{\"path\": \"/\" + field,"},{"line_number":218,"context_line":"                      \"op\": \"add\","}],"source_content_type":"text/x-python","patch_set":8,"id":"2134f587_88c1579b","line":215,"updated":"2021-01-05 18:57:19.000000000","message":"Why are you making this optional? Since this is all nova, we should just update all the callers of this to pass project_id and set the version explicitly. Otherwise, we could have some code in nova that we missed that still passes a binding without a project_id. I assume we never want that and should remove this conditional - is there some reason we can\u0027t?","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":213,"context_line":"        patch_list \u003d {}"},{"line_number":214,"context_line":"        for arq_uuid, binding in bindings.items():"},{"line_number":215,"context_line":"            if binding.get(\u0027project_id\u0027):"},{"line_number":216,"context_line":"                patch_list[\u0027version\u0027] \u003d PROJECT_ID_OF_ARQ_IN_CYBORG"},{"line_number":217,"context_line":"            patch \u003d [{\"path\": \"/\" + field,"},{"line_number":218,"context_line":"                      \"op\": \"add\","},{"line_number":219,"context_line":"                      \"value\": value"}],"source_content_type":"text/x-python","patch_set":8,"id":"66b734e3_8786d5c1","line":216,"range":{"start_line":216,"start_character":16,"end_line":216,"end_character":26},"updated":"2021-01-05 18:57:19.000000000","message":"This is no longer an appropriate name for this variable, now that you\u0027re putting non-patch-related things into it. AFAICT, this ends up with a structure that looks like this:\n\n patch_list \u003d {\u0027$uuid1\u0027: { ... binding ... },\n               \u0027version\u0027: \u00271.2\u0027,\n               \u0027$uuid2\u0027: { ... binding ... }}\n\n...which is confusing and error-prone. However, see below.","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":221,"context_line":"            patch_list[arq_uuid] \u003d patch"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"        resp, err_msg \u003d self._call_cyborg(self._client.patch,"},{"line_number":224,"context_line":"             self.ARQ_URL, json\u003dpatch_list)"},{"line_number":225,"context_line":"        if err_msg:"},{"line_number":226,"context_line":"            arq_uuids \u003d bindings.keys()"},{"line_number":227,"context_line":"            msg \u003d _(\u0027 Binding failed for ARQ UUIDs: \u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"cf0b26d0_eadffe79","line":224,"range":{"start_line":224,"start_character":27,"end_line":224,"end_character":31},"updated":"2021-01-05 18:57:19.000000000","message":"_call_cyborg is looking for a kwarg with version in it, but you\u0027ve put it inside this json\u003d{} dict. I think you want to _not_ stuff version into patch_dict, and instead just pass version\u003d here right?","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"}],"nova/accelerator/versions.py":[{"author":{"_account_id":26458,"name":"Brin Zhang","email":"zhangbailin@inspur.com","username":"zhangbailin"},"change_message_id":"6f54dfc01f5b8b530691c866cdaccdda8e69ad9e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"9f560f44_50891b23","updated":"2020-10-05 06:10:48.000000000","message":"This version control limit to the cyborg microversion, it should be not add here, if we want to use the the v2.1 to support \u0027project_id\u0027 when we request arq, we can just set \"PROJECT_ID_OF_ARQ_IN_CYBORG\u003d2.1\".","commit_id":"3155ae015fb281f0f5c60da1ce258a0c2b379dd5"}],"nova/tests/unit/accelerator/test_cyborg.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"51b475ec855698ad206fb8a2b6f81ecf5ed3bb11","unresolved":true,"context_lines":[{"line_number":270,"context_line":"        mock_cyborg_patch.assert_called_once_with("},{"line_number":271,"context_line":"            self.client.ARQ_URL, json\u003dmock.ANY)"},{"line_number":272,"context_line":"        called_params \u003d mock_cyborg_patch.call_args.kwargs[\u0027json\u0027]"},{"line_number":273,"context_line":"        self.assertEqual(sorted(called_params), sorted(patch_list))"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"    @mock.patch(\u0027nova.accelerator.cyborg._CyborgClient.delete_arqs_by_uuid\u0027)"},{"line_number":276,"context_line":"    @mock.patch(\u0027nova.accelerator.cyborg._CyborgClient._call_cyborg\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"f5c6d82c_68820c80","line":273,"updated":"2021-01-05 18:57:19.000000000","message":"You\u0027re asserting that the version is _in_ the patch_list, not the headers, which isn\u0027t what you want. It\u0027s what the code does, which is wrong, but this results in the version not being communicated to cyborg, which defeats the point (and really should be raising some schema violation on the cyborg side).","commit_id":"58b51edd4979b0844252da0005fdd5f8becf7f7b"}],"nova/tests/unit/conductor/test_conductor.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"c351fa1ac62dd76e38ae2420a4d1ca4396d9bd5a","unresolved":false,"context_lines":[{"line_number":603,"context_line":"                legacy_bdm\u003dFalse, host_lists\u003dNone)"},{"line_number":604,"context_line":"        mock_create_bind_arqs.assert_has_calls(["},{"line_number":605,"context_line":"            mock.call(self.context, instances[0].uuid,"},{"line_number":606,"context_line":"                      instances[0].flavor.extra_specs, \u0027node1\u0027, mock.ANY, \u0027fake-project\u0027),"},{"line_number":607,"context_line":"            mock.call(self.context, instances[1].uuid,"},{"line_number":608,"context_line":"                      instances[1].flavor.extra_specs, \u0027node2\u0027, mock.ANY, \u0027fake-project\u0027),"},{"line_number":609,"context_line":"            ])"}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_47eed88b","line":606,"updated":"2020-06-30 10:42:24.000000000","message":"pep8: E501 line too long (90 \u003e 79 characters)","commit_id":"e7922b1bc3c07b390b50c518fe0cf7b450c4bea8"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"c351fa1ac62dd76e38ae2420a4d1ca4396d9bd5a","unresolved":false,"context_lines":[{"line_number":605,"context_line":"            mock.call(self.context, instances[0].uuid,"},{"line_number":606,"context_line":"                      instances[0].flavor.extra_specs, \u0027node1\u0027, mock.ANY, \u0027fake-project\u0027),"},{"line_number":607,"context_line":"            mock.call(self.context, instances[1].uuid,"},{"line_number":608,"context_line":"                      instances[1].flavor.extra_specs, \u0027node2\u0027, mock.ANY, \u0027fake-project\u0027),"},{"line_number":609,"context_line":"            ])"},{"line_number":610,"context_line":"        # Comparing instances fails because the instance objects have changed"},{"line_number":611,"context_line":"        # in the above flow. So, we compare the fields instead."}],"source_content_type":"text/x-python","patch_set":2,"id":"bf51134e_27f3e475","line":608,"updated":"2020-06-30 10:42:24.000000000","message":"pep8: E501 line too long (90 \u003e 79 characters)","commit_id":"e7922b1bc3c07b390b50c518fe0cf7b450c4bea8"}]}
