)]}'
{"watcher/common/cinder_helper.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"32358c608f06e1abac8a4704f54111bc0be1614b","unresolved":false,"context_lines":[{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_volume_type_name_by_id(self, volume_type_id):"},{"line_number":80,"context_line":"        \"\"\"Return the volume type name for a given volume type ID.\"\"\""},{"line_number":81,"context_line":"        for vtype in self.get_volume_type_list():"},{"line_number":82,"context_line":"            if vtype.id \u003d\u003d volume_type_id:"},{"line_number":83,"context_line":"                return vtype.name"},{"line_number":84,"context_line":"        raise exception.VolumeTypeNotFound(name\u003dvolume_type_id)"}],"source_content_type":"text/x-python","patch_set":1,"id":"989e4633_1b9f2789","line":81,"updated":"2026-06-24 16:47:31.000000000","message":"get_volume_type_name_by_id calls self.cinder.volume_types.list() (a full API round-trip) on every single volume notification with no caching. In a busy cloud this means one Cinder API call per volume create/update/attach/detach/resize event.\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: Caching the volume type list or an id-to-name mapping with a TTL would eliminate redundant API calls during bursts of volume notifications, reducing latency and load on the Cinder API.\n\n**Recommendation**:\nConsider caching the volume type list or building an id-to-name dict refreshed periodically. Since volume types rarely change, a simple instance-level cache could suffice. This can be addressed in a follow-up patch.","commit_id":"d1606633053143ee714a3c77597f57cf9145e3ba"}],"watcher/decision_engine/model/notification/cinder.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"32358c608f06e1abac8a4704f54111bc0be1614b","unresolved":false,"context_lines":[{"line_number":190,"context_line":"            volume_type_name \u003d self.cinder.get_volume_type_name_by_id("},{"line_number":191,"context_line":"                data[\u0027volume_type\u0027]"},{"line_number":192,"context_line":"            )"},{"line_number":193,"context_line":"        except exception.VolumeTypeNotFound as exc:"},{"line_number":194,"context_line":"            # If volume_type name can not be find for any reason"},{"line_number":195,"context_line":"            # let\u0027s not update it but not block the rest of updates."},{"line_number":196,"context_line":"            # Periodic collector sync will update."}],"source_content_type":"text/x-python","patch_set":1,"id":"9ed886de_8de641b3","line":193,"updated":"2026-06-24 16:47:31.000000000","message":"The try/except around get_volume_type_name_by_id only catches VolumeTypeNotFound, but the underlying volume_types.list() is a network API call that can raise cinderclient exceptions (auth, connection, timeout). These propagate uncaught and crash the notification handler.\n\n**Severity**: HIGH | **Confidence**: 0.9\n\n**Risk**: Any transient Cinder API failure during volume notification processing will cause an unhandled exception, dropping the notification entirely instead of falling back gracefully as intended.\n\n**Priority**: Before merge\n**Why This Matters**: The notification handler runs on every volume lifecycle event. Cinder API blips are common in production, and the comment explicitly says the code should \u0027not block the rest of updates\u0027 but the narrow except violates that contract for the most likely failure mode (network errors, not missing types).\n\n**Recommendation**:\nWiden the except clause to also catch cinderclient exceptions. For example: except (exception.VolumeTypeNotFound, cinder_exception.ClientException) as exc: or catch Exception to match the pattern used in create_storage_node and create_pool in the same file. Import cinderclient.exceptions at the top of the module.","commit_id":"d1606633053143ee714a3c77597f57cf9145e3ba"}],"watcher/tests/unit/decision_engine/model/notification/test_cinder_notifications.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"32358c608f06e1abac8a4704f54111bc0be1614b","unresolved":false,"context_lines":[{"line_number":397,"context_line":"        )"},{"line_number":398,"context_line":"        # check that volume00 was added to the model"},{"line_number":399,"context_line":"        volume_00_name \u003d \u0027990a723f-6c19-4f83-8526-6383c9e9389f\u0027"},{"line_number":400,"context_line":"        volume_00 \u003d storage_model.get_volume_by_uuid(volume_00_name)"},{"line_number":401,"context_line":"        self.assertEqual(volume_00_name, volume_00.uuid)"},{"line_number":402,"context_line":"        self.assertFalse(volume_00.bootable)"},{"line_number":403,"context_line":"        # check that capacity was updated"}],"source_content_type":"text/x-python","patch_set":1,"id":"6d0c071e_3678925c","line":400,"updated":"2026-06-24 16:47:31.000000000","message":"Notification tests test_cinder_volume_create, test_cinder_bootable_volume_create, and test_cinder_volume_update never assert that the three new fields (volume_type, created_at, host) are populated on the Volume. The mocks pass through values but the resulting volume state is never verified.\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: The core feature of this patch, populating volume_type, created_at, and host from notifications, has zero test verification. A regression breaking field population would pass all existing tests silently.\n\n**Suggestion**:\nAdd assertions after processing in at least test_cinder_volume_create and test_cinder_volume_update. For example: self.assertEqual(\u0027type_0\u0027, volume_00.volume_type), self.assertEqual(\u00272017-10-30T00:00:00\u0027, volume_00.created_at), self.assertEqual(\u0027host_0@backend_0#pool_0\u0027, volume_00.host).","commit_id":"d1606633053143ee714a3c77597f57cf9145e3ba"}]}
