)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"fdb43d32de9a79ab6779f4cd5fde2cd00a2b36c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4f4f24ed_4dbb1924","updated":"2026-09-16 05:17:06.000000000","message":"Thanks for Optional[str] on attach_volume in PS2.\n\ncreate_encryption_key() now annotated -\u003e str. The body still\nstarts at None and returns None when the type is not encrypted. This may need to revert back to optional","commit_id":"67c1916dd6438c32831af4548089e7d67c5ec620"}],"cinder/volume/manager.py":[{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"bec0f665053f5e8e1d5c07300cdc4c812c791771","unresolved":true,"context_lines":[{"line_number":1424,"context_line":"                      context: context.RequestContext,"},{"line_number":1425,"context_line":"                      volume_id: str,"},{"line_number":1426,"context_line":"                      instance_uuid: str,"},{"line_number":1427,"context_line":"                      host_name: str,"},{"line_number":1428,"context_line":"                      mountpoint: str,"},{"line_number":1429,"context_line":"                      mode: str,"},{"line_number":1430,"context_line":"                      volume: Optional[objects.Volume] \u003d None) \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"f4706abf_4afd2a45","line":1427,"updated":"2026-09-15 17:10:14.000000000","message":"os-attach requires either instance_uuid or host_name (i am looking at cinder/api/schemas/volume_actions.py). The API sets the missing one to None. Optional[str] is better option for both.","commit_id":"1b54f44a03282cd20556a79287172f7d032e930b"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"d45fef6475a1d7204fbca27f2f93f5056aecc170","unresolved":false,"context_lines":[{"line_number":1424,"context_line":"                      context: context.RequestContext,"},{"line_number":1425,"context_line":"                      volume_id: str,"},{"line_number":1426,"context_line":"                      instance_uuid: str,"},{"line_number":1427,"context_line":"                      host_name: str,"},{"line_number":1428,"context_line":"                      mountpoint: str,"},{"line_number":1429,"context_line":"                      mode: str,"},{"line_number":1430,"context_line":"                      volume: Optional[objects.Volume] \u003d None) \\"}],"source_content_type":"text/x-python","patch_set":1,"id":"d1d6dec5_aa8f33e9","line":1427,"in_reply_to":"f4706abf_4afd2a45","updated":"2026-09-15 20:17:09.000000000","message":"Yes, the None cases are handled at lines 1449/1454 below.","commit_id":"1b54f44a03282cd20556a79287172f7d032e930b"}],"cinder/volume/volume_utils.py":[{"author":{"_account_id":36171,"name":"jayaanand borra","display_name":"jayaanand borra","email":"jayaanand.borra@netapp.com","username":"jayaanan","status":"netapp"},"change_message_id":"fdb43d32de9a79ab6779f4cd5fde2cd00a2b36c4","unresolved":true,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"def create_encryption_key(context: context.RequestContext,"},{"line_number":951,"context_line":"                          key_manager,"},{"line_number":952,"context_line":"                          volume_type_id: str) -\u003e str:"},{"line_number":953,"context_line":"    encryption_key_id \u003d None"},{"line_number":954,"context_line":"    if volume_types.is_encrypted(context, volume_type_id):"},{"line_number":955,"context_line":"        volume_type_encryption: db.models.Encryption \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"b99a4896_1a45a173","line":952,"updated":"2026-09-16 05:17:06.000000000","message":"-\u003e str is not accurate.\n\nencryption_key_id is still initialized to None (next line) and is only set\ninside if volume_types.is_encrypted(...). If the type is not encrypted,\nthis function returns None. That is covered by\ncinder/tests/unit/test_volume_utils.py:test_create_encryption_key_unencrypted,\nwhich asserts IsNone.\n\ntyping.cast (# 978) is a no-op at runtime, so\nencryption_key_id \u003d typing.cast(str, encryption_key_id) still returns None\non the unencrypted path. It only silences mypy. Need to revert back to Optional... I think?","commit_id":"67c1916dd6438c32831af4548089e7d67c5ec620"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"895959d1c9f7a749f70a199abbe2103dc4b2a14c","unresolved":false,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"def create_encryption_key(context: context.RequestContext,"},{"line_number":951,"context_line":"                          key_manager,"},{"line_number":952,"context_line":"                          volume_type_id: str) -\u003e str:"},{"line_number":953,"context_line":"    encryption_key_id \u003d None"},{"line_number":954,"context_line":"    if volume_types.is_encrypted(context, volume_type_id):"},{"line_number":955,"context_line":"        volume_type_encryption: db.models.Encryption \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"0820c80f_e460ec37","line":952,"in_reply_to":"a6ecd391_d992da0c","updated":"2026-09-16 13:52:49.000000000","message":"Fixed in https://review.opendev.org/c/openstack/cinder/+/1005884 which this patch now depends on.","commit_id":"67c1916dd6438c32831af4548089e7d67c5ec620"},{"author":{"_account_id":4523,"name":"Eric Harney","email":"eharney@redhat.com","username":"eharney"},"change_message_id":"42d65da59451ce6d47d9298ad88a3d74196d43a5","unresolved":true,"context_lines":[{"line_number":949,"context_line":""},{"line_number":950,"context_line":"def create_encryption_key(context: context.RequestContext,"},{"line_number":951,"context_line":"                          key_manager,"},{"line_number":952,"context_line":"                          volume_type_id: str) -\u003e str:"},{"line_number":953,"context_line":"    encryption_key_id \u003d None"},{"line_number":954,"context_line":"    if volume_types.is_encrypted(context, volume_type_id):"},{"line_number":955,"context_line":"        volume_type_encryption: db.models.Encryption \u003d ("}],"source_content_type":"text/x-python","patch_set":2,"id":"a6ecd391_d992da0c","line":952,"in_reply_to":"b99a4896_1a45a173","updated":"2026-09-16 13:37:43.000000000","message":"Yeah, this isn\u0027t quite right the way I\u0027ve done it in this patch.\n\nI think the best fix for this is to just change this method to throw an exception on unencrypted types, which should fit all current uses of it and prevent future incorrect uses. Will submit a patch to do that.\n\nThanks for calling this out.","commit_id":"67c1916dd6438c32831af4548089e7d67c5ec620"}]}
