)]}'
{"glance/api/v2/images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":1257,"context_line":"        task_repo \u003d self.gateway.get_task_repo(ctxt)"},{"line_number":1258,"context_line":"        try:"},{"line_number":1259,"context_line":"            image \u003d image_repo.get(image_id)"},{"line_number":1260,"context_line":"            if image.status !\u003d \u0027active\u0027:"},{"line_number":1261,"context_line":"                msg \u003d _(\"It\u0027s not allowed to calculate hash if image status \""},{"line_number":1262,"context_line":"                        \"is %s. Image must be in \u0027active\u0027 status.\") % ("},{"line_number":1263,"context_line":"                    image.status)"},{"line_number":1264,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1265,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1266,"context_line":"                                                self.policy)"},{"line_number":1267,"context_line":"            api_pol.calculate_hash()"}],"source_content_type":"text/x-python","patch_set":3,"id":"7c375ce9_8638fe80","line":1264,"range":{"start_line":1260,"start_character":0,"end_line":1264,"end_character":61},"updated":"2026-02-04 14:38:43.000000000","message":"I think similarly you should check if image already has checksum/hash set and raise conflict","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":1262,"context_line":"                        \"is %s. Image must be in \u0027active\u0027 status.\") % ("},{"line_number":1263,"context_line":"                    image.status)"},{"line_number":1264,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1265,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1266,"context_line":"                                                self.policy)"},{"line_number":1267,"context_line":"            api_pol.calculate_hash()"},{"line_number":1268,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ce0e51e2_69cf4b94","line":1265,"range":{"start_line":1265,"start_character":48,"end_line":1265,"end_character":59},"updated":"2026-02-04 14:38:43.000000000","message":"this should be ctxt","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":1266,"context_line":"                                                self.policy)"},{"line_number":1267,"context_line":"            api_pol.calculate_hash()"},{"line_number":1268,"context_line":""},{"line_number":1269,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1270,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"},{"line_number":1271,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1272,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1273,"context_line":""},{"line_number":1274,"context_line":"            task_input \u003d {\u0027image_id\u0027: image_id,"},{"line_number":1275,"context_line":"                          \u0027hash_algo\u0027: hash_algo}"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ae62761_563137ea","line":1272,"range":{"start_line":1269,"start_character":0,"end_line":1272,"end_character":76},"updated":"2026-02-04 14:38:43.000000000","message":"Does this mean the copy image import operation will not be performed if this hash calculation is in progress?","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":2119,"context_line":"        },"},{"line_number":2120,"context_line":"        \u0027calculate_hash\u0027: {"},{"line_number":2121,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":2122,"context_line":"            \u0027description\u0027: _(\u0027Values for calculate hash API to calculate \u0027"},{"line_number":2123,"context_line":"                             \u0027checksum and os_hash_value for active images \u0027"},{"line_number":2124,"context_line":"                             \u0027with no checksum and hash_value set\u0027),"},{"line_number":2125,"context_line":"            \u0027properties\u0027: {"}],"source_content_type":"text/x-python","patch_set":3,"id":"41ada0c5_ee42e178","line":2122,"range":{"start_line":2122,"start_character":30,"end_line":2122,"end_character":36},"updated":"2026-02-04 14:38:43.000000000","message":"values? we are just passing one input, I think description should be more generic.","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":2125,"context_line":"            \u0027properties\u0027: {"},{"line_number":2126,"context_line":"                \u0027os_hash_algo\u0027: {"},{"line_number":2127,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2128,"context_line":"                    \u0027maxLength\u0027: 64,"},{"line_number":2129,"context_line":"                    \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027, \u0027sha512\u0027],"},{"line_number":2130,"context_line":"                    \u0027description\u0027: _(\u0027Hashing algorithm to use for hash \u0027"},{"line_number":2131,"context_line":"                                     \u0027calculation. If not provided, uses the \u0027"}],"source_content_type":"text/x-python","patch_set":3,"id":"adf14653_c4c3df7f","line":2128,"range":{"start_line":2128,"start_character":20,"end_line":2128,"end_character":36},"updated":"2026-02-04 14:38:43.000000000","message":"why do we need 64?","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":2127,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2128,"context_line":"                    \u0027maxLength\u0027: 64,"},{"line_number":2129,"context_line":"                    \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027, \u0027sha512\u0027],"},{"line_number":2130,"context_line":"                    \u0027description\u0027: _(\u0027Hashing algorithm to use for hash \u0027"},{"line_number":2131,"context_line":"                                     \u0027calculation. If not provided, uses the \u0027"},{"line_number":2132,"context_line":"                                     \u0027configured default hashing algorithm.\u0027),"},{"line_number":2133,"context_line":"                },"},{"line_number":2134,"context_line":"            },"}],"source_content_type":"text/x-python","patch_set":3,"id":"01e29ef3_61663132","line":2131,"range":{"start_line":2130,"start_character":67,"end_line":2131,"end_character":49},"updated":"2026-02-04 14:38:43.000000000","message":"we use this for checksum calculation as well, right?","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"}],"glance/async_/flows/hash_import.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Copyright 2024 RedHat Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"e05441ce_68617804","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2026-02-04 14:38:43.000000000","message":"2026?","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":20,"context_line":"from taskflow import task"},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"import glance.async_.flows.api_image_import as image_import"},{"line_number":23,"context_line":"from glance.async_.flows.location_import import _CalculateHash"},{"line_number":24,"context_line":"from glance.common import exception"},{"line_number":25,"context_line":"from glance.i18n import _"},{"line_number":26,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"a26cac22_96ab8042","line":23,"range":{"start_line":23,"start_character":48,"end_line":23,"end_character":62},"updated":"2026-02-04 14:38:43.000000000","message":"I think we don\u0027t import objects directly.","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    def execute(self):"},{"line_number":47,"context_line":"        image \u003d self.image_repo.get(self.image_id)"},{"line_number":48,"context_line":"        if image.status !\u003d \u0027active\u0027:"},{"line_number":49,"context_line":"            msg \u003d (_(\u0027Image %(image_id)s must be in active status to \u0027"},{"line_number":50,"context_line":"                     \u0027calculate hash, current status: %(status)s\u0027) %"},{"line_number":51,"context_line":"                   {\u0027image_id\u0027: self.image_id, \u0027status\u0027: image.status})"},{"line_number":52,"context_line":"            raise exception.InvalidImageStatusTransition(msg)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Allow recalculation if a different algorithm is requested"},{"line_number":55,"context_line":"        if image.checksum and image.os_hash_value:"},{"line_number":56,"context_line":"            if self.hash_algo and image.os_hash_algo !\u003d self.hash_algo:"}],"source_content_type":"text/x-python","patch_set":3,"id":"2cf4a2ec_ea735b06","line":53,"range":{"start_line":48,"start_character":0,"end_line":53,"end_character":0},"updated":"2026-02-04 14:38:43.000000000","message":"we are already doing this in api so what is the need of having it here again?","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":52,"context_line":"            raise exception.InvalidImageStatusTransition(msg)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"        # Allow recalculation if a different algorithm is requested"},{"line_number":55,"context_line":"        if image.checksum and image.os_hash_value:"},{"line_number":56,"context_line":"            if self.hash_algo and image.os_hash_algo !\u003d self.hash_algo:"},{"line_number":57,"context_line":"                # Different algorithm requested, allow recalculation"},{"line_number":58,"context_line":"                return"},{"line_number":59,"context_line":"            msg \u003d (_(\u0027Image %(image_id)s already has checksum and hash \u0027"},{"line_number":60,"context_line":"                     \u0027values set\u0027) % {\u0027image_id\u0027: self.image_id})"},{"line_number":61,"context_line":"            raise exception.Invalid(msg)"},{"line_number":62,"context_line":""},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"def get_flow(**kwargs):"},{"line_number":65,"context_line":"    \"\"\"Return task flow for hash calculation"}],"source_content_type":"text/x-python","patch_set":3,"id":"93fbb0fa_5b664eae","line":62,"range":{"start_line":55,"start_character":0,"end_line":62,"end_character":0},"updated":"2026-02-04 14:38:43.000000000","message":"this should be move to api call and verified before taskflow is initiated.","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":78,"context_line":"    admin_repo \u003d kwargs.get(\u0027admin_repo\u0027)"},{"line_number":79,"context_line":"    image_id \u003d kwargs.get(\u0027image_id\u0027)"},{"line_number":80,"context_line":"    hash_algo \u003d kwargs.get(\u0027hash_algo\u0027)"},{"line_number":81,"context_line":"    if not hash_algo:"},{"line_number":82,"context_line":"        hash_algo \u003d CONF.hashing_algorithm"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"    # Instantiate an action wrapper with the admin repo if we got one,"},{"line_number":85,"context_line":"    # otherwise with the regular repo."}],"source_content_type":"text/x-python","patch_set":3,"id":"765da1be_84073956","line":82,"range":{"start_line":81,"start_character":0,"end_line":82,"end_character":42},"updated":"2026-02-04 14:38:43.000000000","message":"If you do this in api then I think you don\u0027t need to import this opt in this file.","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"}],"glance/tests/unit/async_/flows/test_hash_import.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"471f25560f2ed2dabae78d5fafe4f0cbd3c0ff48","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Copyright 2024 RedHat Inc."},{"line_number":2,"context_line":"# All Rights Reserved."},{"line_number":3,"context_line":"#"},{"line_number":4,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"}],"source_content_type":"text/x-python","patch_set":3,"id":"de5246c0_6df2c644","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2026-02-04 14:38:43.000000000","message":"2026","commit_id":"6e14206a9e88e2d443fe351e7ce3976a11a23916"}]}
