)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Add new add location api"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds a new location api POST"},{"line_number":10,"context_line":"/v2/images/{image_id}/location to add the new location to"},{"line_number":11,"context_line":"the image when in `queued` state only."},{"line_number":12,"context_line":"This operation will be service user \u0026 image owner only,"},{"line_number":13,"context_line":"and validated by the new policy rule `add_image_location`."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"a0af70f0_bd8c16fb","line":10,"range":{"start_line":10,"start_character":22,"end_line":10,"end_character":30},"updated":"2023-05-10 01:42:43.000000000","message":"locations","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Add new add location api"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This change adds a new location api POST"},{"line_number":10,"context_line":"/v2/images/{image_id}/location to add the new location to"},{"line_number":11,"context_line":"the image when in `queued` state only."},{"line_number":12,"context_line":"This operation will be service user \u0026 image owner only,"},{"line_number":13,"context_line":"and validated by the new policy rule `add_image_location`."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"b68009ef_ae611734","line":10,"range":{"start_line":10,"start_character":22,"end_line":10,"end_character":30},"in_reply_to":"a0af70f0_bd8c16fb","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"336621de_66d73143","updated":"2023-05-08 09:17:40.000000000","message":"This also needs to be documented (apart from api-ref).\n\nFew functional issues and questions below;\n\n1. The api should be /v2/images/image-id/locations \n\n2. I can see locations and direct_url in the response. These should not be returned in response as our main aim is to hide these details from the user.\n\n3. What happens if we pass do_secure_hash other than true or false, at this time it calculates the hash/checksum with do_secure_hash:12345\n\n4. The aim of passing validation data is that user can specify his own hash and checksum, if we are going to limit calculation of hash just for sha512 then I think there is no use of giving this advantage to user.\n\n5. 500 error if I pass only os_hash_algo sha512 to the request\n\n6. I think validation of validation_data should be done before downloading the image data, at this moment if I pass invalid validation data then it waits for downloading the whole image and then returns error.\n\n7. If i pass just os_hash_value then it returns me error \"os_hash_algo must be sha512, not None\" this is confusing, i think this should be rejected with 400 and not 409 error.\n\n8. 500 error if I pass invalid key in validation data, for example; \"validation_data\": {\"os_hash_algo_123\": \"sha512\", \"os_hash_value\": \"abcdefghijklmnop\"}\u0027\n\n9. If do_secure_hash is true and we pass invalid os_hash_value with valid os_hash_algo then it returns error message as \"os_hash_value is already set with a different value\" this error message is confusing as the image is queued state with now os_hash_value set. I think the error message should be \"Mismatch os_hash_value (expected_value) vs (actual_value)\". The current error message makes sense in case of we are adding image with active state where already os_hash_value is set.\n\n10. Same is the case with checksum, it should reject with error message (Mismatch checksum (Expeceted) vs (Actual)\n\n11. If I just pass, \"validation_data\": {\"do_secure_hash\": false, \"valiation_data\": \"checksum\": \"f8ab98ff5e73ebab884d80c9dc9c7291\"} then it returns me error \"os_hash_algo must be sha512, not None\" whereas if I pass do_secure_hash as true then it does not return me this error but calculates the checksum and rejects if checksum is different. I think behavior should be same in both the cases.\n\nQuestions:\n1. What if do_secure_hash is True and in validation_data we are only passing os_hash_algo and os_hash_value, should it calculate and set checksum or it should ignore checksum calculation and vice a versa.\n\n2. RBD backend case: Consumers like nova/cinder calls this new location API using operation like snapshot instance/volume upload to image (cow clone case) and the validation fails at glance side then what happened to data which is created in RBD pool because nova/cinder will not be able to call the new location API with existing url, right? (This case will happen when nova/cinder sends checksum and os_hash_value which does not matches with calculation on glance side).","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b9fb24fce6af0312e457cc3a16e1851d2928d9d3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"6ca79d65_add5bfc2","in_reply_to":"336621de_66d73143","updated":"2023-05-08 09:34:14.000000000","message":"Just to give more reference for point 2 in functional issues\n\nEven if show_multiple_locations and show_image_direct_url is set to the locations and direct_url should not be returned in response for new_locations API","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"c82538ee_dfe9bd6d","updated":"2023-05-09 13:43:44.000000000","message":"Thanks for the review Abhishek!\n\nI\u0027ve tried to cover the issues you have listed and fixed the review comments.\nFor documentation I will submit the separate patch soon.","commit_id":"2ae91403b1c3369e351fd2171127ad12fe129a8d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"6ce11f98_76f73ba5","updated":"2023-05-10 01:42:43.000000000","message":"added few comments but I still need to run some manual tests on this latest patch","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"80cf0e30_ffddcd53","updated":"2023-05-11 15:02:42.000000000","message":"Didn\u0027t checked unit and functional tests, also did not tested this patch manually either.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"f7324eef_93c813c4","updated":"2023-05-11 10:21:45.000000000","message":"Thanks Abhishek for your time \u0026 patience!\nI\u0027ve tried to fix the comments","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"49e9f09c3c5016b163d66077a7df9e46fde4c2e7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":9,"id":"97125d0c_78dc84c5","updated":"2023-05-11 12:36:57.000000000","message":"recheck multistore-cinder-import failure","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e6c909b48dce135f2d2568f2199f1356f5276b42","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":13,"id":"c9f05b95_2f4bad0e","updated":"2023-05-16 15:11:19.000000000","message":"To highlight we missing one functional test","commit_id":"cffc5ec1583980b744fe235864153bfcd4429e71"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2b68841c1e4f4b53270b09de2d978dfc82837b0d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"c9b5671b_1783a95e","updated":"2023-05-17 08:01:14.000000000","message":"How about adding the functional test for multibackend in followup patch along with doc? I\u0027m going on 1 week of PTO from today, so I would be able to add that after I\u0027m back.\nIf everything else looks good to you how about having that 1 functional test later and keep this change unblocked?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"76950abd_cacedb8d","updated":"2023-05-17 15:54:23.000000000","message":"I clearly need to go look at the spec to see if I\u0027m missing something about this being synchronous instead of async. However, I don\u0027t see how this can really work in practice in its current form for anything other than a small cirros image. If I\u0027m missing something please point it out :)","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"289aa0d310b476c955d303badc3396f382c2574c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":14,"id":"eaf9b97e_e29f3796","in_reply_to":"c9b5671b_1783a95e","updated":"2023-05-17 08:16:18.000000000","message":"We are not in hurry to merge this, So I would suggest we should have it in one go.\nDocs can be added as followup patch, but functional test should be part of this patch.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c19debb83843c6c4c5d592c57d088b29af76453a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"49ca3331_c09d155b","updated":"2023-06-21 13:53:12.000000000","message":"Agree with Abhi. Also, this has gotten pretty massive (gerrit shows it as an XL, since it adds 1300 lines). Would it be reasonable to break this up into a patch that adds the new flow and tests for it, followed by the api changes and tests for that?\n\nI\u0027m glad to see the implementation progressing though, thanks for pushing this through!","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"67fdb33327e67ed3736462878f20a083406c1e78","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"415bb802_69333b2b","updated":"2023-06-21 05:56:48.000000000","message":"I think we should not interfere with existing taskflow here, this is making it very complex and hard to understand. It should have its own taskflow with all expected tasks.","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e0e2850b69656ea4a392512f728c516a79fc0822","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":15,"id":"5855e29e_4d3b9832","updated":"2023-06-22 06:27:17.000000000","message":"Thanks for the review!\nI will update the new PS by adding the new taskflow for hash calculation.","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c3be3ebefb416bf2c96affe474b0d01091fcad0e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"9abc6658_33b50940","updated":"2023-06-23 14:22:30.000000000","message":"I think you should break this patch in smaller patches like below\nPatch 1 Core functionality + unit tests\nPatch 2 Functional tests\nPatch 3 Doucmentation + api reference\nPatch 4 Version bump + related tests change","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"04491a7c98bea8cdf48d5637db53181c164861bd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":18,"id":"0374fa4f_c13d54b2","updated":"2023-06-23 14:27:33.000000000","message":"IMO this is still confusing and need to simplify more by dividing code in separate tasks.","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7c7f7ee4d656bfa0efb0cb1dcdf1a56e31a90a0a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"4df583dd_f46607e5","updated":"2023-06-29 18:34:44.000000000","message":"Adding my -1 for moving the image status into the task.","commit_id":"ef4f88df77243f339d8e3199adf95c1169cd953d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f8f00dd99cb59bcb47f8a083cd220e314f0a4de8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":20,"id":"267360ca_18d5da7b","updated":"2023-06-26 08:13:42.000000000","message":"Let\u0027s wait for other\u0027s opinion on what operations should we keep async.","commit_id":"ef4f88df77243f339d8e3199adf95c1169cd953d"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"8fda46a66f754d4fe32edc97b65b37bc71dc6f55","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":21,"id":"03efbe89_db2216ad","updated":"2023-07-19 16:13:09.000000000","message":"Looks like maybe the failures here are related to the change? Is progress being made on getting this working?","commit_id":"102023dc6421c4b2f821360366aa81578416bd31"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"86f56faa3f181c89813c96890dadca08166908be","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"7f15a41c_7dc92ddc","updated":"2023-07-20 11:09:27.000000000","message":"recheck multiple timeouts","commit_id":"ead111bb3ec23f9c907cc688a1841218913f89f7"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"982096742bd0e40266e5f452e6f103a5b6e13ae4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":22,"id":"5803ca48_729b18ba","updated":"2023-07-27 14:23:54.000000000","message":"recheck the timeout situation has improved in tempest (and is still improving) so try this again","commit_id":"ead111bb3ec23f9c907cc688a1841218913f89f7"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"574d8486d35861e8c165aba5213b0c4ea026d123","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":25,"id":"ffd49c09_d6337d42","updated":"2023-08-03 08:53:17.000000000","message":"recheck tempest failure","commit_id":"33250e3de2451140aa2f5044a77f5adbdbc04f07"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0d578dd820b86a8b8e809785f85b29c946b72bf","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":26,"id":"23fde876_d2f479a1","updated":"2023-08-03 13:15:14.000000000","message":"recheck unrelated failure","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"69f5f05654d072b0a732a86ace5662052a8b0079","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"19952c19_781adb03","updated":"2023-08-11 05:21:44.000000000","message":"I think nova and cinder should also add service role in context while calling this new API. There are two variables in context, one is roles which contains traditional roles (admin,member,reader) and service_roles which contains (service + admin,member,reader for nova and for cinder it is empty.)\n\nAFAIK, At policy side rule is executed against context.roles so it will never consider service role if it is not included in context.roles \n\n@dan @rajat any suggestions?","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1316d9a061c7a38982a337bf7bc05ee0aa530dc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":28,"id":"11af8dd6_240b4334","in_reply_to":"19952c19_781adb03","updated":"2023-08-11 13:32:31.000000000","message":"Yep, as we now do for cinder, so makes sense to me.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"48f25a5e93055919d52247fd5ab5a4640f9e0583","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"9446920b_c77c49a3","updated":"2023-08-17 14:45:31.000000000","message":"Maybe this is the patch where we could add the IOError test I was talking about in the previous patch?","commit_id":"299bf91255480c3ff43a7bd2008339c652df0c7d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c983d83b9bd6abe9a1ae4d4ecc1f853447c00174","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":30,"id":"5849cbbf_d3ead874","in_reply_to":"9446920b_c77c49a3","updated":"2023-08-20 12:20:24.000000000","message":"Ack, Added.","commit_id":"299bf91255480c3ff43a7bd2008339c652df0c7d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f83b4bd77b527ca25c1153ac39cfd2aba3590f68","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":39,"id":"76d61869_db4fbfa1","updated":"2023-08-28 14:39:33.000000000","message":"recheck on multiple failures","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"8c0ff52873b3095777b44d8da3e9a7f4b69a7ad1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":43,"id":"26ccd2d1_0c3c29ae","updated":"2023-08-30 11:48:13.000000000","message":"recheck on multiple failures with timeouts and some resources couldn\u0027t reach to desirable states.","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c636270e983f91132c71424f636c5cd78990d273","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":44,"id":"109ab852_394c054f","updated":"2023-08-31 10:06:59.000000000","message":"recheck on time out issue","commit_id":"72f4490e968570cacdff9a988f59f207783e3677"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d1d762eb6a7d012658d199c80b20f18992b00d60","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":45,"id":"d15602a1_1ed08805","updated":"2023-09-21 06:40:57.000000000","message":"recheck on DBConnectionError \u0026 ssh timeout","commit_id":"b4beaa61bbd22fed2676480ca1de48adc7c52cbf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3f2bbc078519caa281bcea7d2ec8584b1abbfeb8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":46,"id":"d7d93f76_d4cda1e4","updated":"2023-10-26 14:57:36.000000000","message":"Could you please mark resolved existing comments or reply to them if those are not valid?","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"56f47debd04e04a95106caa686ce587664437f59","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":46,"id":"e3ed4017_94966c5f","updated":"2023-10-26 14:59:11.000000000","message":"I will prefer a separate patch for api docs related changes.","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f8a0fb02b6a04709b8d8def69e49aa6ac6283334","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":46,"id":"cd7a5358_05702f96","in_reply_to":"c6310678_037812e6","updated":"2023-10-31 09:36:22.000000000","message":"Sorry, I was seeing very old patch","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6ddf10c858389d0497dd36c7808cb903d7aeea64","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":46,"id":"c6310678_037812e6","in_reply_to":"e3ed4017_94966c5f","updated":"2023-10-31 09:32:22.000000000","message":"sorry I didn\u0027t get this comment, doc related changes are already in separate patch.","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"9227f4144f964cac6aa96fdf23b8e6b6744fe479","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":47,"id":"8496e035_523c774f","updated":"2023-11-07 12:24:35.000000000","message":"recheck on tempest integrated storage failure","commit_id":"7174edf1388f21cd08b2915fc6896f461484218a"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0971b65d8d4b75d98e9efaf0cef7a6df33dcc200","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":50,"id":"d172973a_eb535d03","updated":"2024-01-03 11:36:45.000000000","message":"recheck on multistore cinder import and nova ceph multistore failure during some volume boot pattern scenarios","commit_id":"d2424d0431ea8eafaf4a0d01427df1491af06fee"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"7a0f61bef6d5e3a2de925751c4c0664ff1b2c432","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":62,"id":"c358d071_350cf7ee","updated":"2024-02-26 14:19:50.000000000","message":"recheck since fips job is non-voting now!","commit_id":"5f275b1766eeab764cf57a5fcc3c7ff2a057018c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9f7f78bc9682e53dcb61efa8316836636db21ea9","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":63,"id":"daa55b11_d9fb420b","updated":"2024-02-27 11:36:04.000000000","message":"I think better to add some test coverage for utility method \u0027is_http_store_configured\u0027\n\n1. single_store http is enabled but url is not http - False\n2. single store http is disabled and url is http - False\n3. single store http is enabled and url is http - True\n\n4. enabled_backends http is enabled but url is not http - False\n2. enabled_backends http is disabled and url is http - False\n3. enabled_backends http is enabled and url is http - True","commit_id":"e1a652c2961b7c145ee261c903c25f991471b72b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"aa4e8231d2b7262cf40dcfb0acadd21d3b70f75d","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":63,"id":"5b6e3656_f8336e4a","updated":"2024-02-27 09:32:10.000000000","message":"recheck on error while volume deletion on glance-multistore-cinder-import","commit_id":"e1a652c2961b7c145ee261c903c25f991471b72b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3a60746678c1d97ec5b4a6292ab72007f9dd8152","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":63,"id":"9f5ece0f_cbd4f4f6","in_reply_to":"daa55b11_d9fb420b","updated":"2024-02-27 13:26:19.000000000","message":"Done","commit_id":"e1a652c2961b7c145ee261c903c25f991471b72b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"22b7f4250c098057b5a0dc0a2cb0053181d1dfff","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":66,"id":"84ccd987_21323839","updated":"2024-02-28 07:05:04.000000000","message":"recheck on multistore cinder import failure during some volume boot pattern scenarios","commit_id":"4b6bc6d758c1567e20d7a3dbdb895c3462aa8e50"},{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5f44d6039e9a9214d18dc63f191d750ad556ed67","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":73,"id":"54aae4a6_0cc15551","updated":"2024-02-29 14:12:35.000000000","message":"Noticed a typo on the release note.","commit_id":"de08233f8e264a496c681b53794a7cc878626c36"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"219a432da94a0eb55d75435f1a81d4c117ef75df","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":73,"id":"23beba96_95ca764b","updated":"2024-02-29 13:27:14.000000000","message":"recheck disk io error in py38","commit_id":"de08233f8e264a496c681b53794a7cc878626c36"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"e02134fbfcf79026c040a67e25967be5470b9e84","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":82,"id":"2559e588_5ab8391f","updated":"2024-06-18 15:28:20.000000000","message":"I would have loved to see more factorization in the tests, but it\u0027s actually trickier than it seems :/ So let\u0027s keep them as is.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7f63e707fa62f092f43bd8473b86077eaee03d8c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":83,"id":"b2529bb7_cbc37ff4","updated":"2024-07-01 14:51:25.000000000","message":"Ack, you refactored it, so let it be!","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":86,"id":"9e0ecf46_ec1e36aa","updated":"2024-07-22 07:25:34.000000000","message":"Thanks for the review!","commit_id":"20010512e87e0fbbfad168f077f39d40401d6a74"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"372ebb8a3c96a1ceb0a1c4ea0bee8ca9978eefac","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":89,"id":"fbbf9f42_7911e746","updated":"2024-07-25 13:52:40.000000000","message":"Note to approver: Wait for nova results","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"}],"api-ref/source/v2/images-images-v2.inc":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":781,"context_line":"Add Location"},{"line_number":782,"context_line":"~~~~~~~~~~~~"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":".. rest_method::  POST /v2/images/{image_id}/location"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"Add location to an image which is in ``queued`` state accepts"},{"line_number":787,"context_line":"location url, do_secure_hash and validation_data in JSON body."}],"source_content_type":"text/x-c++src","patch_set":5,"id":"ae6acffe_0ac06a50","line":784,"range":{"start_line":784,"start_character":45,"end_line":784,"end_character":52},"updated":"2023-05-08 09:17:40.000000000","message":"As per the spec it should be locations","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":781,"context_line":"Add Location"},{"line_number":782,"context_line":"~~~~~~~~~~~~"},{"line_number":783,"context_line":""},{"line_number":784,"context_line":".. rest_method::  POST /v2/images/{image_id}/location"},{"line_number":785,"context_line":""},{"line_number":786,"context_line":"Add location to an image which is in ``queued`` state accepts"},{"line_number":787,"context_line":"location url, do_secure_hash and validation_data in JSON body."}],"source_content_type":"text/x-c++src","patch_set":5,"id":"b74d56de_d4667b0b","line":784,"range":{"start_line":784,"start_character":45,"end_line":784,"end_character":52},"in_reply_to":"ae6acffe_0ac06a50","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":789,"context_line":"Attempting to add a location to image exacept service user or image owner"},{"line_number":790,"context_line":"will cause the entire request to fail with a 403 (Forbidden) response code:"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued`` or"},{"line_number":793,"context_line":"``active`` state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 409 (Conflict) response code."}],"source_content_type":"text/x-c++src","patch_set":5,"id":"fa90578a_2e89ea2d","line":793,"range":{"start_line":792,"start_character":72,"end_line":793,"end_character":10},"updated":"2023-05-08 09:17:40.000000000","message":"How will it allow to add location to active state?","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":789,"context_line":"Attempting to add a location to image exacept service user or image owner"},{"line_number":790,"context_line":"will cause the entire request to fail with a 403 (Forbidden) response code:"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued`` or"},{"line_number":793,"context_line":"``active`` state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 409 (Conflict) response code."}],"source_content_type":"text/x-c++src","patch_set":5,"id":"6b50f1cb_1d0f6170","line":793,"range":{"start_line":792,"start_character":72,"end_line":793,"end_character":10},"in_reply_to":"aeca1aae_9391147a","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":true,"context_lines":[{"line_number":789,"context_line":"Attempting to add a location to image exacept service user or image owner"},{"line_number":790,"context_line":"will cause the entire request to fail with a 403 (Forbidden) response code:"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued`` or"},{"line_number":793,"context_line":"``active`` state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 409 (Conflict) response code."}],"source_content_type":"text/x-c++src","patch_set":5,"id":"aeca1aae_9391147a","line":793,"range":{"start_line":792,"start_character":72,"end_line":793,"end_character":10},"in_reply_to":"fa90578a_2e89ea2d","updated":"2023-05-09 13:43:44.000000000","message":"added by mistake","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":793,"context_line":"``active`` state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 409 (Conflict) response code."},{"line_number":797,"context_line":""},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"Normal response codes: 200"}],"source_content_type":"text/x-c++src","patch_set":5,"id":"15dfba10_1e714507","line":796,"range":{"start_line":796,"start_character":17,"end_line":796,"end_character":31},"updated":"2023-05-08 09:17:40.000000000","message":"it should be 400","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":793,"context_line":"``active`` state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 409 (Conflict) response code."},{"line_number":797,"context_line":""},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"Normal response codes: 200"}],"source_content_type":"text/x-c++src","patch_set":5,"id":"168b34e5_c9a4054e","line":796,"range":{"start_line":796,"start_character":17,"end_line":796,"end_character":31},"in_reply_to":"15dfba10_1e714507","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":838,"context_line":"   - owner: owner"},{"line_number":839,"context_line":"   - protected: protected"},{"line_number":840,"context_line":"   - schema: schema-image"},{"line_number":841,"context_line":"   - self: self"},{"line_number":842,"context_line":"   - size: size"},{"line_number":843,"context_line":"   - status: status"},{"line_number":844,"context_line":"   - tags: tags"}],"source_content_type":"text/x-c++src","patch_set":5,"id":"bc069d8b_edceea52","line":841,"range":{"start_line":841,"start_character":0,"end_line":841,"end_character":15},"updated":"2023-05-08 09:17:40.000000000","message":"is it part of response?","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":838,"context_line":"   - owner: owner"},{"line_number":839,"context_line":"   - protected: protected"},{"line_number":840,"context_line":"   - schema: schema-image"},{"line_number":841,"context_line":"   - self: self"},{"line_number":842,"context_line":"   - size: size"},{"line_number":843,"context_line":"   - status: status"},{"line_number":844,"context_line":"   - tags: tags"}],"source_content_type":"text/x-c++src","patch_set":5,"id":"82b1ffb8_28a068bb","line":841,"range":{"start_line":841,"start_character":0,"end_line":841,"end_character":15},"in_reply_to":"bc069d8b_edceea52","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":786,"context_line":"Add location to an image which is in ``queued`` state accepts"},{"line_number":787,"context_line":"location url, do_secure_hash and validation_data in JSON body."},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"Attempting to add a location to image exacept service user or image owner"},{"line_number":790,"context_line":"will cause the entire request to fail with a 403 (Forbidden) response code:"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued``"}],"source_content_type":"text/x-c++src","patch_set":14,"id":"21055f15_4cac3013","line":789,"range":{"start_line":789,"start_character":38,"end_line":789,"end_character":45},"updated":"2023-05-17 15:54:23.000000000","message":"\"except\"? Even still, this doesn\u0027t read clearly to me. I think you mean something like \"Attempting to add a location to an image without the service role or being the image owner will cause the request to fail with a 403\"?\n\nThat would sound better, but perhaps something like this would be better:\n\n\"Adding a location to an image is only allowed for the owner or a user with the service role. If these conditions are not met, a 403 (Forbidden) will be returned.\"","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":787,"context_line":"location url, do_secure_hash and validation_data in JSON body."},{"line_number":788,"context_line":""},{"line_number":789,"context_line":"Attempting to add a location to image exacept service user or image owner"},{"line_number":790,"context_line":"will cause the entire request to fail with a 403 (Forbidden) response code:"},{"line_number":791,"context_line":""},{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued``"},{"line_number":793,"context_line":"state will result in a 409 (Conflict) response code"}],"source_content_type":"text/x-c++src","patch_set":14,"id":"59f7c5be_10be2ee3","line":790,"range":{"start_line":790,"start_character":74,"end_line":790,"end_character":75},"updated":"2023-05-17 15:54:23.000000000","message":"s/:/./ ?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":792,"context_line":"Attempting to add a location path to an image that is not in ``queued``"},{"line_number":793,"context_line":"state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 400 (Bad Request) response code."},{"line_number":797,"context_line":""},{"line_number":798,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":14,"id":"4eea7ed4_ae6cfd63","line":795,"range":{"start_line":795,"start_character":37,"end_line":795,"end_character":41},"updated":"2023-05-17 15:54:23.000000000","message":"s/data(incase/data (in the case/","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":793,"context_line":"state will result in a 409 (Conflict) response code"},{"line_number":794,"context_line":""},{"line_number":795,"context_line":"Attempting to add invalid validation data(incase of http store) to the image"},{"line_number":796,"context_line":"will result in a 400 (Bad Request) response code."},{"line_number":797,"context_line":""},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"Normal response codes: 200"}],"source_content_type":"text/x-c++src","patch_set":14,"id":"e99c0cd0_7fb4742f","line":796,"updated":"2023-05-17 15:54:23.000000000","message":"I think this means providing a key other than one of the three listed as allowed, right? It probably should also include \"providing some but not all three\" right?\n\nAlso, it would be easy to read this as \"providing an incorrect hash value\" which of course, can\u0027t really affect the return code of this call. So some clarity here would probably be good.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":808,"context_line":""},{"line_number":809,"context_line":"   - image_id: image_id-in-path"},{"line_number":810,"context_line":"   - url: url-in-request"},{"line_number":811,"context_line":"   - do_secure_hash: do-secure-hash-in-request"},{"line_number":812,"context_line":"   - validation_data: validation-data-in-request"},{"line_number":813,"context_line":""},{"line_number":814,"context_line":"Request Example"}],"source_content_type":"text/x-c++src","patch_set":14,"id":"14241bcc_95c30ef1","line":811,"updated":"2023-05-17 15:54:23.000000000","message":"Probably need more documentation of what this really means, and what happens if the validation fails. Does the whole image go into error state? Just the status on the location?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":840,"context_line":"   - status: status"},{"line_number":841,"context_line":"   - updated_at: updated_at"},{"line_number":842,"context_line":"   - virtual_size: virtual_size"},{"line_number":843,"context_line":"   - visibility: visibility"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":14,"id":"4a0dc9c6_4b52118f","line":843,"updated":"2023-05-17 15:54:23.000000000","message":"This looks like the response from adding a location is the whole image? That wouldn\u0027t be an appropriate RESTful behavior fro adding a location - this should be a superset of the request.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"ea967db32292b4bf1d10af115eed8a6c414556aa","unresolved":true,"context_lines":[{"line_number":840,"context_line":"   - status: status"},{"line_number":841,"context_line":"   - updated_at: updated_at"},{"line_number":842,"context_line":"   - virtual_size: virtual_size"},{"line_number":843,"context_line":"   - visibility: visibility"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":14,"id":"54860ea3_0f776897","line":843,"in_reply_to":"4a0dc9c6_4b52118f","updated":"2023-05-17 16:24:00.000000000","message":"Initially the idea was to limit the response to only the location information but it was mentioned in the spec that this should have same response as that of old location add API (which returns full image response). I\u0027m fine either way since this info isn\u0027t used anywhere currently","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc287c157c55bcfbddf566449512ae33cc3c370a","unresolved":true,"context_lines":[{"line_number":840,"context_line":"   - status: status"},{"line_number":841,"context_line":"   - updated_at: updated_at"},{"line_number":842,"context_line":"   - virtual_size: virtual_size"},{"line_number":843,"context_line":"   - visibility: visibility"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":14,"id":"86bd61c4_c7720f89","line":843,"in_reply_to":"54860ea3_0f776897","updated":"2023-05-17 17:02:09.000000000","message":"Okay, well, I don\u0027t think that\u0027s right. You should PUT/POST part of an object and get the same schema of object back. GET of that same thing should also return the same schema.\n\nEspecially since this is a new path in the URL, I don\u0027t think we have any prior art (right?) that we have to respect about the object schema in this part of the VFS.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":27615,"name":"Rajat Dhasmana","email":"rajatdhasmana@gmail.com","username":"whoami-rajat"},"change_message_id":"e5719374fc354d2c1b21a35992c186ab1ccf495f","unresolved":true,"context_lines":[{"line_number":840,"context_line":"   - status: status"},{"line_number":841,"context_line":"   - updated_at: updated_at"},{"line_number":842,"context_line":"   - virtual_size: virtual_size"},{"line_number":843,"context_line":"   - visibility: visibility"},{"line_number":844,"context_line":""},{"line_number":845,"context_line":""},{"line_number":846,"context_line":""}],"source_content_type":"text/x-c++src","patch_set":14,"id":"18b5717e_a4f2abd7","line":843,"in_reply_to":"86bd61c4_c7720f89","updated":"2023-05-17 18:06:54.000000000","message":"TBH I\u0027m not sure how glance is structured.\nThe old location API is nothing but image-update API serving multiple functionalities hence image-update returning the whole image attributes doesn\u0027t sound completely wrong.\n\nRegarding locations, this is embedded in the image attributes and should be abstracted from end users so technically it\u0027s not a separate resource but part of the image. That\u0027s why i think it was made part of the image-update call originally.\n\nComing to the new location APIs, these are surely new APIs and doesn\u0027t have to follow any predefined structure but again, there is no distinction of a location from the image apart from the DB record.\n\nTaking a cinder example, We\u0027ve volume as a resource and volume type as a separate/independent resource. Surely, volume type helps volume get scheduled in an appropriate backend and has no usage of it\u0027s own but we\u0027ve separate APIs, OVOs etc for both and treat volume type as an independent resource.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"}],"api-ref/source/v2/images-parameters.yaml":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":743,"context_line":"do-secure-hash-in-request:"},{"line_number":744,"context_line":"  description: |"},{"line_number":745,"context_line":"    A boolean value which will tell the API whether to calculate the"},{"line_number":746,"context_line":"    checksum or not.Valid value is ``true`` or ``false``."},{"line_number":747,"context_line":"    Default is ``false``."},{"line_number":748,"context_line":"  in: body"},{"line_number":749,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"5a4cb102_52c04391","line":746,"range":{"start_line":746,"start_character":4,"end_line":746,"end_character":13},"updated":"2023-05-08 09:17:40.000000000","message":"checksum and hash","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":743,"context_line":"do-secure-hash-in-request:"},{"line_number":744,"context_line":"  description: |"},{"line_number":745,"context_line":"    A boolean value which will tell the API whether to calculate the"},{"line_number":746,"context_line":"    checksum or not.Valid value is ``true`` or ``false``."},{"line_number":747,"context_line":"    Default is ``false``."},{"line_number":748,"context_line":"  in: body"},{"line_number":749,"context_line":"  required: false"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"9ff6782d_ccc8b173","line":746,"range":{"start_line":746,"start_character":4,"end_line":746,"end_character":13},"in_reply_to":"5a4cb102_52c04391","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"c5e78d4048b430daa9c457d353cf26e726fdbf73","unresolved":true,"context_lines":[{"line_number":764,"context_line":"  in: body"},{"line_number":765,"context_line":"  required: false"},{"line_number":766,"context_line":"  type: string"},{"line_number":767,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"7a926bd3_c2cd26c2","line":767,"updated":"2023-05-11 16:02:07.000000000","message":"Remove this added line:)","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":764,"context_line":"  in: body"},{"line_number":765,"context_line":"  required: false"},{"line_number":766,"context_line":"  type: string"},{"line_number":767,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":9,"id":"ba7b3e3f_25c26e0f","line":767,"in_reply_to":"7a926bd3_c2cd26c2","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":723,"context_line":"validation-data-in-request:"},{"line_number":724,"context_line":"  description: |"},{"line_number":725,"context_line":"    A image metadata in key:value pairs containing values of ``checksum``,"},{"line_number":726,"context_line":"    ``os_hash_value`` and ``os_hash_algo`` and add it to the image."},{"line_number":727,"context_line":"    If ``do_secure_hash`` is not passed then it is the responsiblity of"},{"line_number":728,"context_line":"    the consumer of location add API to provide the correct values in"},{"line_number":729,"context_line":"    ``validation_data``\u0027"}],"source_content_type":"text/x-yaml","patch_set":14,"id":"12f1ad2c_eeb9a780","line":726,"range":{"start_line":726,"start_character":43,"end_line":726,"end_character":66},"updated":"2023-05-17 15:54:23.000000000","message":"Do you mean \"to be added to the image\"?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"}],"api-ref/source/v2/samples/add-location-request.json":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"url\": \"cinder://lvmdriver-1/39e6ffab-7502-4199-9609-416601615ca3\","},{"line_number":3,"context_line":"    \"do_secure_hash\": \"False\","},{"line_number":4,"context_line":"    \"validation_data\": \"{}\""},{"line_number":5,"context_line":"}"}],"source_content_type":"application/json","patch_set":7,"id":"cbef9cca_07448e1c","line":4,"range":{"start_line":4,"start_character":24,"end_line":4,"end_character":26},"updated":"2023-05-10 01:42:43.000000000","message":"should have validation data in example?","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":1,"context_line":"{"},{"line_number":2,"context_line":"    \"url\": \"cinder://lvmdriver-1/39e6ffab-7502-4199-9609-416601615ca3\","},{"line_number":3,"context_line":"    \"do_secure_hash\": \"False\","},{"line_number":4,"context_line":"    \"validation_data\": \"{}\""},{"line_number":5,"context_line":"}"}],"source_content_type":"application/json","patch_set":7,"id":"496ef551_68bd407a","line":4,"range":{"start_line":4,"start_character":24,"end_line":4,"end_character":26},"in_reply_to":"cbef9cca_07448e1c","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"}],"glance/api/middleware/version_negotiation.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":92,"context_line":"            allowed_versions[\u0027v2.11\u0027] \u003d 2"},{"line_number":93,"context_line":"            allowed_versions[\u0027v2.12\u0027] \u003d 2"},{"line_number":94,"context_line":"            allowed_versions[\u0027v2.13\u0027] \u003d 2"},{"line_number":95,"context_line":"            allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":96,"context_line":"        allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":97,"context_line":"        return allowed_versions"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _match_version_string(self, subject):"}],"source_content_type":"text/x-python","patch_set":5,"id":"8cc56fe8_1728ccf5","line":96,"range":{"start_line":95,"start_character":12,"end_line":96,"end_character":37},"updated":"2023-05-08 09:17:40.000000000","message":"why two times?","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":true,"context_lines":[{"line_number":92,"context_line":"            allowed_versions[\u0027v2.11\u0027] \u003d 2"},{"line_number":93,"context_line":"            allowed_versions[\u0027v2.12\u0027] \u003d 2"},{"line_number":94,"context_line":"            allowed_versions[\u0027v2.13\u0027] \u003d 2"},{"line_number":95,"context_line":"            allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":96,"context_line":"        allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":97,"context_line":"        return allowed_versions"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _match_version_string(self, subject):"}],"source_content_type":"text/x-python","patch_set":5,"id":"98af72ed_3bd8c542","line":96,"range":{"start_line":95,"start_character":12,"end_line":96,"end_character":37},"in_reply_to":"8cc56fe8_1728ccf5","updated":"2023-05-09 13:43:44.000000000","message":"removed","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":92,"context_line":"            allowed_versions[\u0027v2.11\u0027] \u003d 2"},{"line_number":93,"context_line":"            allowed_versions[\u0027v2.12\u0027] \u003d 2"},{"line_number":94,"context_line":"            allowed_versions[\u0027v2.13\u0027] \u003d 2"},{"line_number":95,"context_line":"            allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":96,"context_line":"        allowed_versions[\u0027v2.17\u0027] \u003d 2"},{"line_number":97,"context_line":"        return allowed_versions"},{"line_number":98,"context_line":""},{"line_number":99,"context_line":"    def _match_version_string(self, subject):"}],"source_content_type":"text/x-python","patch_set":5,"id":"303ffc17_226a5009","line":96,"range":{"start_line":95,"start_character":12,"end_line":96,"end_character":37},"in_reply_to":"98af72ed_3bd8c542","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"}],"glance/api/v2/images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1121,"context_line":"                                                self.policy)"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"            api_pol.add_location()"},{"line_number":1124,"context_line":"            if image.status !\u003d \u0027queued\u0027:"},{"line_number":1125,"context_line":"                msg \u003d _(\"It\u0027s not allowed to add locations if image status is \""},{"line_number":1126,"context_line":"                        \"%s.\") % image.status"},{"line_number":1127,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"            # NOTE(pdeore): get glance store based on location uri"},{"line_number":1130,"context_line":"            updated_location[\u0027url\u0027] \u003d url"}],"source_content_type":"text/x-python","patch_set":5,"id":"7beb204d_e4527792","line":1127,"range":{"start_line":1124,"start_character":12,"end_line":1127,"end_character":61},"updated":"2023-05-08 09:17:40.000000000","message":"I think this check should be moved before line 1120 before policy enforcement.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1121,"context_line":"                                                self.policy)"},{"line_number":1122,"context_line":""},{"line_number":1123,"context_line":"            api_pol.add_location()"},{"line_number":1124,"context_line":"            if image.status !\u003d \u0027queued\u0027:"},{"line_number":1125,"context_line":"                msg \u003d _(\"It\u0027s not allowed to add locations if image status is \""},{"line_number":1126,"context_line":"                        \"%s.\") % image.status"},{"line_number":1127,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"            # NOTE(pdeore): get glance store based on location uri"},{"line_number":1130,"context_line":"            updated_location[\u0027url\u0027] \u003d url"}],"source_content_type":"text/x-python","patch_set":5,"id":"adc0e5fe_cdf0e7b1","line":1127,"range":{"start_line":1124,"start_character":12,"end_line":1127,"end_character":61},"in_reply_to":"7beb204d_e4527792","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1126,"context_line":"                        \"%s.\") % image.status"},{"line_number":1127,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"            # NOTE(pdeore): get glance store based on location uri"},{"line_number":1130,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1131,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1132,"context_line":"            updated_location[\u0027metadata\u0027] \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"ca189b83_8a45409e","line":1129,"range":{"start_line":1129,"start_character":12,"end_line":1129,"end_character":66},"updated":"2023-05-08 09:17:40.000000000","message":"I think this is not happening here.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1126,"context_line":"                        \"%s.\") % image.status"},{"line_number":1127,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1128,"context_line":""},{"line_number":1129,"context_line":"            # NOTE(pdeore): get glance store based on location uri"},{"line_number":1130,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1131,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1132,"context_line":"            updated_location[\u0027metadata\u0027] \u003d {}"}],"source_content_type":"text/x-python","patch_set":5,"id":"8e8e4a6b_dcbeecf2","line":1129,"range":{"start_line":1129,"start_character":12,"end_line":1129,"end_character":66},"in_reply_to":"ca189b83_8a45409e","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1137,"context_line":"            image.locations.append(updated_location)"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"            if do_secure_hash:"},{"line_number":1140,"context_line":"                hashing_algo \u003d CONF[\u0027hashing_algorithm\u0027]"},{"line_number":1141,"context_line":"                current_os_hash_value \u003d hashlib.new(str(hashing_algo))"},{"line_number":1142,"context_line":"                current_checksum \u003d md5(usedforsecurity\u003dFalse)"},{"line_number":1143,"context_line":"                for chunk in image.get_data():"}],"source_content_type":"text/x-python","patch_set":5,"id":"e9047637_3353aa12","line":1140,"range":{"start_line":1140,"start_character":31,"end_line":1140,"end_character":56},"updated":"2023-05-08 09:17:40.000000000","message":"what if os_hash_algo passed in request body?","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1137,"context_line":"            image.locations.append(updated_location)"},{"line_number":1138,"context_line":""},{"line_number":1139,"context_line":"            if do_secure_hash:"},{"line_number":1140,"context_line":"                hashing_algo \u003d CONF[\u0027hashing_algorithm\u0027]"},{"line_number":1141,"context_line":"                current_os_hash_value \u003d hashlib.new(str(hashing_algo))"},{"line_number":1142,"context_line":"                current_checksum \u003d md5(usedforsecurity\u003dFalse)"},{"line_number":1143,"context_line":"                for chunk in image.get_data():"}],"source_content_type":"text/x-python","patch_set":5,"id":"e4de690e_63307263","line":1140,"range":{"start_line":1140,"start_character":31,"end_line":1140,"end_character":56},"in_reply_to":"e9047637_3353aa12","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1155,"context_line":"                value[\u0027validation_data\u0027] \u003d validation_data"},{"line_number":1156,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1157,"context_line":"                                                          [value])"},{"line_number":1158,"context_line":"            if image.status \u003d\u003d \u0027queued\u0027:"},{"line_number":1159,"context_line":"                if val_data:"},{"line_number":1160,"context_line":"                    for k, v in val_data.items():"},{"line_number":1161,"context_line":"                        setattr(image, k, v)"}],"source_content_type":"text/x-python","patch_set":5,"id":"bd722f93_3cdee337","line":1158,"range":{"start_line":1158,"start_character":12,"end_line":1158,"end_character":40},"updated":"2023-05-08 09:17:40.000000000","message":"this condition is not required.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"                value[\u0027validation_data\u0027] \u003d validation_data"},{"line_number":1156,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1157,"context_line":"                                                          [value])"},{"line_number":1158,"context_line":"            if image.status \u003d\u003d \u0027queued\u0027:"},{"line_number":1159,"context_line":"                if val_data:"},{"line_number":1160,"context_line":"                    for k, v in val_data.items():"},{"line_number":1161,"context_line":"                        setattr(image, k, v)"}],"source_content_type":"text/x-python","patch_set":5,"id":"5df70051_5188c81a","line":1158,"range":{"start_line":1158,"start_character":12,"end_line":1158,"end_character":40},"in_reply_to":"bd722f93_3cdee337","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1165,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1166,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"},{"line_number":1167,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1168,"context_line":"        except exception.Forbidden as e:"},{"line_number":1169,"context_line":"            LOG.debug(\"User not permitted to add location image \u0027%s\u0027\","},{"line_number":1170,"context_line":"                      image_id)"},{"line_number":1171,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1172,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"b7acee6e_4a75de9b","line":1169,"range":{"start_line":1168,"start_character":40,"end_line":1169,"end_character":45},"updated":"2023-05-08 09:17:40.000000000","message":"add location to image.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1165,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1166,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"},{"line_number":1167,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1168,"context_line":"        except exception.Forbidden as e:"},{"line_number":1169,"context_line":"            LOG.debug(\"User not permitted to add location image \u0027%s\u0027\","},{"line_number":1170,"context_line":"                      image_id)"},{"line_number":1171,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1172,"context_line":"        except exception.NotAuthenticated as e:"}],"source_content_type":"text/x-python","patch_set":5,"id":"5d30435a_d7902d50","line":1169,"range":{"start_line":1168,"start_character":40,"end_line":1169,"end_character":45},"in_reply_to":"b7acee6e_4a75de9b","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1172,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":1173,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":1174,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as e:"},{"line_number":1175,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1176,"context_line":"        except ValueError as e:    # update image status failed."},{"line_number":1177,"context_line":"            raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":5,"id":"1ef2e7a7_82670d8c","line":1174,"range":{"start_line":1174,"start_character":39,"end_line":1174,"end_character":66},"updated":"2023-05-08 09:17:40.000000000","message":"I am doubtful that this case will ever occur since we are allowing addition of location only to images which are in queued state.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1172,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":1173,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":1174,"context_line":"        except (exception.BadStoreUri, exception.DuplicateLocation) as e:"},{"line_number":1175,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1176,"context_line":"        except ValueError as e:    # update image status failed."},{"line_number":1177,"context_line":"            raise webob.exc.HTTPBadRequest("}],"source_content_type":"text/x-python","patch_set":5,"id":"68847c03_9f002d04","line":1174,"range":{"start_line":1174,"start_character":39,"end_line":1174,"end_character":66},"in_reply_to":"1ef2e7a7_82670d8c","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":980,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":981,"context_line":"        supported_hash_algo_values \u003d (\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027,"},{"line_number":982,"context_line":"                                      \u0027sha384\u0027, \u0027sha512\u0027)"},{"line_number":983,"context_line":"        if (hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027] or"},{"line_number":984,"context_line":"                hash_algo not in supported_hash_algo_values):"},{"line_number":985,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":986,"context_line":"                   {\u0027want\u0027: supported_hash_algo_values, \u0027got\u0027: hash_algo})"},{"line_number":987,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"19cb77d3_efc0bacb","line":984,"range":{"start_line":983,"start_character":8,"end_line":984,"end_character":61},"updated":"2023-05-10 01:42:43.000000000","message":"I think this will always fail if\nhashing_algo in glance conf is sha512 and we pass os_hash_algo other than sha512\n\nWe don\u0027t want this, we want that if os_hash_algo is present in request then just check whether it is supported value or not.\n\n\nAlso this will break backward compatibility for old location API","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":980,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":981,"context_line":"        supported_hash_algo_values \u003d (\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027,"},{"line_number":982,"context_line":"                                      \u0027sha384\u0027, \u0027sha512\u0027)"},{"line_number":983,"context_line":"        if (hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027] or"},{"line_number":984,"context_line":"                hash_algo not in supported_hash_algo_values):"},{"line_number":985,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":986,"context_line":"                   {\u0027want\u0027: supported_hash_algo_values, \u0027got\u0027: hash_algo})"},{"line_number":987,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":7,"id":"c9af714d_68a29d09","line":984,"range":{"start_line":983,"start_character":8,"end_line":984,"end_character":61},"in_reply_to":"19cb77d3_efc0bacb","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":1134,"context_line":"                value[\u0027validation_data\u0027] \u003d validation_data"},{"line_number":1135,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1136,"context_line":"                                                          [value])"},{"line_number":1137,"context_line":"            if validation_data:"},{"line_number":1138,"context_line":"                if validation_data[\u0027os_hash_algo\u0027]:"},{"line_number":1139,"context_line":"                    hashing_algo \u003d validation_data[\u0027os_hash_algo\u0027]"},{"line_number":1140,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"2083bb6e_0c910f01","line":1137,"range":{"start_line":1137,"start_character":12,"end_line":1137,"end_character":31},"updated":"2023-05-10 01:42:43.000000000","message":"you can avoid this if condition","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":1134,"context_line":"                value[\u0027validation_data\u0027] \u003d validation_data"},{"line_number":1135,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1136,"context_line":"                                                          [value])"},{"line_number":1137,"context_line":"            if validation_data:"},{"line_number":1138,"context_line":"                if validation_data[\u0027os_hash_algo\u0027]:"},{"line_number":1139,"context_line":"                    hashing_algo \u003d validation_data[\u0027os_hash_algo\u0027]"},{"line_number":1140,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"534dde41_c6a6d69c","line":1137,"range":{"start_line":1137,"start_character":12,"end_line":1137,"end_character":31},"in_reply_to":"2083bb6e_0c910f01","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":1646,"context_line":"        if not isinstance(body, dict):"},{"line_number":1647,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1648,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"        supported_location_api_parameters \u003d (\u0027url\u0027, \u0027do_secure_hash\u0027,"},{"line_number":1651,"context_line":"                                             \u0027validation_data\u0027)"},{"line_number":1652,"context_line":"        validation_data_values \u003d (\u0027checksum\u0027, \u0027os_hash_algo\u0027, \u0027os_hash_value\u0027)"},{"line_number":1653,"context_line":"        for key, value in body.items():"},{"line_number":1654,"context_line":"            if key not in supported_location_api_parameters:"},{"line_number":1655,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 parameter to add location api.\") % key"},{"line_number":1656,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1657,"context_line":"            if key \u003d\u003d \u0027do_secure_hash\u0027 and (not isinstance(value, bool)):"},{"line_number":1658,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 value passed.\") % key"},{"line_number":1659,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1660,"context_line":"            if key \u003d\u003d \u0027validation_data\u0027:"},{"line_number":1661,"context_line":"                if not isinstance(value, dict):"},{"line_number":1662,"context_line":"                    msg \u003d _(\"Invalid \u0027%s\u0027 value passed.\") % key"},{"line_number":1663,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1664,"context_line":"                for k, v in value.items():"},{"line_number":1665,"context_line":"                    if k not in (validation_data_values):"},{"line_number":1666,"context_line":"                        msg \u003d _(\"Provided values in (%s) doesn\u0027t match with\""},{"line_number":1667,"context_line":"                                \" (%s)\") % (key, validation_data_values)"},{"line_number":1668,"context_line":"                        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1669,"context_line":""},{"line_number":1670,"context_line":"        return body"},{"line_number":1671,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"d9dc9200_1f5bfa25","line":1668,"range":{"start_line":1649,"start_character":0,"end_line":1668,"end_character":71},"updated":"2023-05-10 01:42:43.000000000","message":"I think its better to use schema here.","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":1646,"context_line":"        if not isinstance(body, dict):"},{"line_number":1647,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1648,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1649,"context_line":""},{"line_number":1650,"context_line":"        supported_location_api_parameters \u003d (\u0027url\u0027, \u0027do_secure_hash\u0027,"},{"line_number":1651,"context_line":"                                             \u0027validation_data\u0027)"},{"line_number":1652,"context_line":"        validation_data_values \u003d (\u0027checksum\u0027, \u0027os_hash_algo\u0027, \u0027os_hash_value\u0027)"},{"line_number":1653,"context_line":"        for key, value in body.items():"},{"line_number":1654,"context_line":"            if key not in supported_location_api_parameters:"},{"line_number":1655,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 parameter to add location api.\") % key"},{"line_number":1656,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1657,"context_line":"            if key \u003d\u003d \u0027do_secure_hash\u0027 and (not isinstance(value, bool)):"},{"line_number":1658,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 value passed.\") % key"},{"line_number":1659,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1660,"context_line":"            if key \u003d\u003d \u0027validation_data\u0027:"},{"line_number":1661,"context_line":"                if not isinstance(value, dict):"},{"line_number":1662,"context_line":"                    msg \u003d _(\"Invalid \u0027%s\u0027 value passed.\") % key"},{"line_number":1663,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1664,"context_line":"                for k, v in value.items():"},{"line_number":1665,"context_line":"                    if k not in (validation_data_values):"},{"line_number":1666,"context_line":"                        msg \u003d _(\"Provided values in (%s) doesn\u0027t match with\""},{"line_number":1667,"context_line":"                                \" (%s)\") % (key, validation_data_values)"},{"line_number":1668,"context_line":"                        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1669,"context_line":""},{"line_number":1670,"context_line":"        return body"},{"line_number":1671,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"f4983ed4_274d1c78","line":1668,"range":{"start_line":1649,"start_character":0,"end_line":1668,"end_character":71},"in_reply_to":"d9dc9200_1f5bfa25","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923719ce65903ff710264103d583009621666a63","unresolved":true,"context_lines":[{"line_number":978,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":979,"context_line":""},{"line_number":980,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":981,"context_line":"        supported_hash_algo_values \u003d (\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027,"},{"line_number":982,"context_line":"                                      \u0027sha384\u0027, \u0027sha512\u0027)"},{"line_number":983,"context_line":"        if new_add_loc and hash_algo:"},{"line_number":984,"context_line":"            if hash_algo not in supported_hash_algo_values:"},{"line_number":985,"context_line":"                msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":986,"context_line":"                       {\u0027want\u0027: supported_hash_algo_values, \u0027got\u0027: hash_algo})"},{"line_number":987,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":988,"context_line":"        elif hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027]:"},{"line_number":989,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":990,"context_line":"                   {\u0027want\u0027: CONF[\u0027hashing_algorithm\u0027], \u0027got\u0027: hash_algo})"}],"source_content_type":"text/x-python","patch_set":8,"id":"b9a7aa49_9d959ea7","line":987,"range":{"start_line":981,"start_character":8,"end_line":987,"end_character":61},"updated":"2023-05-10 16:14:12.000000000","message":"I think making this method complicated either you should make this validation part of schema or move it to new method and call it before this method call.","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":979,"context_line":""},{"line_number":980,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":981,"context_line":"        supported_hash_algo_values \u003d (\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027,"},{"line_number":982,"context_line":"                                      \u0027sha384\u0027, \u0027sha512\u0027)"},{"line_number":983,"context_line":"        if new_add_loc and hash_algo:"},{"line_number":984,"context_line":"            if hash_algo not in supported_hash_algo_values:"},{"line_number":985,"context_line":"                msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":986,"context_line":"                       {\u0027want\u0027: supported_hash_algo_values, \u0027got\u0027: hash_algo})"},{"line_number":987,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":988,"context_line":"        elif hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027]:"},{"line_number":989,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":990,"context_line":"                   {\u0027want\u0027: CONF[\u0027hashing_algorithm\u0027], \u0027got\u0027: hash_algo})"}],"source_content_type":"text/x-python","patch_set":8,"id":"723d589f_d8b86dac","line":987,"range":{"start_line":981,"start_character":8,"end_line":987,"end_character":61},"in_reply_to":"b9a7aa49_9d959ea7","updated":"2023-05-11 10:21:45.000000000","message":"Done","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923719ce65903ff710264103d583009621666a63","unresolved":true,"context_lines":[{"line_number":1139,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1140,"context_line":"                                                          [value],"},{"line_number":1141,"context_line":"                                                          new_add_loc\u003dTrue)"},{"line_number":1142,"context_line":"            if validation_data:"},{"line_number":1143,"context_line":"                hashing_algo \u003d validation_data[\u0027os_hash_algo\u0027]"},{"line_number":1144,"context_line":"            else:"},{"line_number":1145,"context_line":"                hashing_algo \u003d CONF[\u0027hashing_algorithm\u0027]"},{"line_number":1146,"context_line":""},{"line_number":1147,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1148,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"a0c157ad_20612934","line":1145,"range":{"start_line":1142,"start_character":12,"end_line":1145,"end_character":56},"updated":"2023-05-10 16:14:12.000000000","message":"simply write\nhashing_algo \u003d validation_data.get(\"os_hash_algo\", CONF[\u0027hashing_algorithm\u0027])","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[{"line_number":1139,"context_line":"                val_data \u003d self._validate_validation_data(image,"},{"line_number":1140,"context_line":"                                                          [value],"},{"line_number":1141,"context_line":"                                                          new_add_loc\u003dTrue)"},{"line_number":1142,"context_line":"            if validation_data:"},{"line_number":1143,"context_line":"                hashing_algo \u003d validation_data[\u0027os_hash_algo\u0027]"},{"line_number":1144,"context_line":"            else:"},{"line_number":1145,"context_line":"                hashing_algo \u003d CONF[\u0027hashing_algorithm\u0027]"},{"line_number":1146,"context_line":""},{"line_number":1147,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1148,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"}],"source_content_type":"text/x-python","patch_set":8,"id":"ee2535ae_4805b516","line":1145,"range":{"start_line":1142,"start_character":12,"end_line":1145,"end_character":56},"in_reply_to":"a0c157ad_20612934","updated":"2023-05-11 10:21:45.000000000","message":"Done","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923719ce65903ff710264103d583009621666a63","unresolved":true,"context_lines":[{"line_number":1651,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1652,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1653,"context_line":""},{"line_number":1654,"context_line":"        supported_location_api_parameters \u003d (\u0027url\u0027, \u0027do_secure_hash\u0027,"},{"line_number":1655,"context_line":"                                             \u0027validation_data\u0027)"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":"        for key, value in body.items():"},{"line_number":1658,"context_line":"            if key not in supported_location_api_parameters:"},{"line_number":1659,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 parameter to add location api.\") % key"},{"line_number":1660,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1661,"context_line":""},{"line_number":1662,"context_line":"        try:"},{"line_number":1663,"context_line":"            self.schema.validate(body)"},{"line_number":1664,"context_line":"        except exception.InvalidObject as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"53780204_d3cff5d3","line":1661,"range":{"start_line":1654,"start_character":8,"end_line":1661,"end_character":0},"updated":"2023-05-10 16:14:12.000000000","message":"I think this also should be taken care using schema","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[{"line_number":1651,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1652,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1653,"context_line":""},{"line_number":1654,"context_line":"        supported_location_api_parameters \u003d (\u0027url\u0027, \u0027do_secure_hash\u0027,"},{"line_number":1655,"context_line":"                                             \u0027validation_data\u0027)"},{"line_number":1656,"context_line":""},{"line_number":1657,"context_line":"        for key, value in body.items():"},{"line_number":1658,"context_line":"            if key not in supported_location_api_parameters:"},{"line_number":1659,"context_line":"                msg \u003d _(\"Invalid \u0027%s\u0027 parameter to add location api.\") % key"},{"line_number":1660,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1661,"context_line":""},{"line_number":1662,"context_line":"        try:"},{"line_number":1663,"context_line":"            self.schema.validate(body)"},{"line_number":1664,"context_line":"        except exception.InvalidObject as e:"}],"source_content_type":"text/x-python","patch_set":8,"id":"d40d3456_334a2ca7","line":1661,"range":{"start_line":1654,"start_character":8,"end_line":1661,"end_character":0},"in_reply_to":"53780204_d3cff5d3","updated":"2023-05-11 10:21:45.000000000","message":"Done","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923719ce65903ff710264103d583009621666a63","unresolved":true,"context_lines":[{"line_number":1755,"context_line":"        except exception.Forbidden as e:"},{"line_number":1756,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1757,"context_line":""},{"line_number":1758,"context_line":"    def _format_image_new_add_location(self, image):"},{"line_number":1759,"context_line":"        image_view \u003d {k: v for k, v in dict(image.extra_properties).items()"},{"line_number":1760,"context_line":"                      if k not in self._hidden_properties}"},{"line_number":1761,"context_line":"        attributes \u003d [\u0027name\u0027, \u0027disk_format\u0027, \u0027container_format\u0027,"},{"line_number":1762,"context_line":"                      \u0027visibility\u0027, \u0027size\u0027, \u0027virtual_size\u0027, \u0027status\u0027,"},{"line_number":1763,"context_line":"                      \u0027checksum\u0027, \u0027protected\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":1764,"context_line":"                      \u0027owner\u0027, \u0027os_hidden\u0027, \u0027os_hash_algo\u0027,"},{"line_number":1765,"context_line":"                      \u0027os_hash_value\u0027]"},{"line_number":1766,"context_line":"        for key in attributes:"},{"line_number":1767,"context_line":"            image_view[key] \u003d getattr(image, key)"},{"line_number":1768,"context_line":"        image_view[\u0027id\u0027] \u003d image.image_id"},{"line_number":1769,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":1770,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":1771,"context_line":""},{"line_number":1772,"context_line":"        # add store information to image"},{"line_number":1773,"context_line":"        if CONF.enabled_backends:"},{"line_number":1774,"context_line":"            locations \u003d list(image.locations)"},{"line_number":1775,"context_line":"            if locations:"},{"line_number":1776,"context_line":"                stores \u003d []"},{"line_number":1777,"context_line":"                for loc in locations:"},{"line_number":1778,"context_line":"                    backend \u003d loc[\u0027metadata\u0027].get(\u0027store\u0027)"},{"line_number":1779,"context_line":"                    if backend:"},{"line_number":1780,"context_line":"                        stores.append(backend)"},{"line_number":1781,"context_line":""},{"line_number":1782,"context_line":"                if stores:"},{"line_number":1783,"context_line":"                    image_view[\u0027stores\u0027] \u003d \",\".join(stores)"},{"line_number":1784,"context_line":""},{"line_number":1785,"context_line":"        return image_view"},{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    def create(self, response, image):"},{"line_number":1788,"context_line":"        response.status_int \u003d http.CREATED"}],"source_content_type":"text/x-python","patch_set":8,"id":"89344498_9174bd28","line":1785,"range":{"start_line":1758,"start_character":4,"end_line":1785,"end_character":25},"updated":"2023-05-10 16:14:12.000000000","message":"I don\u0027t think there is any need to write this new method at all","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[{"line_number":1755,"context_line":"        except exception.Forbidden as e:"},{"line_number":1756,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1757,"context_line":""},{"line_number":1758,"context_line":"    def _format_image_new_add_location(self, image):"},{"line_number":1759,"context_line":"        image_view \u003d {k: v for k, v in dict(image.extra_properties).items()"},{"line_number":1760,"context_line":"                      if k not in self._hidden_properties}"},{"line_number":1761,"context_line":"        attributes \u003d [\u0027name\u0027, \u0027disk_format\u0027, \u0027container_format\u0027,"},{"line_number":1762,"context_line":"                      \u0027visibility\u0027, \u0027size\u0027, \u0027virtual_size\u0027, \u0027status\u0027,"},{"line_number":1763,"context_line":"                      \u0027checksum\u0027, \u0027protected\u0027, \u0027min_ram\u0027, \u0027min_disk\u0027,"},{"line_number":1764,"context_line":"                      \u0027owner\u0027, \u0027os_hidden\u0027, \u0027os_hash_algo\u0027,"},{"line_number":1765,"context_line":"                      \u0027os_hash_value\u0027]"},{"line_number":1766,"context_line":"        for key in attributes:"},{"line_number":1767,"context_line":"            image_view[key] \u003d getattr(image, key)"},{"line_number":1768,"context_line":"        image_view[\u0027id\u0027] \u003d image.image_id"},{"line_number":1769,"context_line":"        image_view[\u0027created_at\u0027] \u003d timeutils.isotime(image.created_at)"},{"line_number":1770,"context_line":"        image_view[\u0027updated_at\u0027] \u003d timeutils.isotime(image.updated_at)"},{"line_number":1771,"context_line":""},{"line_number":1772,"context_line":"        # add store information to image"},{"line_number":1773,"context_line":"        if CONF.enabled_backends:"},{"line_number":1774,"context_line":"            locations \u003d list(image.locations)"},{"line_number":1775,"context_line":"            if locations:"},{"line_number":1776,"context_line":"                stores \u003d []"},{"line_number":1777,"context_line":"                for loc in locations:"},{"line_number":1778,"context_line":"                    backend \u003d loc[\u0027metadata\u0027].get(\u0027store\u0027)"},{"line_number":1779,"context_line":"                    if backend:"},{"line_number":1780,"context_line":"                        stores.append(backend)"},{"line_number":1781,"context_line":""},{"line_number":1782,"context_line":"                if stores:"},{"line_number":1783,"context_line":"                    image_view[\u0027stores\u0027] \u003d \",\".join(stores)"},{"line_number":1784,"context_line":""},{"line_number":1785,"context_line":"        return image_view"},{"line_number":1786,"context_line":""},{"line_number":1787,"context_line":"    def create(self, response, image):"},{"line_number":1788,"context_line":"        response.status_int \u003d http.CREATED"}],"source_content_type":"text/x-python","patch_set":8,"id":"aafcce82_d4b7971a","line":1785,"range":{"start_line":1758,"start_character":4,"end_line":1785,"end_character":25},"in_reply_to":"89344498_9174bd28","updated":"2023-05-11 10:21:45.000000000","message":"Done","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"923719ce65903ff710264103d583009621666a63","unresolved":true,"context_lines":[{"line_number":1984,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1985,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1986,"context_line":"        },"},{"line_number":1987,"context_line":"        \u0027do_secure_hash\u0027: {"},{"line_number":1988,"context_line":"            \u0027type\u0027: \u0027boolean\u0027,"},{"line_number":1989,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1990,"context_line":"            \u0027desription\u0027: _(\u0027A boolean value which will tell the API whether \u0027"},{"line_number":1991,"context_line":"                            \u0027to calculate the checksum and hash or not.\u0027),"},{"line_number":1992,"context_line":"        },"},{"line_number":1993,"context_line":"        \u0027url\u0027: {"},{"line_number":1994,"context_line":"            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1995,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1996,"context_line":"            \u0027description\u0027: _(\u0027The URL of the new location to be added in \u0027"},{"line_number":1997,"context_line":"                             \u0027the image.\u0027)"},{"line_number":1998,"context_line":"        },"},{"line_number":1999,"context_line":"        \u0027validation_data\u0027: {"},{"line_number":2000,"context_line":"            \u0027description\u0027: _(\u0027Values to be used to populate the corresponding \u0027"},{"line_number":2001,"context_line":"                             \u0027image properties. If the image status is not \u0027"},{"line_number":2002,"context_line":"                             \u0027\\\u0027queued\\\u0027, values must exactly match those \u0027"},{"line_number":2003,"context_line":"                             \u0027already contained in the image properties.\u0027),"},{"line_number":2004,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":2005,"context_line":"            \u0027writeOnly\u0027: True,"},{"line_number":2006,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":2007,"context_line":"            \u0027properties\u0027: {"},{"line_number":2008,"context_line":"                \u0027checksum\u0027: {"},{"line_number":2009,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2010,"context_line":"                    \u0027minLength\u0027: 32,"},{"line_number":2011,"context_line":"                    \u0027maxLength\u0027: 32,"},{"line_number":2012,"context_line":"                },"},{"line_number":2013,"context_line":"                \u0027os_hash_algo\u0027: {"},{"line_number":2014,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2015,"context_line":"                    \u0027maxLength\u0027: 64,"},{"line_number":2016,"context_line":"                },"},{"line_number":2017,"context_line":"                \u0027os_hash_value\u0027: {"},{"line_number":2018,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2019,"context_line":"                    \u0027maxLength\u0027: 128,"},{"line_number":2020,"context_line":"                },"},{"line_number":2021,"context_line":"            },"},{"line_number":2022,"context_line":"            \u0027required\u0027: ["},{"line_number":2023,"context_line":"                \u0027os_hash_algo\u0027,"},{"line_number":2024,"context_line":"                \u0027os_hash_value\u0027,"},{"line_number":2025,"context_line":"            ],"},{"line_number":2026,"context_line":"        },"},{"line_number":2027,"context_line":"        \u0027locations\u0027: {"},{"line_number":2028,"context_line":"            \u0027type\u0027: \u0027array\u0027,"},{"line_number":2029,"context_line":"            \u0027items\u0027: {"}],"source_content_type":"text/x-python","patch_set":8,"id":"6e9b59b0_b07d72d3","line":2026,"range":{"start_line":1987,"start_character":8,"end_line":2026,"end_character":10},"updated":"2023-05-10 16:14:12.000000000","message":"I think you can create new schema similar to locations at line 2027\n\nHere you are adding it to base schema which is used for image creation.","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2036be81006edc6798ffd8177db01e9545d2ac6b","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1985,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1986,"context_line":"        },"},{"line_number":1987,"context_line":"        \u0027do_secure_hash\u0027: {"},{"line_number":1988,"context_line":"            \u0027type\u0027: \u0027boolean\u0027,"},{"line_number":1989,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1990,"context_line":"            \u0027desription\u0027: _(\u0027A boolean value which will tell the API whether \u0027"},{"line_number":1991,"context_line":"                            \u0027to calculate the checksum and hash or not.\u0027),"},{"line_number":1992,"context_line":"        },"},{"line_number":1993,"context_line":"        \u0027url\u0027: {"},{"line_number":1994,"context_line":"            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1995,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1996,"context_line":"            \u0027description\u0027: _(\u0027The URL of the new location to be added in \u0027"},{"line_number":1997,"context_line":"                             \u0027the image.\u0027)"},{"line_number":1998,"context_line":"        },"},{"line_number":1999,"context_line":"        \u0027validation_data\u0027: {"},{"line_number":2000,"context_line":"            \u0027description\u0027: _(\u0027Values to be used to populate the corresponding \u0027"},{"line_number":2001,"context_line":"                             \u0027image properties. If the image status is not \u0027"},{"line_number":2002,"context_line":"                             \u0027\\\u0027queued\\\u0027, values must exactly match those \u0027"},{"line_number":2003,"context_line":"                             \u0027already contained in the image properties.\u0027),"},{"line_number":2004,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":2005,"context_line":"            \u0027writeOnly\u0027: True,"},{"line_number":2006,"context_line":"            \u0027additionalProperties\u0027: False,"},{"line_number":2007,"context_line":"            \u0027properties\u0027: {"},{"line_number":2008,"context_line":"                \u0027checksum\u0027: {"},{"line_number":2009,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2010,"context_line":"                    \u0027minLength\u0027: 32,"},{"line_number":2011,"context_line":"                    \u0027maxLength\u0027: 32,"},{"line_number":2012,"context_line":"                },"},{"line_number":2013,"context_line":"                \u0027os_hash_algo\u0027: {"},{"line_number":2014,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2015,"context_line":"                    \u0027maxLength\u0027: 64,"},{"line_number":2016,"context_line":"                },"},{"line_number":2017,"context_line":"                \u0027os_hash_value\u0027: {"},{"line_number":2018,"context_line":"                    \u0027type\u0027: \u0027string\u0027,"},{"line_number":2019,"context_line":"                    \u0027maxLength\u0027: 128,"},{"line_number":2020,"context_line":"                },"},{"line_number":2021,"context_line":"            },"},{"line_number":2022,"context_line":"            \u0027required\u0027: ["},{"line_number":2023,"context_line":"                \u0027os_hash_algo\u0027,"},{"line_number":2024,"context_line":"                \u0027os_hash_value\u0027,"},{"line_number":2025,"context_line":"            ],"},{"line_number":2026,"context_line":"        },"},{"line_number":2027,"context_line":"        \u0027locations\u0027: {"},{"line_number":2028,"context_line":"            \u0027type\u0027: \u0027array\u0027,"},{"line_number":2029,"context_line":"            \u0027items\u0027: {"}],"source_content_type":"text/x-python","patch_set":8,"id":"bc0384ac_19fce7e9","line":2026,"range":{"start_line":1987,"start_character":8,"end_line":2026,"end_character":10},"in_reply_to":"6e9b59b0_b07d72d3","updated":"2023-05-11 10:21:45.000000000","message":"Done","commit_id":"2a8acd38929ecb97919d0cddb3e5b002b0d31ce9"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"c5e78d4048b430daa9c457d353cf26e726fdbf73","unresolved":true,"context_lines":[{"line_number":930,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":931,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    def _validate_val_data(self, new_val_data, new_add_loc\u003dFalse):"},{"line_number":934,"context_line":"        if not new_val_data:"},{"line_number":935,"context_line":"            return {}"},{"line_number":936,"context_line":"        if \u0027checksum\u0027 in new_val_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"38b86f1b_2c7207e2","line":933,"range":{"start_line":933,"start_character":65,"end_line":933,"end_character":66},"updated":"2023-05-11 16:02:07.000000000","message":"I  don\u0027t understand the purpose of new_add_loc. Also, new_val_data is a bit of a weird parameter name.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":930,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":931,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    def _validate_val_data(self, new_val_data, new_add_loc\u003dFalse):"},{"line_number":934,"context_line":"        if not new_val_data:"},{"line_number":935,"context_line":"            return {}"},{"line_number":936,"context_line":"        if \u0027checksum\u0027 in new_val_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"0cdae4ab_1e521aa5","line":933,"range":{"start_line":933,"start_character":65,"end_line":933,"end_character":66},"in_reply_to":"38b86f1b_2c7207e2","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":931,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    def _validate_val_data(self, new_val_data, new_add_loc\u003dFalse):"},{"line_number":934,"context_line":"        if not new_val_data:"},{"line_number":935,"context_line":"            return {}"},{"line_number":936,"context_line":"        if \u0027checksum\u0027 in new_val_data:"},{"line_number":937,"context_line":"            try:"},{"line_number":938,"context_line":"                checksum_bytes \u003d bytearray.fromhex(new_val_data[\u0027checksum\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"37f83bbc_eafd201c","line":935,"range":{"start_line":934,"start_character":8,"end_line":935,"end_character":21},"updated":"2023-05-11 15:02:42.000000000","message":"This check will never be true because you are already checking for None before calling this function. (line #1162)","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":931,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":932,"context_line":""},{"line_number":933,"context_line":"    def _validate_val_data(self, new_val_data, new_add_loc\u003dFalse):"},{"line_number":934,"context_line":"        if not new_val_data:"},{"line_number":935,"context_line":"            return {}"},{"line_number":936,"context_line":"        if \u0027checksum\u0027 in new_val_data:"},{"line_number":937,"context_line":"            try:"},{"line_number":938,"context_line":"                checksum_bytes \u003d bytearray.fromhex(new_val_data[\u0027checksum\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"4e932afc_4dd6f2c0","line":935,"range":{"start_line":934,"start_character":8,"end_line":935,"end_character":21},"in_reply_to":"37f83bbc_eafd201c","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":947,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":950,"context_line":"        if hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027] and not new_add_loc:"},{"line_number":951,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":952,"context_line":"                   {\u0027want\u0027: CONF[\u0027hashing_algorithm\u0027], \u0027got\u0027: hash_algo})"},{"line_number":953,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"        try:"},{"line_number":956,"context_line":"            hash_bytes \u003d bytearray.fromhex(new_val_data[\u0027os_hash_value\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"20a06ea8_e71a3796","line":953,"range":{"start_line":950,"start_character":8,"end_line":953,"end_character":57},"updated":"2023-05-11 15:02:42.000000000","message":"This condition will never occur because this function is called only from new location API atm.\n\nAlso we decided that if hash_algo is present in val data then it should take precedence over hashing algo set in CONF.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":947,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":948,"context_line":""},{"line_number":949,"context_line":"        hash_algo \u003d new_val_data.get(\u0027os_hash_algo\u0027)"},{"line_number":950,"context_line":"        if hash_algo !\u003d CONF[\u0027hashing_algorithm\u0027] and not new_add_loc:"},{"line_number":951,"context_line":"            msg \u003d (_(\"os_hash_algo must be (%(want)s), not (%(got)s)\") %"},{"line_number":952,"context_line":"                   {\u0027want\u0027: CONF[\u0027hashing_algorithm\u0027], \u0027got\u0027: hash_algo})"},{"line_number":953,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":954,"context_line":""},{"line_number":955,"context_line":"        try:"},{"line_number":956,"context_line":"            hash_bytes \u003d bytearray.fromhex(new_val_data[\u0027os_hash_value\u0027])"}],"source_content_type":"text/x-python","patch_set":9,"id":"d3ba86bc_b5035d4c","line":953,"range":{"start_line":950,"start_character":8,"end_line":953,"end_character":57},"in_reply_to":"20a06ea8_e71a3796","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":965,"context_line":"                   {\u0027value\u0027: new_val_data[\u0027os_hash_value\u0027],"},{"line_number":966,"context_line":"                    \u0027algo\u0027: hash_algo,"},{"line_number":967,"context_line":"                    \u0027want\u0027: want_size})"},{"line_number":968,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        return new_val_data"},{"line_number":971,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"3117d241_98a85b01","line":968,"updated":"2023-05-11 15:02:42.000000000","message":"I think we can redesign this function, will provide you sample and you can arrange it accordingly.\n\nSomething like,\n\n    def _validate_hashing_data(self, input):\n        keys \u003d [\u0027checksum\u0027, \u0027os_hash_value\u0027]\n        for key in hex_validation:\n            if key in input:\n                try:\n                    bytes \u003d bytearray.fromhex(input[key])\n                except ValueError:\n                    msg \u003d (_(\"\u0027%s\u0027 (%s) is not a valid hexadecimal value\") %\n                           (key, input[key]))\n                    raise webob.exc.HTTPConflict(explanation\u003dmsg)\n\n                # length validation\n                if key \u003d\u003d \u0027checksum\u0027 and len(bytes) !\u003d hex_validation[key]:\n                    msg \u003d (_(\"\u0027%s\u0027 (%s) is not the correct size for md5 \"\n                             \"(should be 16 bytes)\") %\n                           (key, new_val_data[\u0027checksum\u0027]))\n                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)\n                else:\n                    hash_algo \u003d input.get(\u0027os_hash_algo\u0027, CONF[\u0027hashing\u0027])\n                    want_size \u003d hashlib.new(hash_algo).digest_size\n                    if len(bytes) !\u003d want_size:\n                        msg \u003d (_(\"\u0027%(key)s\u0027 (%(value)s) is not the correct size for \"\n                                 \"%(algo)s (should be %(want)d bytes)\") %\n                               {\u0027key\u0027: key,\n                                \u0027value\u0027: input[key],\n                                \u0027algo\u0027: hash_algo,\n                                \u0027want\u0027: want_size})\n                        raise webob.exc.HTTPBadRequest(explanation\u003dmsg)","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":965,"context_line":"                   {\u0027value\u0027: new_val_data[\u0027os_hash_value\u0027],"},{"line_number":966,"context_line":"                    \u0027algo\u0027: hash_algo,"},{"line_number":967,"context_line":"                    \u0027want\u0027: want_size})"},{"line_number":968,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        return new_val_data"},{"line_number":971,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"71213caf_d81c4b6a","line":968,"in_reply_to":"3117d241_98a85b01","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":967,"context_line":"                    \u0027want\u0027: want_size})"},{"line_number":968,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        return new_val_data"},{"line_number":971,"context_line":""},{"line_number":972,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":973,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"98a73b03_16f9375f","line":970,"range":{"start_line":970,"start_character":8,"end_line":970,"end_character":27},"updated":"2023-05-11 15:02:42.000000000","message":"also as we are not doing any modifications to the input data don\u0027t need this return statement I guess","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":967,"context_line":"                    \u0027want\u0027: want_size})"},{"line_number":968,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"        return new_val_data"},{"line_number":971,"context_line":""},{"line_number":972,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":973,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":9,"id":"a7a92114_857c1c55","line":970,"range":{"start_line":970,"start_character":8,"end_line":970,"end_character":27},"in_reply_to":"98a73b03_16f9375f","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1002,"context_line":"            msg \u003d _(\"New value(s) for %s may only be provided when image \""},{"line_number":1003,"context_line":"                    \"status is \u0027queued\u0027\") % \u0027, \u0027.join(new_val_data.keys())"},{"line_number":1004,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1005,"context_line":"        return self._validate_val_data(new_val_data)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"    def _get_locations_op_pos(self, path_pos, max_pos, allow_max):"},{"line_number":1008,"context_line":"        if path_pos is None or max_pos is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"0157e630_67e8aaa1","line":1005,"range":{"start_line":1005,"start_character":0,"end_line":1005,"end_character":52},"updated":"2023-05-11 15:02:42.000000000","message":"What I wanted to say is keep this old function as it is as we don\u0027t need all code from this function and write a new one which should be called from new location api call only.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1002,"context_line":"            msg \u003d _(\"New value(s) for %s may only be provided when image \""},{"line_number":1003,"context_line":"                    \"status is \u0027queued\u0027\") % \u0027, \u0027.join(new_val_data.keys())"},{"line_number":1004,"context_line":"            raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1005,"context_line":"        return self._validate_val_data(new_val_data)"},{"line_number":1006,"context_line":""},{"line_number":1007,"context_line":"    def _get_locations_op_pos(self, path_pos, max_pos, allow_max):"},{"line_number":1008,"context_line":"        if path_pos is None or max_pos is None:"}],"source_content_type":"text/x-python","patch_set":9,"id":"3925a549_2d6b7b1e","line":1005,"range":{"start_line":1005,"start_character":0,"end_line":1005,"end_character":52},"in_reply_to":"0157e630_67e8aaa1","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"37c0647f891d856d0a168ca3731db0dbbb7778ee","unresolved":true,"context_lines":[{"line_number":1128,"context_line":"        image.os_hash_algo \u003d hashing_algo"},{"line_number":1129,"context_line":""},{"line_number":1130,"context_line":"        if val_data:"},{"line_number":1131,"context_line":"            if (val_data[\u0027checksum\u0027] and"},{"line_number":1132,"context_line":"                    val_data[\u0027checksum\u0027] !\u003d image.checksum):"},{"line_number":1133,"context_line":"                msg \u003d _(\"Checksum (%s) not matched with actual \""},{"line_number":1134,"context_line":"                        \"Checksum (%s)\") % (val_data[\u0027checksum\u0027],"},{"line_number":1135,"context_line":"                                            image.checksum)"},{"line_number":1136,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1137,"context_line":"            if (val_data[\u0027os_hash_value\u0027] and"},{"line_number":1138,"context_line":"                    val_data[\u0027os_hash_value\u0027] !\u003d image.os_hash_value):"},{"line_number":1139,"context_line":"                msg \u003d (_("},{"line_number":1140,"context_line":"                    \"os_hash_value (%s) not matched with actual \""},{"line_number":1141,"context_line":"                    \"os_hash_value (%s)\") %"},{"line_number":1142,"context_line":"                    (val_data[\u0027os_hash_value\u0027], image.os_hash_value))"},{"line_number":1143,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1146,"context_line":"                     validation_data\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"7fe4e547_8e52c1d7","line":1143,"range":{"start_line":1131,"start_character":12,"end_line":1143,"end_character":63},"updated":"2023-05-11 15:28:35.000000000","message":"I guess you can club this validation check as I have done in sample method above.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1128,"context_line":"        image.os_hash_algo \u003d hashing_algo"},{"line_number":1129,"context_line":""},{"line_number":1130,"context_line":"        if val_data:"},{"line_number":1131,"context_line":"            if (val_data[\u0027checksum\u0027] and"},{"line_number":1132,"context_line":"                    val_data[\u0027checksum\u0027] !\u003d image.checksum):"},{"line_number":1133,"context_line":"                msg \u003d _(\"Checksum (%s) not matched with actual \""},{"line_number":1134,"context_line":"                        \"Checksum (%s)\") % (val_data[\u0027checksum\u0027],"},{"line_number":1135,"context_line":"                                            image.checksum)"},{"line_number":1136,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1137,"context_line":"            if (val_data[\u0027os_hash_value\u0027] and"},{"line_number":1138,"context_line":"                    val_data[\u0027os_hash_value\u0027] !\u003d image.os_hash_value):"},{"line_number":1139,"context_line":"                msg \u003d (_("},{"line_number":1140,"context_line":"                    \"os_hash_value (%s) not matched with actual \""},{"line_number":1141,"context_line":"                    \"os_hash_value (%s)\") %"},{"line_number":1142,"context_line":"                    (val_data[\u0027os_hash_value\u0027], image.os_hash_value))"},{"line_number":1143,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1144,"context_line":""},{"line_number":1145,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1146,"context_line":"                     validation_data\u003dNone):"}],"source_content_type":"text/x-python","patch_set":9,"id":"976baf69_8e48830a","line":1143,"range":{"start_line":1131,"start_character":12,"end_line":1143,"end_character":63},"in_reply_to":"7fe4e547_8e52c1d7","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1156,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1157,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1158,"context_line":"                                                self.policy)"},{"line_number":1159,"context_line":""},{"line_number":1160,"context_line":"            api_pol.add_location()"},{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"            if validation_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"56207fba_f0de516b","line":1159,"updated":"2023-05-11 15:02:42.000000000","message":"nit: remove this blank line.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1157,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1158,"context_line":"                                                self.policy)"},{"line_number":1159,"context_line":""},{"line_number":1160,"context_line":"            api_pol.add_location()"},{"line_number":1161,"context_line":""},{"line_number":1162,"context_line":"            if validation_data:"}],"source_content_type":"text/x-python","patch_set":9,"id":"0b0d12cd_f24befb1","line":1159,"in_reply_to":"56207fba_f0de516b","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1166,"context_line":"            hashing_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":1167,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1170,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1171,"context_line":"            updated_location[\u0027metadata\u0027] \u003d {}"},{"line_number":1172,"context_line":"            if CONF.enabled_backends:"},{"line_number":1173,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1174,"context_line":"                    [updated_location])[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"bd1894d2_56d6ef51","line":1171,"range":{"start_line":1169,"start_character":12,"end_line":1171,"end_character":45},"updated":"2023-05-11 15:02:42.000000000","message":"You can define this at the top of the function it self.\nnew_location \u003d {\n    \u0027url\u0027: url,\n    \u0027metadata\u0027: {}\n}","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"c5e78d4048b430daa9c457d353cf26e726fdbf73","unresolved":true,"context_lines":[{"line_number":1166,"context_line":"            hashing_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":1167,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1170,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1171,"context_line":"            updated_location[\u0027metadata\u0027] \u003d {}"},{"line_number":1172,"context_line":"            if CONF.enabled_backends:"},{"line_number":1173,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1174,"context_line":"                    [updated_location])[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"de49c90e_db4e59c0","line":1171,"range":{"start_line":1169,"start_character":12,"end_line":1171,"end_character":45},"in_reply_to":"bd1894d2_56d6ef51","updated":"2023-05-11 16:02:07.000000000","message":"Or remove it from the top of the function. updated_location is only used at line 1176, so do:\n\nupdated_location \u003d {\n    \u0027url\u0027: url,\n    \u0027metadata\u0027: {},\n}\nif CONF.enabled_backends:\n    updated_location \u003d store_utils.get_updated_store_location([updated_location])[0]","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1166,"context_line":"            hashing_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":1167,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1168,"context_line":""},{"line_number":1169,"context_line":"            updated_location[\u0027url\u0027] \u003d url"},{"line_number":1170,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1171,"context_line":"            updated_location[\u0027metadata\u0027] \u003d {}"},{"line_number":1172,"context_line":"            if CONF.enabled_backends:"},{"line_number":1173,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1174,"context_line":"                    [updated_location])[0]"}],"source_content_type":"text/x-python","patch_set":9,"id":"df11f2ec_7a21dd32","line":1171,"range":{"start_line":1169,"start_character":12,"end_line":1171,"end_character":45},"in_reply_to":"de49c90e_db4e59c0","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"            image.locations.append(updated_location)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"            if do_secure_hash:"},{"line_number":1179,"context_line":"                self._calculate_checksum_and_hash(image, val_data,"},{"line_number":1180,"context_line":"                                                  hashing_algo)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            for k, v in val_data.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"f3687b8d_9b85e52b","line":1179,"range":{"start_line":1179,"start_character":21,"end_line":1179,"end_character":49},"updated":"2023-05-11 15:02:42.000000000","message":"you can rename it to _verify_checksum_and_hash or _set_checksum_and_hash, also retrieving hashing_algo (line 1166 can be moved inside this method).","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"            image.locations.append(updated_location)"},{"line_number":1177,"context_line":""},{"line_number":1178,"context_line":"            if do_secure_hash:"},{"line_number":1179,"context_line":"                self._calculate_checksum_and_hash(image, val_data,"},{"line_number":1180,"context_line":"                                                  hashing_algo)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            for k, v in val_data.items():"}],"source_content_type":"text/x-python","patch_set":9,"id":"d302070b_b0e054b2","line":1179,"range":{"start_line":1179,"start_character":21,"end_line":1179,"end_character":49},"in_reply_to":"f3687b8d_9b85e52b","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"37c0647f891d856d0a168ca3731db0dbbb7778ee","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"                self._calculate_checksum_and_hash(image, val_data,"},{"line_number":1180,"context_line":"                                                  hashing_algo)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            for k, v in val_data.items():"},{"line_number":1183,"context_line":"                setattr(image, k, v)"},{"line_number":1184,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1185,"context_line":"            image_repo.save(image)"},{"line_number":1186,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"7123d219_4a7d1017","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":36},"updated":"2023-05-11 15:28:35.000000000","message":"A little comment here will help reviewers to understand what are you doing here and what have you done at line 1179","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"9148337fbabcf534d8bd597080b3b447a6fd116f","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"                self._calculate_checksum_and_hash(image, val_data,"},{"line_number":1180,"context_line":"                                                  hashing_algo)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            for k, v in val_data.items():"},{"line_number":1183,"context_line":"                setattr(image, k, v)"},{"line_number":1184,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1185,"context_line":"            image_repo.save(image)"},{"line_number":1186,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"8fb41423_e28c655d","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":36},"in_reply_to":"2681d487_2158bed5","updated":"2023-05-12 11:36:23.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"                self._calculate_checksum_and_hash(image, val_data,"},{"line_number":1180,"context_line":"                                                  hashing_algo)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            for k, v in val_data.items():"},{"line_number":1183,"context_line":"                setattr(image, k, v)"},{"line_number":1184,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1185,"context_line":"            image_repo.save(image)"},{"line_number":1186,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":9,"id":"2681d487_2158bed5","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":36},"in_reply_to":"7123d219_4a7d1017","updated":"2023-05-12 11:35:33.000000000","message":"added the comment and we need to check validation_data is not None here because we are not returning anything from _validate_hashing_data() now","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"c5e78d4048b430daa9c457d353cf26e726fdbf73","unresolved":true,"context_lines":[{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"        if not isinstance(body, dict):"},{"line_number":1648,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1649,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        values \u003d {\u0027add_location\u0027: body}"},{"line_number":1652,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"35700676_13aaccb7","line":1649,"updated":"2023-05-11 16:02:07.000000000","message":"Wouldn\u0027t this be picked up by self.schema.validate(values) at line 1653?","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":true,"context_lines":[{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"        if not isinstance(body, dict):"},{"line_number":1648,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1649,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        values \u003d {\u0027add_location\u0027: body}"},{"line_number":1652,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"81439927_24647f29","line":1649,"in_reply_to":"35700676_13aaccb7","updated":"2023-05-12 11:35:33.000000000","message":"ohh yes it does!","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"9148337fbabcf534d8bd597080b3b447a6fd116f","unresolved":false,"context_lines":[{"line_number":1646,"context_line":""},{"line_number":1647,"context_line":"        if not isinstance(body, dict):"},{"line_number":1648,"context_line":"            msg \u003d _(\u0027Operations must be JSON objects.\u0027)"},{"line_number":1649,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1650,"context_line":""},{"line_number":1651,"context_line":"        values \u003d {\u0027add_location\u0027: body}"},{"line_number":1652,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":9,"id":"de122efc_89e885f3","line":1649,"in_reply_to":"81439927_24647f29","updated":"2023-05-12 11:36:23.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1800,"context_line":""},{"line_number":1801,"context_line":"    def add_location(self, response, image):"},{"line_number":1802,"context_line":"        image_view \u003d self._format_image(image)"},{"line_number":1803,"context_line":"        if \u0027locations\u0027 in image_view:"},{"line_number":1804,"context_line":"            image_view.pop(\u0027locations\u0027, None)"},{"line_number":1805,"context_line":"        if \u0027direct_url\u0027 in image_view:"},{"line_number":1806,"context_line":"            image_view.pop(\u0027direct_url\u0027, None)"},{"line_number":1807,"context_line":"        response.unicode_body \u003d json.dumps(image_view, ensure_ascii\u003dFalse)"},{"line_number":1808,"context_line":"        response.content_type \u003d \u0027application/json\u0027"},{"line_number":1809,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"fd394668_4a691ef2","line":1806,"range":{"start_line":1803,"start_character":8,"end_line":1806,"end_character":46},"updated":"2023-05-11 15:02:42.000000000","message":"no need to add if conditions you can simply write\nimage_view.pop(\u0027locations\u0027, None)\nimage_view.pop(\u0027direct_url\u0027, None)","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":false,"context_lines":[{"line_number":1800,"context_line":""},{"line_number":1801,"context_line":"    def add_location(self, response, image):"},{"line_number":1802,"context_line":"        image_view \u003d self._format_image(image)"},{"line_number":1803,"context_line":"        if \u0027locations\u0027 in image_view:"},{"line_number":1804,"context_line":"            image_view.pop(\u0027locations\u0027, None)"},{"line_number":1805,"context_line":"        if \u0027direct_url\u0027 in image_view:"},{"line_number":1806,"context_line":"            image_view.pop(\u0027direct_url\u0027, None)"},{"line_number":1807,"context_line":"        response.unicode_body \u003d json.dumps(image_view, ensure_ascii\u003dFalse)"},{"line_number":1808,"context_line":"        response.content_type \u003d \u0027application/json\u0027"},{"line_number":1809,"context_line":""}],"source_content_type":"text/x-python","patch_set":9,"id":"9bc26193_3f01cd9b","line":1806,"range":{"start_line":1803,"start_character":8,"end_line":1806,"end_character":46},"in_reply_to":"fd394668_4a691ef2","updated":"2023-05-12 11:35:33.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1979,"context_line":"                    \u0027properties\u0027: {"},{"line_number":1980,"context_line":"                        \u0027checksum\u0027: {"},{"line_number":1981,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1982,"context_line":"                            \u0027minLength\u0027: 32,"},{"line_number":1983,"context_line":"                            \u0027maxLength\u0027: 32,"},{"line_number":1984,"context_line":"                        },"},{"line_number":1985,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1986,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"007d1423_e28fd3bd","line":1983,"range":{"start_line":1982,"start_character":29,"end_line":1983,"end_character":44},"updated":"2023-05-11 15:02:42.000000000","message":"as per validation code we are checking length for 16, right? line 943\nSo minLength and maxLength should be 16, IMO this will also allow you to remove the check from validation function.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":true,"context_lines":[{"line_number":1979,"context_line":"                    \u0027properties\u0027: {"},{"line_number":1980,"context_line":"                        \u0027checksum\u0027: {"},{"line_number":1981,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1982,"context_line":"                            \u0027minLength\u0027: 32,"},{"line_number":1983,"context_line":"                            \u0027maxLength\u0027: 32,"},{"line_number":1984,"context_line":"                        },"},{"line_number":1985,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1986,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"4928d38e_4ea251f0","line":1983,"range":{"start_line":1982,"start_character":29,"end_line":1983,"end_character":44},"in_reply_to":"007d1423_e28fd3bd","updated":"2023-05-12 11:35:33.000000000","message":"Not sure why but even after replacing this minLength: 16, it doesn\u0027t fail with invalid checksum size. so need to keep the check in hash validation function","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1979,"context_line":"                    \u0027properties\u0027: {"},{"line_number":1980,"context_line":"                        \u0027checksum\u0027: {"},{"line_number":1981,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1982,"context_line":"                            \u0027minLength\u0027: 32,"},{"line_number":1983,"context_line":"                            \u0027maxLength\u0027: 32,"},{"line_number":1984,"context_line":"                        },"},{"line_number":1985,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1986,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"33e6aeb8_250ca1a4","line":1983,"range":{"start_line":1982,"start_character":29,"end_line":1983,"end_character":44},"in_reply_to":"07676626_00789137","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1979,"context_line":"                    \u0027properties\u0027: {"},{"line_number":1980,"context_line":"                        \u0027checksum\u0027: {"},{"line_number":1981,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1982,"context_line":"                            \u0027minLength\u0027: 32,"},{"line_number":1983,"context_line":"                            \u0027maxLength\u0027: 32,"},{"line_number":1984,"context_line":"                        },"},{"line_number":1985,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1986,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":9,"id":"07676626_00789137","line":1983,"range":{"start_line":1982,"start_character":29,"end_line":1983,"end_character":44},"in_reply_to":"4928d38e_4ea251f0","updated":"2023-05-12 15:54:09.000000000","message":"yep because in schema it will check for length of input where as we actually checking length after converting it to bytes.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1990,"context_line":"                        },"},{"line_number":1991,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1992,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["}],"source_content_type":"text/x-python","patch_set":9,"id":"3a6ded6f_989d4696","line":1993,"range":{"start_line":1993,"start_character":28,"end_line":1993,"end_character":45},"updated":"2023-05-11 15:02:42.000000000","message":"Also if we are sure that os_hash_val for all above hash_algo\u0027s will be 128 then then we can add minLength 128 here and minLength 16 for checksum which will allow us to remove length validation check we are performing on the input.\n\nIf length is more than 128 for any of tha hash_algo then this line will cause problem","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9ca7b131b7b819ecda22991f340d4a596c900817","unresolved":true,"context_lines":[{"line_number":1990,"context_line":"                        },"},{"line_number":1991,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1992,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["}],"source_content_type":"text/x-python","patch_set":9,"id":"eb77514b_8d0f95e7","line":1993,"range":{"start_line":1993,"start_character":28,"end_line":1993,"end_character":45},"in_reply_to":"3a6ded6f_989d4696","updated":"2023-05-11 15:18:58.000000000","message":"Ignore this comment, length is different for different hash_algo so we need to keep that validation separate.","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":false,"context_lines":[{"line_number":1990,"context_line":"                        },"},{"line_number":1991,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1992,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["}],"source_content_type":"text/x-python","patch_set":9,"id":"4dcccf85_2d582074","line":1993,"range":{"start_line":1993,"start_character":28,"end_line":1993,"end_character":45},"in_reply_to":"eb77514b_8d0f95e7","updated":"2023-05-15 14:23:41.000000000","message":"Ack","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"901245512ce854884ae3a5b8b6748250edc89c30","unresolved":true,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"4118ca42_07ec3b84","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"updated":"2023-05-11 15:02:42.000000000","message":"I haven\u0027t tested but if you pass only checksum in validation_data then it will fail as os_hash_algo and os_hash_value not provided?","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"e28484670bf5f8d1baefae487387c49874dac5ac","unresolved":true,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"e7bf0959_2eb6e7b9","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"in_reply_to":"4118ca42_07ec3b84","updated":"2023-05-12 11:35:33.000000000","message":"Yes, it will fail if all values in validation_data are not passed. I just tried to keep it similar with the old add location api. (like line#2041)","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"994a2929_a7329726","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"in_reply_to":"985a73b9_a49442bd","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"f8e6970a_2d13e63d","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"in_reply_to":"985a73b9_a49442bd","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"985a73b9_a49442bd","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"in_reply_to":"b819bc75_8b8c886f","updated":"2023-05-12 15:54:09.000000000","message":"You can remove above and add\n\"dependentRequired\": {\n    \"os_hash_value\": [\"os_hash_algo\"],\n    \"os_hash_algo\": [\"os_hash_value\"]\n}","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4767e8b5149301fe668700aeda9cc65d713ef2c7","unresolved":true,"context_lines":[{"line_number":1993,"context_line":"                            \u0027maxLength\u0027: 128,"},{"line_number":1994,"context_line":"                        },"},{"line_number":1995,"context_line":"                    },"},{"line_number":1996,"context_line":"                    \u0027required\u0027: ["},{"line_number":1997,"context_line":"                        \u0027os_hash_algo\u0027,"},{"line_number":1998,"context_line":"                        \u0027os_hash_value\u0027,"},{"line_number":1999,"context_line":"                    ],"},{"line_number":2000,"context_line":"                },"},{"line_number":2001,"context_line":"            },"},{"line_number":2002,"context_line":"            \u0027required\u0027: [\u0027url\u0027],"}],"source_content_type":"text/x-python","patch_set":9,"id":"b819bc75_8b8c886f","line":1999,"range":{"start_line":1996,"start_character":20,"end_line":1999,"end_character":22},"in_reply_to":"e7bf0959_2eb6e7b9","updated":"2023-05-12 11:42:53.000000000","message":"No we don’t want consumers to pass all items\nif hash algo is passed then hash value needs to be there is the only validation we meed","commit_id":"a4ba51e5ecf7e1ffab61fc0b69c3cd87b5208cde"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":959,"context_line":"                                \u0027value\u0027: val_data[key],"},{"line_number":960,"context_line":"                                \u0027algo\u0027: hash_algo,"},{"line_number":961,"context_line":"                                \u0027want\u0027: want_size})"},{"line_number":962,"context_line":"                        raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":965,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"a03d77e8_0ac0cb26","line":962,"updated":"2023-05-12 15:54:09.000000000","message":"It should be BadRequest as input provided is wrong.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":959,"context_line":"                                \u0027value\u0027: val_data[key],"},{"line_number":960,"context_line":"                                \u0027algo\u0027: hash_algo,"},{"line_number":961,"context_line":"                                \u0027want\u0027: want_size})"},{"line_number":962,"context_line":"                        raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":965,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"33ba4ff9_44ca1a80","line":962,"in_reply_to":"a03d77e8_0ac0cb26","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":959,"context_line":"                                \u0027value\u0027: val_data[key],"},{"line_number":960,"context_line":"                                \u0027algo\u0027: hash_algo,"},{"line_number":961,"context_line":"                                \u0027want\u0027: want_size})"},{"line_number":962,"context_line":"                        raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":963,"context_line":""},{"line_number":964,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":965,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":10,"id":"9375b2bf_44920402","line":962,"in_reply_to":"a03d77e8_0ac0cb26","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        if val_data:"},{"line_number":1158,"context_line":"            for k, v in val_data.items():"},{"line_number":1159,"context_line":"                if v !\u003d getattr(image, k):"},{"line_number":1160,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""},{"line_number":1161,"context_line":"                            \"%s (%s)\") % (k, val_data[k],"},{"line_number":1162,"context_line":"                                          k, getattr(image, k))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3769797e_4c4fb493","line":1159,"range":{"start_line":1159,"start_character":16,"end_line":1159,"end_character":42},"updated":"2023-05-12 15:54:09.000000000","message":"better to add if key !\u003d \u0027os_hash_algo\u0027 and v !\u003d getattr(image, k):","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        if val_data:"},{"line_number":1158,"context_line":"            for k, v in val_data.items():"},{"line_number":1159,"context_line":"                if v !\u003d getattr(image, k):"},{"line_number":1160,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""},{"line_number":1161,"context_line":"                            \"%s (%s)\") % (k, val_data[k],"},{"line_number":1162,"context_line":"                                          k, getattr(image, k))"}],"source_content_type":"text/x-python","patch_set":10,"id":"3efd423e_98e77667","line":1159,"range":{"start_line":1159,"start_character":16,"end_line":1159,"end_character":42},"in_reply_to":"3769797e_4c4fb493","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"        if val_data:"},{"line_number":1158,"context_line":"            for k, v in val_data.items():"},{"line_number":1159,"context_line":"                if v !\u003d getattr(image, k):"},{"line_number":1160,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""},{"line_number":1161,"context_line":"                            \"%s (%s)\") % (k, val_data[k],"},{"line_number":1162,"context_line":"                                          k, getattr(image, k))"}],"source_content_type":"text/x-python","patch_set":10,"id":"7ff6207a_8e66c0ae","line":1159,"range":{"start_line":1159,"start_character":16,"end_line":1159,"end_character":42},"in_reply_to":"3769797e_4c4fb493","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1163,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1166,"context_line":"                     validation_data\u003dNone):"},{"line_number":1167,"context_line":"        val_data \u003d {}"},{"line_number":1168,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":1169,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"97b1f47d_9849fb50","line":1166,"range":{"start_line":1166,"start_character":37,"end_line":1166,"end_character":41},"updated":"2023-05-12 15:54:09.000000000","message":"Instead of None you can define it to {} so that no need to add if condition all time?","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4767e8b5149301fe668700aeda9cc65d713ef2c7","unresolved":true,"context_lines":[{"line_number":1163,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1166,"context_line":"                     validation_data\u003dNone):"},{"line_number":1167,"context_line":"        val_data \u003d {}"},{"line_number":1168,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":1169,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"5195fefd_671c65f4","line":1166,"updated":"2023-05-12 11:42:53.000000000","message":"this below variable is unused now","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1166,"context_line":"                     validation_data\u003dNone):"},{"line_number":1167,"context_line":"        val_data \u003d {}"},{"line_number":1168,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":1169,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"19258bbe_ecec7faf","line":1166,"in_reply_to":"5195fefd_671c65f4","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1166,"context_line":"                     validation_data\u003dNone):"},{"line_number":1167,"context_line":"        val_data \u003d {}"},{"line_number":1168,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":1169,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"c87ea3bb_cd2780d1","line":1166,"range":{"start_line":1166,"start_character":37,"end_line":1166,"end_character":41},"in_reply_to":"97b1f47d_9849fb50","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1163,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":1164,"context_line":""},{"line_number":1165,"context_line":"    def add_location(self, req, image_id, url, do_secure_hash\u003dFalse,"},{"line_number":1166,"context_line":"                     validation_data\u003dNone):"},{"line_number":1167,"context_line":"        val_data \u003d {}"},{"line_number":1168,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"},{"line_number":1169,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":10,"id":"e8853daa_98352de8","line":1166,"range":{"start_line":1166,"start_character":37,"end_line":1166,"end_character":41},"in_reply_to":"97b1f47d_9849fb50","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"            if validation_data:"},{"line_number":1180,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            hashing_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":1183,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"cc943440_111b1298","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":66},"updated":"2023-05-12 15:54:09.000000000","message":"You can move this to _set_checksum_and_hash method since it is not used anywhere in this method.\n\nAlso val_data is empty here so it will always override value passed in request with default value set in CONF i.e. sha512.\n\nWhich also means we don\u0027t have a test coverage to check if we pass os_hash_algo in validation data which is different from CONF[\u0027hashing_algorithm\u0027] then it gives preference to input value.\n\nI would suggest to run coverage and see all the code is covered or not.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"            if validation_data:"},{"line_number":1180,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            hashing_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":1183,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"fd1ee90b_6bcc63f4","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":66},"in_reply_to":"24b95faa_7706e8f3","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"            if validation_data:"},{"line_number":1180,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            hashing_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":1183,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"ee79149e_ab3ddd1d","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":66},"in_reply_to":"cc943440_111b1298","updated":"2023-05-15 13:20:34.000000000","message":"I\u0027ve checked the test coverage, it\u0027s covering all the changes.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"            if validation_data:"},{"line_number":1180,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            hashing_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":1183,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"5eac04ac_4e2e33c8","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":66},"in_reply_to":"cc943440_111b1298","updated":"2023-05-15 13:20:34.000000000","message":"yes, I have added that scenario,\nhttps://review.opendev.org/c/openstack/glance/+/881940/10/glance/tests/unit/v2/test_images_resource.py#4173","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"            if validation_data:"},{"line_number":1180,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            hashing_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":1183,"context_line":"                                        CONF[\u0027hashing_algorithm\u0027])"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"}],"source_content_type":"text/x-python","patch_set":10,"id":"24b95faa_7706e8f3","line":1183,"range":{"start_line":1182,"start_character":12,"end_line":1183,"end_character":66},"in_reply_to":"ee79149e_ab3ddd1d","updated":"2023-05-15 14:23:41.000000000","message":"You are pointing me to different scenario. I am talking about if valid os_hash_algo is present in validation_data which is other than default set in CONF (i.e. sha512).\n\nIn this case it should set the os_hash_algo passed in input and not the default one.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1203,"context_line":"            # when validation data not None"},{"line_number":1204,"context_line":"            if validation_data:"},{"line_number":1205,"context_line":"                for k, v in validation_data.items():"},{"line_number":1206,"context_line":"                    setattr(image, k, v)"},{"line_number":1207,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"20a8b5d1_5623d5c8","line":1204,"range":{"start_line":1204,"start_character":15,"end_line":1204,"end_character":30},"updated":"2023-05-12 15:54:09.000000000","message":"if you define default value to {} instead of None then no need of this condition as well","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1203,"context_line":"            # when validation data not None"},{"line_number":1204,"context_line":"            if validation_data:"},{"line_number":1205,"context_line":"                for k, v in validation_data.items():"},{"line_number":1206,"context_line":"                    setattr(image, k, v)"},{"line_number":1207,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"0cc3b418_e1ae5823","line":1204,"range":{"start_line":1204,"start_character":15,"end_line":1204,"end_character":30},"in_reply_to":"20a8b5d1_5623d5c8","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1201,"context_line":""},{"line_number":1202,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1203,"context_line":"            # when validation data not None"},{"line_number":1204,"context_line":"            if validation_data:"},{"line_number":1205,"context_line":"                for k, v in validation_data.items():"},{"line_number":1206,"context_line":"                    setattr(image, k, v)"},{"line_number":1207,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"90b93019_b27bc944","line":1204,"range":{"start_line":1204,"start_character":15,"end_line":1204,"end_character":30},"in_reply_to":"20a8b5d1_5623d5c8","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1672,"context_line":"        except exception.InvalidObject as e:"},{"line_number":1673,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1674,"context_line":""},{"line_number":1675,"context_line":"        return body"},{"line_number":1676,"context_line":""},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"class ResponseSerializer(wsgi.JSONResponseSerializer):"}],"source_content_type":"text/x-python","patch_set":10,"id":"986be403_3c982554","line":1675,"range":{"start_line":1675,"start_character":15,"end_line":1675,"end_character":19},"updated":"2023-05-12 15:54:09.000000000","message":"I am not sure but shouldn\u0027t this be return {\u0027body\u0027: body} like line 1665?","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1672,"context_line":"        except exception.InvalidObject as e:"},{"line_number":1673,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1674,"context_line":""},{"line_number":1675,"context_line":"        return body"},{"line_number":1676,"context_line":""},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"class ResponseSerializer(wsgi.JSONResponseSerializer):"}],"source_content_type":"text/x-python","patch_set":10,"id":"da166dea_02872fb3","line":1675,"range":{"start_line":1675,"start_character":15,"end_line":1675,"end_character":19},"in_reply_to":"986be403_3c982554","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":true,"context_lines":[{"line_number":1672,"context_line":"        except exception.InvalidObject as e:"},{"line_number":1673,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1674,"context_line":""},{"line_number":1675,"context_line":"        return body"},{"line_number":1676,"context_line":""},{"line_number":1677,"context_line":""},{"line_number":1678,"context_line":"class ResponseSerializer(wsgi.JSONResponseSerializer):"}],"source_content_type":"text/x-python","patch_set":10,"id":"d96abddc_4907ee46","line":1675,"range":{"start_line":1675,"start_character":15,"end_line":1675,"end_character":19},"in_reply_to":"986be403_3c982554","updated":"2023-05-15 13:20:34.000000000","message":"yeah that would work and it will resolve the validation_data variable check as well.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":1984,"context_line":"                },"},{"line_number":1985,"context_line":"                \u0027validation_data\u0027: {"},{"line_number":1986,"context_line":"                    \u0027description\u0027: _(\u0027Values to be used to populate the \u0027"},{"line_number":1987,"context_line":"                                     \u0027corresponding image properties. If \u0027"},{"line_number":1988,"context_line":"                                     \u0027the image status is not \\\u0027queued\\\u0027, \u0027"},{"line_number":1989,"context_line":"                                     \u0027values must exactly match those \u0027"},{"line_number":1990,"context_line":"                                     \u0027already contained in the image \u0027"},{"line_number":1991,"context_line":"                                     \u0027properties.\u0027),"},{"line_number":1992,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":1993,"context_line":"                    \u0027writeOnly\u0027: True,"},{"line_number":1994,"context_line":"                    \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":10,"id":"6361e7c3_9b7d00a8","line":1991,"range":{"start_line":1987,"start_character":70,"end_line":1991,"end_character":52},"updated":"2023-05-12 15:54:09.000000000","message":"This is not true in our case since we are allowing this api to be used only for queued state.","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"                },"},{"line_number":1985,"context_line":"                \u0027validation_data\u0027: {"},{"line_number":1986,"context_line":"                    \u0027description\u0027: _(\u0027Values to be used to populate the \u0027"},{"line_number":1987,"context_line":"                                     \u0027corresponding image properties. If \u0027"},{"line_number":1988,"context_line":"                                     \u0027the image status is not \\\u0027queued\\\u0027, \u0027"},{"line_number":1989,"context_line":"                                     \u0027values must exactly match those \u0027"},{"line_number":1990,"context_line":"                                     \u0027already contained in the image \u0027"},{"line_number":1991,"context_line":"                                     \u0027properties.\u0027),"},{"line_number":1992,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":1993,"context_line":"                    \u0027writeOnly\u0027: True,"},{"line_number":1994,"context_line":"                    \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":10,"id":"b0be95a6_0e25b0af","line":1991,"range":{"start_line":1987,"start_character":70,"end_line":1991,"end_character":52},"in_reply_to":"6361e7c3_9b7d00a8","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bcdbd5d18cc3d72dcaef7cd059e8e17a30165ad4","unresolved":false,"context_lines":[{"line_number":1984,"context_line":"                },"},{"line_number":1985,"context_line":"                \u0027validation_data\u0027: {"},{"line_number":1986,"context_line":"                    \u0027description\u0027: _(\u0027Values to be used to populate the \u0027"},{"line_number":1987,"context_line":"                                     \u0027corresponding image properties. If \u0027"},{"line_number":1988,"context_line":"                                     \u0027the image status is not \\\u0027queued\\\u0027, \u0027"},{"line_number":1989,"context_line":"                                     \u0027values must exactly match those \u0027"},{"line_number":1990,"context_line":"                                     \u0027already contained in the image \u0027"},{"line_number":1991,"context_line":"                                     \u0027properties.\u0027),"},{"line_number":1992,"context_line":"                    \u0027type\u0027: \u0027object\u0027,"},{"line_number":1993,"context_line":"                    \u0027writeOnly\u0027: True,"},{"line_number":1994,"context_line":"                    \u0027additionalProperties\u0027: False,"}],"source_content_type":"text/x-python","patch_set":10,"id":"f0c53489_3a5d77b7","line":1991,"range":{"start_line":1987,"start_character":70,"end_line":1991,"end_character":52},"in_reply_to":"6361e7c3_9b7d00a8","updated":"2023-05-15 13:20:34.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"5237960be4edc3d9cdb8cb8ca08c323886134b96","unresolved":true,"context_lines":[{"line_number":2001,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":2002,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":2003,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":2004,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":2005,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":2006,"context_line":"                        },"},{"line_number":2007,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":2008,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"24ed66ce_b87ffb1a","line":2005,"range":{"start_line":2004,"start_character":36,"end_line":2005,"end_character":47},"updated":"2023-05-12 15:54:09.000000000","message":"I think we can write a custom validator function to validate length based on these inputs but that requires R\u0026D and can be done later in the cycle.\n\nSame goes for checksum validation","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":false,"context_lines":[{"line_number":2001,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":2002,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":2003,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":2004,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":2005,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":2006,"context_line":"                        },"},{"line_number":2007,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":2008,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":10,"id":"147e051b_23d19464","line":2005,"range":{"start_line":2004,"start_character":36,"end_line":2005,"end_character":47},"in_reply_to":"24ed66ce_b87ffb1a","updated":"2023-05-15 14:23:41.000000000","message":"Ack","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"},{"line_number":942,"context_line":"                    raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"                # length validation"},{"line_number":945,"context_line":"                if key \u003d\u003d \u0027checksum\u0027 and len(bytes) !\u003d 16:"}],"source_content_type":"text/x-python","patch_set":12,"id":"cd9fe93c_128823cf","line":942,"range":{"start_line":942,"start_character":26,"end_line":942,"end_character":48},"updated":"2023-05-15 14:23:41.000000000","message":"Sorry for ignoring this earlier, but this should be BadRequest as well.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"},{"line_number":942,"context_line":"                    raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"                # length validation"},{"line_number":945,"context_line":"                if key \u003d\u003d \u0027checksum\u0027 and len(bytes) !\u003d 16:"}],"source_content_type":"text/x-python","patch_set":12,"id":"6e3ecd1f_eb8a5e4b","line":942,"range":{"start_line":942,"start_character":26,"end_line":942,"end_character":48},"in_reply_to":"cd9fe93c_128823cf","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"},{"line_number":942,"context_line":"                    raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":943,"context_line":""},{"line_number":944,"context_line":"                # length validation"},{"line_number":945,"context_line":"                if key \u003d\u003d \u0027checksum\u0027 and len(bytes) !\u003d 16:"}],"source_content_type":"text/x-python","patch_set":12,"id":"a483111b_5cbd3651","line":942,"range":{"start_line":942,"start_character":26,"end_line":942,"end_character":48},"in_reply_to":"cd9fe93c_128823cf","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1156,"context_line":"        image.os_hash_value \u003d current_os_hash_value.hexdigest()"},{"line_number":1157,"context_line":"        image.os_hash_algo \u003d hashing_algo"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"        if val_data:"},{"line_number":1160,"context_line":"            for k, v in val_data.items():"},{"line_number":1161,"context_line":"                if k !\u003d \u0027os_hash_algo\u0027 and v !\u003d getattr(image, k):"},{"line_number":1162,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""}],"source_content_type":"text/x-python","patch_set":12,"id":"e69383ec_6129b52e","line":1159,"range":{"start_line":1159,"start_character":8,"end_line":1159,"end_character":20},"updated":"2023-05-15 14:23:41.000000000","message":"I guess this is not required now.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"        image.os_hash_value \u003d current_os_hash_value.hexdigest()"},{"line_number":1157,"context_line":"        image.os_hash_algo \u003d hashing_algo"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"        if val_data:"},{"line_number":1160,"context_line":"            for k, v in val_data.items():"},{"line_number":1161,"context_line":"                if k !\u003d \u0027os_hash_algo\u0027 and v !\u003d getattr(image, k):"},{"line_number":1162,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""}],"source_content_type":"text/x-python","patch_set":12,"id":"161a88cf_1eded7b1","line":1159,"range":{"start_line":1159,"start_character":8,"end_line":1159,"end_character":20},"in_reply_to":"e69383ec_6129b52e","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"        image.os_hash_value \u003d current_os_hash_value.hexdigest()"},{"line_number":1157,"context_line":"        image.os_hash_algo \u003d hashing_algo"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"        if val_data:"},{"line_number":1160,"context_line":"            for k, v in val_data.items():"},{"line_number":1161,"context_line":"                if k !\u003d \u0027os_hash_algo\u0027 and v !\u003d getattr(image, k):"},{"line_number":1162,"context_line":"                    msg \u003d _(\"%s (%s) not matched with actual \""}],"source_content_type":"text/x-python","patch_set":12,"id":"67d101f2_f3ffa90b","line":1159,"range":{"start_line":1159,"start_character":8,"end_line":1159,"end_character":20},"in_reply_to":"e69383ec_6129b52e","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1179,"context_line":"                                                self.policy)"},{"line_number":1180,"context_line":"            api_pol.add_location()"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"04091aeb_3b171b9c","line":1182,"range":{"start_line":1182,"start_character":11,"end_line":1182,"end_character":31},"updated":"2023-05-15 14:23:41.000000000","message":"nit: You can avoid this condition as well","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"                                                self.policy)"},{"line_number":1180,"context_line":"            api_pol.add_location()"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"1223b4d3_a9ae6781","line":1182,"range":{"start_line":1182,"start_character":11,"end_line":1182,"end_character":31},"in_reply_to":"04091aeb_3b171b9c","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1179,"context_line":"                                                self.policy)"},{"line_number":1180,"context_line":"            api_pol.add_location()"},{"line_number":1181,"context_line":""},{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"}],"source_content_type":"text/x-python","patch_set":12,"id":"46f2239b_2698966c","line":1182,"range":{"start_line":1182,"start_character":11,"end_line":1182,"end_character":31},"in_reply_to":"04091aeb_3b171b9c","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"},{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"}],"source_content_type":"text/x-python","patch_set":12,"id":"debaafb2_717827b1","line":1185,"range":{"start_line":1185,"start_character":29,"end_line":1185,"end_character":67},"updated":"2023-05-15 14:23:41.000000000","message":"Add store identifier as location metadata?","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"},{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"}],"source_content_type":"text/x-python","patch_set":12,"id":"7b27e4ba_8537846a","line":1185,"range":{"start_line":1185,"start_character":29,"end_line":1185,"end_character":67},"in_reply_to":"debaafb2_717827b1","updated":"2023-05-16 14:24:30.000000000","message":"Ack","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1182,"context_line":"            if validation_data:"},{"line_number":1183,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1184,"context_line":""},{"line_number":1185,"context_line":"            # (NOTE(pdeore): Add metadata key to store the store_id"},{"line_number":1186,"context_line":"            updated_location \u003d {"},{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"}],"source_content_type":"text/x-python","patch_set":12,"id":"4460ffa3_a876c6a0","line":1185,"range":{"start_line":1185,"start_character":29,"end_line":1185,"end_character":67},"in_reply_to":"debaafb2_717827b1","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"},{"line_number":1189,"context_line":"            }"},{"line_number":1190,"context_line":"            if CONF.enabled_backends:"},{"line_number":1191,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1192,"context_line":"                    [updated_location])[0]"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"            image.locations.append(updated_location)"},{"line_number":1195,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"543ee0a2_af69114e","line":1192,"range":{"start_line":1190,"start_character":12,"end_line":1192,"end_character":42},"updated":"2023-05-15 14:23:41.000000000","message":"This coverage is missing in unit as well as functional test.\n\nWe should test that if multi stores is configured then we have store_identifier set in location metadata.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":true,"context_lines":[{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"},{"line_number":1189,"context_line":"            }"},{"line_number":1190,"context_line":"            if CONF.enabled_backends:"},{"line_number":1191,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1192,"context_line":"                    [updated_location])[0]"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"            image.locations.append(updated_location)"},{"line_number":1195,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"ba420379_120f3f5d","line":1192,"range":{"start_line":1190,"start_character":12,"end_line":1192,"end_character":42},"in_reply_to":"543ee0a2_af69114e","updated":"2023-05-16 14:24:30.000000000","message":"Added unit test, functional test pending.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":1187,"context_line":"                \u0027url\u0027: url,"},{"line_number":1188,"context_line":"                \u0027metadata\u0027: {},"},{"line_number":1189,"context_line":"            }"},{"line_number":1190,"context_line":"            if CONF.enabled_backends:"},{"line_number":1191,"context_line":"                updated_location \u003d store_utils.get_updated_store_location("},{"line_number":1192,"context_line":"                    [updated_location])[0]"},{"line_number":1193,"context_line":""},{"line_number":1194,"context_line":"            image.locations.append(updated_location)"},{"line_number":1195,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"71c4c881_98060fbc","line":1192,"range":{"start_line":1190,"start_character":12,"end_line":1192,"end_character":42},"in_reply_to":"ba420379_120f3f5d","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":1198,"context_line":"            if do_secure_hash:"},{"line_number":1199,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1202,"context_line":"            # when validation data not None"},{"line_number":1203,"context_line":"            for k, v in validation_data.items():"},{"line_number":1204,"context_line":"                setattr(image, k, v)"},{"line_number":1205,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"41ef00a8_64d4427d","line":1202,"range":{"start_line":1201,"start_character":12,"end_line":1202,"end_character":43},"updated":"2023-05-15 14:23:41.000000000","message":"Set user provided checksum and hash properties to image when do_secure_hash is False.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"            if do_secure_hash:"},{"line_number":1199,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1202,"context_line":"            # when validation data not None"},{"line_number":1203,"context_line":"            for k, v in validation_data.items():"},{"line_number":1204,"context_line":"                setattr(image, k, v)"},{"line_number":1205,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"7b862594_bbb1ff83","line":1202,"range":{"start_line":1201,"start_character":12,"end_line":1202,"end_character":43},"in_reply_to":"41ef00a8_64d4427d","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"            if do_secure_hash:"},{"line_number":1199,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1200,"context_line":""},{"line_number":1201,"context_line":"            # set the validation data into corresponding image properties"},{"line_number":1202,"context_line":"            # when validation data not None"},{"line_number":1203,"context_line":"            for k, v in validation_data.items():"},{"line_number":1204,"context_line":"                setattr(image, k, v)"},{"line_number":1205,"context_line":"            image.status \u003d \u0027active\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"f3fac97a_343379e8","line":1202,"range":{"start_line":1201,"start_character":12,"end_line":1202,"end_character":43},"in_reply_to":"41ef00a8_64d4427d","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":935,"context_line":"        for key in hex_validation:"},{"line_number":936,"context_line":"            if key in val_data:"},{"line_number":937,"context_line":"                try:"},{"line_number":938,"context_line":"                    bytes \u003d bytearray.fromhex(val_data[key])"},{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"2ced6e2c_5eac26aa","line":938,"range":{"start_line":938,"start_character":20,"end_line":938,"end_character":25},"updated":"2023-05-17 15:54:23.000000000","message":"This eclipses the builtin and shouldn\u0027t be used this way. I would suggest \"hashval\" or something. TBH, I\u0027m surprised pep8 isn\u0027t screaming at you for this :)","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a1bec428e208bc65f7dddfc0f3aa99ba8042085","unresolved":true,"context_lines":[{"line_number":935,"context_line":"        for key in hex_validation:"},{"line_number":936,"context_line":"            if key in val_data:"},{"line_number":937,"context_line":"                try:"},{"line_number":938,"context_line":"                    bytes \u003d bytearray.fromhex(val_data[key])"},{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"5efde593_eea63e0a","line":938,"range":{"start_line":938,"start_character":20,"end_line":938,"end_character":25},"in_reply_to":"2ced6e2c_5eac26aa","updated":"2023-05-17 16:20:04.000000000","message":"+1","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d732a61b61190e6b479e890953b1dfe0991f913e","unresolved":false,"context_lines":[{"line_number":935,"context_line":"        for key in hex_validation:"},{"line_number":936,"context_line":"            if key in val_data:"},{"line_number":937,"context_line":"                try:"},{"line_number":938,"context_line":"                    bytes \u003d bytearray.fromhex(val_data[key])"},{"line_number":939,"context_line":"                except ValueError:"},{"line_number":940,"context_line":"                    msg \u003d (_(\"%s (%s) is not a valid hexadecimal value\") %"},{"line_number":941,"context_line":"                           (key, val_data[key]))"}],"source_content_type":"text/x-python","patch_set":14,"id":"017066d8_324060c1","line":938,"range":{"start_line":938,"start_character":20,"end_line":938,"end_character":25},"in_reply_to":"5efde593_eea63e0a","updated":"2023-06-26 07:41:10.000000000","message":"Done","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":949,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":950,"context_line":"                elif key \u003d\u003d \u0027os_hash_value\u0027:"},{"line_number":951,"context_line":"                    hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":952,"context_line":"                                             CONF[\u0027hashing_algorithm\u0027])"},{"line_number":953,"context_line":"                    want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":954,"context_line":"                    if len(bytes) !\u003d want_size:"},{"line_number":955,"context_line":"                        msg \u003d (_(\"%(key)s (%(value)s) is not the correct \""}],"source_content_type":"text/x-python","patch_set":14,"id":"6979c3ef_3fc24f2b","line":952,"updated":"2023-05-17 15:54:23.000000000","message":"It seems bad to me to make `os_hash_algo` optional. The user doesn\u0027t know what the glance configuration is and as such can\u0027t really predict what the right hash algo is to use. This could case a user to try many times, consuming a lot of resource, downloading images and hashing them before giving up and asking the admin.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"ce74cacadb6cba9f5989078b058cb9af9128daad","unresolved":false,"context_lines":[{"line_number":949,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":950,"context_line":"                elif key \u003d\u003d \u0027os_hash_value\u0027:"},{"line_number":951,"context_line":"                    hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":952,"context_line":"                                             CONF[\u0027hashing_algorithm\u0027])"},{"line_number":953,"context_line":"                    want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":954,"context_line":"                    if len(bytes) !\u003d want_size:"},{"line_number":955,"context_line":"                        msg \u003d (_(\"%(key)s (%(value)s) is not the correct \""}],"source_content_type":"text/x-python","patch_set":14,"id":"eb1ceb63_cf037f4e","line":952,"in_reply_to":"60adce61_5f9cec48","updated":"2023-10-31 09:30:49.000000000","message":"Done","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":true,"context_lines":[{"line_number":949,"context_line":"                    raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":950,"context_line":"                elif key \u003d\u003d \u0027os_hash_value\u0027:"},{"line_number":951,"context_line":"                    hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":952,"context_line":"                                             CONF[\u0027hashing_algorithm\u0027])"},{"line_number":953,"context_line":"                    want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":954,"context_line":"                    if len(bytes) !\u003d want_size:"},{"line_number":955,"context_line":"                        msg \u003d (_(\"%(key)s (%(value)s) is not the correct \""}],"source_content_type":"text/x-python","patch_set":14,"id":"60adce61_5f9cec48","line":952,"in_reply_to":"6979c3ef_3fc24f2b","updated":"2023-08-14 11:54:23.000000000","message":"I think there was discussion happened on this[1], and we decided to have this\n\nhttps://review.opendev.org/c/openstack/glance/+/881940/7..28/glance/api/v2/images.py#b983","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":1193,"context_line":"            # Compute the checksum and hash from the newly added location"},{"line_number":1194,"context_line":"            # when do_secure_hash is true"},{"line_number":1195,"context_line":"            if do_secure_hash:"},{"line_number":1196,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."}],"source_content_type":"text/x-python","patch_set":14,"id":"3b3b8335_356d19d3","line":1196,"updated":"2023-05-17 15:54:23.000000000","message":"This seems totally unreasonable to me. This effectively puts a download of the image and hash verification of that data into the synchronous path of this request right? For something using a (typical/gracious) 60s timeout, we will always give up waiting for this to complete for any image of any real size right? If we\u0027re in front of apache or something (which will almost always be the case) adding a location will just result in a 503 to the client. In the case of apache proxy (and others) returning a 5xx from a downstream application like this often gets you a 60s timeout before the application will even be tried again.\n\nI haven\u0027t read the spec, but IMHO this interface *must* be async. Meaning you add a location and it goes into a processing phase after which it either goes active or error (if the hash fails, etc).","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3403b7ea48024986cb282d6537439505ad97b4b","unresolved":true,"context_lines":[{"line_number":1193,"context_line":"            # Compute the checksum and hash from the newly added location"},{"line_number":1194,"context_line":"            # when do_secure_hash is true"},{"line_number":1195,"context_line":"            if do_secure_hash:"},{"line_number":1196,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."}],"source_content_type":"text/x-python","patch_set":14,"id":"fdab57a9_e08e4a56","line":1196,"in_reply_to":"260312b3_a32ca3dd","updated":"2023-05-17 16:58:58.000000000","message":"Using import workflow will make it less complicated. Just need to sure that consumer of this API (cinder/nova) don\u0027t do any post processing on response based on image state at their end.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"1a1bec428e208bc65f7dddfc0f3aa99ba8042085","unresolved":true,"context_lines":[{"line_number":1193,"context_line":"            # Compute the checksum and hash from the newly added location"},{"line_number":1194,"context_line":"            # when do_secure_hash is true"},{"line_number":1195,"context_line":"            if do_secure_hash:"},{"line_number":1196,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."}],"source_content_type":"text/x-python","patch_set":14,"id":"5b873851_c0deda5c","line":1196,"in_reply_to":"3b3b8335_356d19d3","updated":"2023-05-17 16:20:04.000000000","message":"I am/was also in favor of having this async. Only thing is it will increase complexity as we might need to use locking so that while this async operation is in progress no one can consume that image. (What if async operation in progress and validation fails and we need to reset image back to queued state while someone is using that image for booting or creating volume?) Also setting image to active and then reset it back to queued seems off to me, how about deactivating it with some log messages?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"67ddb2f9fd66a06ff43202d5f85e4ab78ce49121","unresolved":true,"context_lines":[{"line_number":1193,"context_line":"            # Compute the checksum and hash from the newly added location"},{"line_number":1194,"context_line":"            # when do_secure_hash is true"},{"line_number":1195,"context_line":"            if do_secure_hash:"},{"line_number":1196,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."}],"source_content_type":"text/x-python","patch_set":14,"id":"260312b3_a32ca3dd","line":1196,"in_reply_to":"5b873851_c0deda5c","updated":"2023-05-17 16:47:17.000000000","message":"I just don\u0027t see any possible way that this can work without it being async. It definitely makes it more complicated, but I don\u0027t think there\u0027s any other option.\n\nYou\u0027re definitely right about the need for the image to go through some stage changes, which is why I mentioned documenting the state workflow that should be expected. This is one reason I mentioned early-on that perhaps using the import workflow for this would be better than just a new API because we already have a defined set of states the image goes through when that happens (queued-\u003eimporting-\u003eactive). I think we can still use the same sort of thing if we stick with this API, but IMHO we have to do something. Expecting a 25G image to be downloaded and hashed within the context of a single HTTP request is just not reasonable, IMHO.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"7c7f7ee4d656bfa0efb0cb1dcdf1a56e31a90a0a","unresolved":false,"context_lines":[{"line_number":1193,"context_line":"            # Compute the checksum and hash from the newly added location"},{"line_number":1194,"context_line":"            # when do_secure_hash is true"},{"line_number":1195,"context_line":"            if do_secure_hash:"},{"line_number":1196,"context_line":"                self._set_checksum_and_hash(image, validation_data)"},{"line_number":1197,"context_line":""},{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."}],"source_content_type":"text/x-python","patch_set":14,"id":"41b0d08c_4d9e0d01","line":1196,"in_reply_to":"fdab57a9_e08e4a56","updated":"2023-06-29 18:34:44.000000000","message":"Done","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"9b60e763d5f854757e6129ed56feefdc1f55e3b0","unresolved":true,"context_lines":[{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."},{"line_number":1200,"context_line":"            for k, v in validation_data.items():"},{"line_number":1201,"context_line":"                setattr(image, k, v)"},{"line_number":1202,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1203,"context_line":"            image_repo.save(image)"},{"line_number":1204,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"ffc81af9_8937c136","line":1201,"updated":"2023-05-17 15:54:23.000000000","message":"Don\u0027t we need logic to handle the case where a new location has a different hash algo, hash value, checksum, etc in the case where we already have one location and thus those values? Otherwise adding a new location with bad content overrides the existing values right?","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2ab6acb84f44b6648d0944b21e2a8752bac5b1c9","unresolved":false,"context_lines":[{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."},{"line_number":1200,"context_line":"            for k, v in validation_data.items():"},{"line_number":1201,"context_line":"                setattr(image, k, v)"},{"line_number":1202,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1203,"context_line":"            image_repo.save(image)"},{"line_number":1204,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"1205c101_bdc54446","line":1201,"in_reply_to":"b3faf590_809b3086","updated":"2023-06-21 16:43:19.000000000","message":"Done","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"cc287c157c55bcfbddf566449512ae33cc3c370a","unresolved":true,"context_lines":[{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."},{"line_number":1200,"context_line":"            for k, v in validation_data.items():"},{"line_number":1201,"context_line":"                setattr(image, k, v)"},{"line_number":1202,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1203,"context_line":"            image_repo.save(image)"},{"line_number":1204,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"b3faf590_809b3086","line":1201,"in_reply_to":"d10659f3_e533b13b","updated":"2023-05-17 17:02:09.000000000","message":"Okay, then it is probably worth an assertion here that the values are not already set on the image for some reason with a comment about why. In case someone changes that behavior restriction later and doesn\u0027t realize there\u0027s now a silent overwrite of those values.\n\n(and apologies again for not being up to date on the spec)","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"4fa8fe935976745ac3ca1fee938e4532c4757887","unresolved":true,"context_lines":[{"line_number":1198,"context_line":"            # Set user provided checksum and hash properties to image when"},{"line_number":1199,"context_line":"            # do_secure_hash is False."},{"line_number":1200,"context_line":"            for k, v in validation_data.items():"},{"line_number":1201,"context_line":"                setattr(image, k, v)"},{"line_number":1202,"context_line":"            image.status \u003d \u0027active\u0027"},{"line_number":1203,"context_line":"            image_repo.save(image)"},{"line_number":1204,"context_line":"        except exception.NotFound as e:"}],"source_content_type":"text/x-python","patch_set":14,"id":"d10659f3_e533b13b","line":1201,"in_reply_to":"ffc81af9_8937c136","updated":"2023-05-17 16:08:56.000000000","message":"As per spec we are allowing to use this new location API for queued images only.","commit_id":"b11ac3d39a27415b8a4cf67007c402b2fbccacc4"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"04491a7c98bea8cdf48d5637db53181c164861bd","unresolved":true,"context_lines":[{"line_number":1204,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":1205,"context_line":"            updated_location.update(validation_data\u003dvalidation_data)"},{"line_number":1206,"context_line":"            image_repo.save(image)"},{"line_number":1207,"context_line":"            updated_location.pop(\u0027status\u0027, None)"},{"line_number":1208,"context_line":"        except exception.NotFound as e:"},{"line_number":1209,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1210,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"}],"source_content_type":"text/x-python","patch_set":18,"id":"5f52674d_09d68c42","line":1207,"updated":"2023-06-23 14:27:33.000000000","message":"I think setting image to active should be a different task, also getting updated location should be a different task (line 1160 to 1176)\n\nSetting image attributes like hash and checksum should also be a part of task.","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a90e9e9222edafeccd20c6ced7b29d6f3f96b698","unresolved":true,"context_lines":[{"line_number":1204,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":1205,"context_line":"            updated_location.update(validation_data\u003dvalidation_data)"},{"line_number":1206,"context_line":"            image_repo.save(image)"},{"line_number":1207,"context_line":"            updated_location.pop(\u0027status\u0027, None)"},{"line_number":1208,"context_line":"        except exception.NotFound as e:"},{"line_number":1209,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1210,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"}],"source_content_type":"text/x-python","patch_set":18,"id":"8ff82ecf_6ce584ee","line":1207,"in_reply_to":"4da4999e_f0be59db","updated":"2023-06-26 16:39:26.000000000","message":"I had the same thought when I first looked at this - that we should always set these things in the task (async) regardless of whether or not we\u0027re expecting it to be a long-running calculation or not.\n\nIMHO, the best API is a predictable one. The users don\u0027t know if hash calculation is disabled in the config, so they won\u0027t know if they\u0027re going to need to wait or not. If we do the sometimes-async-sometimes-sync approach, we need to return 202 for the former and 200 for the latter so they know which behavior to expect. However, I think my preference would to be always async, 202, and just have the task skip calculation if disabled. Users will get back 202, and poll for completion (if they care), which may happen almost immediately.\n\nThat always-async behavior is easier to document, most consistent across clouds which may have different configs, and leaves us the most flexibility for the future. If we decide to remove that CONF knob or do other validation that is less expensive than calculation, but not suitable for doing synchronously in the request handler, we\u0027ll be able to easily do that without changing behavior.","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f8f00dd99cb59bcb47f8a083cd220e314f0a4de8","unresolved":true,"context_lines":[{"line_number":1204,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":1205,"context_line":"            updated_location.update(validation_data\u003dvalidation_data)"},{"line_number":1206,"context_line":"            image_repo.save(image)"},{"line_number":1207,"context_line":"            updated_location.pop(\u0027status\u0027, None)"},{"line_number":1208,"context_line":"        except exception.NotFound as e:"},{"line_number":1209,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1210,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"}],"source_content_type":"text/x-python","patch_set":18,"id":"a9b74cf4_c0f08841","line":1207,"in_reply_to":"5f52674d_09d68c42","updated":"2023-06-26 08:13:42.000000000","message":"I think as per the discussion \u0026 spec we decided to have only hash calculation \u0026 validation data verification, async.\n\nAnd the api response values we return here includes the location url as well, so are you suggesting to have the loc update async and before updating location we should return the response?","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":1205,"context_line":"            updated_location.update(validation_data\u003dvalidation_data)"},{"line_number":1206,"context_line":"            image_repo.save(image)"},{"line_number":1207,"context_line":"            updated_location.pop(\u0027status\u0027, None)"},{"line_number":1208,"context_line":"        except exception.NotFound as e:"},{"line_number":1209,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1210,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"}],"source_content_type":"text/x-python","patch_set":18,"id":"9ecceb87_25d9006d","line":1207,"in_reply_to":"8ff82ecf_6ce584ee","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b1795c3a2c930e5eb5f6012cbb684f80b936feba","unresolved":true,"context_lines":[{"line_number":1204,"context_line":"                image.status \u003d \u0027active\u0027"},{"line_number":1205,"context_line":"            updated_location.update(validation_data\u003dvalidation_data)"},{"line_number":1206,"context_line":"            image_repo.save(image)"},{"line_number":1207,"context_line":"            updated_location.pop(\u0027status\u0027, None)"},{"line_number":1208,"context_line":"        except exception.NotFound as e:"},{"line_number":1209,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1210,"context_line":"        except (exception.Invalid, exception.BadStoreUri) as e:"}],"source_content_type":"text/x-python","patch_set":18,"id":"4da4999e_f0be59db","line":1207,"in_reply_to":"a9b74cf4_c0f08841","updated":"2023-06-26 08:29:14.000000000","message":"We decided to have hash calculation and hash verification async but I don\u0027t remember this should be \u0027only\u0027 part of async. I think if we are using taskflow then we should have series of tasks (breaking big logic in smaller tasks) executed in linear flow.","commit_id":"45221ec02b2da7fe533d14902f1e8375ab717de5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1d5e58c8b4ac71d49d9307e76c5020339a57eafb","unresolved":true,"context_lines":[{"line_number":1204,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1205,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        return updated_location"},{"line_number":1208,"context_line":""},{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":21,"id":"ad72f249_361da2e5","line":1207,"range":{"start_line":1207,"start_character":8,"end_line":1207,"end_character":31},"updated":"2023-07-06 09:35:06.000000000","message":"As per the updated spec, we have agreed on the below api response,\n\n\"{\n            \"url\": \"cinder://lvmdriver-1/1a304872-b0ca-4992-b2c2-6874c6d5d5f9\",\n            \"metadata\": \"{\u0027store\u0027: \u0027lvmdriver-1\u0027}\"\n            \"validation_data\": {\n                \"os_hash_algo\": \"sha512\",\n                \"os_hash_value\": \"6b813aa46bb90b4da216a4d19376593fa3f4fc7e617f03a92b7fe11e9a3981cbe8f0959dbebe36225e5f53dc4492341a4863cac4ed1ee0909f3fc78ef9c3e869\",\n            }\n            \"\nbut the store name we would get only after store_utils.get_updated_store_location() call which I\u0027ve moved to async new UpdateLocationTask. \n\nSo, do we need to change the response here by updating the spec or go with the same response as decided and keep only image.locations.append() async in the task and store_utils.get_updated_store_location() call in sync ?","commit_id":"102023dc6421c4b2f821360366aa81578416bd31"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":1204,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1205,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1206,"context_line":""},{"line_number":1207,"context_line":"        return updated_location"},{"line_number":1208,"context_line":""},{"line_number":1209,"context_line":""},{"line_number":1210,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":21,"id":"25f9e039_4f6c4c1a","line":1207,"range":{"start_line":1207,"start_character":8,"end_line":1207,"end_character":31},"in_reply_to":"ad72f249_361da2e5","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"102023dc6421c4b2f821360366aa81578416bd31"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"097756af191cfba7e60701e604a5bb6145135039","unresolved":true,"context_lines":[{"line_number":1174,"context_line":"                task_repo.add(hash_calculation_task)"},{"line_number":1175,"context_line":"                task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1176,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1177,"context_line":"                pool.spawn(hash_calculation_task.run, task_executor)"},{"line_number":1178,"context_line":"            except exception.Forbidden as e:"},{"line_number":1179,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1180,"context_line":"                          \"calculation task.\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"f0eaa2e0_3f28e554","line":1177,"updated":"2023-07-28 18:49:44.000000000","message":"As Abhi noted in the previous patch, you need to atomically grab a lock on this image by setting the task id and making sure nothing else","commit_id":"cd04b05b7f02d918621054f6bb0ade398f0032b2"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":1174,"context_line":"                task_repo.add(hash_calculation_task)"},{"line_number":1175,"context_line":"                task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1176,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1177,"context_line":"                pool.spawn(hash_calculation_task.run, task_executor)"},{"line_number":1178,"context_line":"            except exception.Forbidden as e:"},{"line_number":1179,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1180,"context_line":"                          \"calculation task.\")"}],"source_content_type":"text/x-python","patch_set":23,"id":"3752b827_870706c7","line":1177,"in_reply_to":"f0eaa2e0_3f28e554","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"cd04b05b7f02d918621054f6bb0ade398f0032b2"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb105e60d3b03c790130114783c945467a067feb","unresolved":true,"context_lines":[{"line_number":1140,"context_line":"            raise webob.exc.HTTPInternalServerError("},{"line_number":1141,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"    def add_location(self, req, image_id, body):"},{"line_number":1144,"context_line":"        url \u003d body.get(\u0027url\u0027)"},{"line_number":1145,"context_line":"        validation_data \u003d body.get(\u0027validation_data\u0027, {})"},{"line_number":1146,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"}],"source_content_type":"text/x-python","patch_set":26,"id":"3e340555_00a12952","line":1143,"updated":"2023-08-08 07:23:35.000000000","message":"No metadata input?\n\nAs per spec we also send metadata as input\n\nhttps://review.opendev.org/c/openstack/glance-specs/+/883491/8/specs/2023.2/approved/glance/new-location-info-apis.rst#294","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            raise webob.exc.HTTPInternalServerError("},{"line_number":1141,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"    def add_location(self, req, image_id, body):"},{"line_number":1144,"context_line":"        url \u003d body.get(\u0027url\u0027)"},{"line_number":1145,"context_line":"        validation_data \u003d body.get(\u0027validation_data\u0027, {})"},{"line_number":1146,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"}],"source_content_type":"text/x-python","patch_set":26,"id":"e5a398a3_c78a466a","line":1143,"in_reply_to":"2d1b911f_1945bc04","updated":"2023-08-09 17:40:11.000000000","message":"Done","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"a970d6722caf52faf8b8b443dd910dbe83b3c384","unresolved":true,"context_lines":[{"line_number":1140,"context_line":"            raise webob.exc.HTTPInternalServerError("},{"line_number":1141,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"    def add_location(self, req, image_id, body):"},{"line_number":1144,"context_line":"        url \u003d body.get(\u0027url\u0027)"},{"line_number":1145,"context_line":"        validation_data \u003d body.get(\u0027validation_data\u0027, {})"},{"line_number":1146,"context_line":"        image_repo \u003d self.gateway.get_repo(req.context)"}],"source_content_type":"text/x-python","patch_set":26,"id":"2d1b911f_1945bc04","line":1143,"in_reply_to":"3e340555_00a12952","updated":"2023-08-08 07:27:36.000000000","message":"Sorry it is in response but I think we should allow adding metadata as well to be compatible with legacy location add command. I don\u0027t recollect why we decided to not to support it.","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":true,"context_lines":[{"line_number":1157,"context_line":"                # NOTE(danms): This will raise exception.Conflict if the"},{"line_number":1158,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1159,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1160,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1161,"context_line":"            ctxt \u003d req.context"},{"line_number":1162,"context_line":"            stole_lock_from_task \u003d None"},{"line_number":1163,"context_line":"            task_factory \u003d self.gateway.get_task_factory(ctxt)"}],"source_content_type":"text/x-python","patch_set":28,"id":"b98e1e8c_56decab3","line":1160,"range":{"start_line":1160,"start_character":12,"end_line":1160,"end_character":56},"updated":"2023-08-09 17:40:11.000000000","message":"if validation_data:??","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"db69e1ab73507eb98e0551e0b9cff4229df156c4","unresolved":false,"context_lines":[{"line_number":1157,"context_line":"                # NOTE(danms): This will raise exception.Conflict if the"},{"line_number":1158,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1159,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1160,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1161,"context_line":"            ctxt \u003d req.context"},{"line_number":1162,"context_line":"            stole_lock_from_task \u003d None"},{"line_number":1163,"context_line":"            task_factory \u003d self.gateway.get_task_factory(ctxt)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7f72887b_1f5cbc61","line":1160,"range":{"start_line":1160,"start_character":12,"end_line":1160,"end_character":56},"in_reply_to":"61936b4b_cbc6f1de","updated":"2023-08-21 06:23:26.000000000","message":"Ack","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":true,"context_lines":[{"line_number":1157,"context_line":"                # NOTE(danms): This will raise exception.Conflict if the"},{"line_number":1158,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1159,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1160,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1161,"context_line":"            ctxt \u003d req.context"},{"line_number":1162,"context_line":"            stole_lock_from_task \u003d None"},{"line_number":1163,"context_line":"            task_factory \u003d self.gateway.get_task_factory(ctxt)"}],"source_content_type":"text/x-python","patch_set":28,"id":"61936b4b_cbc6f1de","line":1160,"range":{"start_line":1160,"start_character":12,"end_line":1160,"end_character":56},"in_reply_to":"b98e1e8c_56decab3","updated":"2023-08-14 11:54:23.000000000","message":"Not required, I think that you\u0027had suggested to remove [1]\n\n[1]: https://review.opendev.org/c/openstack/glance/+/881940/12..28/glance/api/v2/images.py","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"3c773310_28ac4040","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"updated":"2023-08-09 17:40:11.000000000","message":"since task_input also contains image_id, any specific reason to send it separate again?","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4aa3a1db6bc328a271e44117b9cddc77bb7e5f4a","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"39a1f79a_801fa511","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"in_reply_to":"3735b1ff_0036b199","updated":"2023-08-24 11:43:00.000000000","message":"YEah as said earlier, it\u0027s positional arg for new_task, and fails when not passed.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3892949400d5f590b5f63f997c9becf83893b5b8","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"7ea7d9ee_fe27be3a","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"in_reply_to":"39a1f79a_801fa511","updated":"2023-08-24 13:43:59.000000000","message":"I can see here it passed as keyword argument.\n\nAnyway let me rephrase my question in another way.\n\nSince image_id is passed as separate variable can we avoid passing it in  task_input and it in new_task function if required further?","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"894efdbb_21ea1270","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"in_reply_to":"3c773310_28ac4040","updated":"2023-08-14 11:54:23.000000000","message":"Yes, it\u0027s positional arg for new_task, same added for import_image as well.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":false,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"91f1fe75_3c7dfe4e","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"in_reply_to":"7ea7d9ee_fe27be3a","updated":"2023-08-30 15:41:02.000000000","message":"Done","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"db69e1ab73507eb98e0551e0b9cff4229df156c4","unresolved":true,"context_lines":[{"line_number":1171,"context_line":"                add_location_task \u003d task_factory.new_task("},{"line_number":1172,"context_line":"                    task_type\u003d\u0027location_import\u0027,"},{"line_number":1173,"context_line":"                    owner\u003dctxt.owner,"},{"line_number":1174,"context_line":"                    task_input\u003dtask_input,"},{"line_number":1175,"context_line":"                    image_id\u003dimage_id,"},{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"}],"source_content_type":"text/x-python","patch_set":28,"id":"3735b1ff_0036b199","line":1175,"range":{"start_line":1174,"start_character":20,"end_line":1175,"end_character":38},"in_reply_to":"894efdbb_21ea1270","updated":"2023-08-21 06:23:26.000000000","message":"I know same is done for image_import but any reason you found to do it so for this workflow? If there is no concrete reason we can fix it later for image_import as well.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"fe2072bc_113826b5","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"updated":"2023-08-09 17:40:11.000000000","message":"User not permitted to create task?\nNot sure how to restrict user from creating any specific task","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d7b325eec9d517d2eb3a38a3a193d9b08b0e3d24","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"9a7aa946_25fa6424","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"in_reply_to":"0f5e14a0_ee7cd69e","updated":"2023-08-16 09:31:18.000000000","message":"yeah it\u0027s missing, i think it\u0027s missing for import image as well 😜\nI will check and add it later","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f6e9ede38a65e8acb5b56e44178cca8c36ec47d8","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"0f5e14a0_ee7cd69e","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"in_reply_to":"340d3b68_dacad69e","updated":"2023-08-14 14:57:02.000000000","message":"Does this mean the unit/functional test is missing for this scenario?","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4ba4629b2583070cb78a8daf156e5790d215daf2","unresolved":false,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"7fcd1972_e7674b13","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"in_reply_to":"90ff9f44_092801af","updated":"2024-02-29 10:19:33.000000000","message":"Done","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"014052e8891ed6a72d781f8c0f291bdea984e507","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"90ff9f44_092801af","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"in_reply_to":"9a7aa946_25fa6424","updated":"2024-02-28 23:14:43.000000000","message":"Pranali, can you please mark comments you\u0027ve addressed as \"resolved\"? This one from nearly a year and 43 revisions ago is still front and center for reviewers.\n\n(later)\n\nIt seems like the root concern is _actually_ still valid and unanswered as far as I can tell...","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":true,"context_lines":[{"line_number":1199,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create hash \""},{"line_number":1203,"context_line":"                          \"calculation task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":28,"id":"340d3b68_dacad69e","line":1203,"range":{"start_line":1202,"start_character":49,"end_line":1203,"end_character":43},"in_reply_to":"fe2072bc_113826b5","updated":"2023-08-14 11:54:23.000000000","message":"Not sure either, need to check, I just referred from import_image.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":true,"context_lines":[{"line_number":1212,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1213,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":1214,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":1215,"context_line":"        except ValueError as e:    # update image status failed."},{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"f526ac70_9c25f697","line":1215,"range":{"start_line":1215,"start_character":8,"end_line":1215,"end_character":64},"updated":"2023-08-09 17:40:11.000000000","message":"We are not updating any status here, so this is not required.\nAnd if required then we should have a unit test confirming the same.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":false,"context_lines":[{"line_number":1212,"context_line":"            raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1213,"context_line":"        except exception.NotAuthenticated as e:"},{"line_number":1214,"context_line":"            raise webob.exc.HTTPUnauthorized(explanation\u003de.msg)"},{"line_number":1215,"context_line":"        except ValueError as e:    # update image status failed."},{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"5f4297eb_8f69ac3e","line":1215,"range":{"start_line":1215,"start_character":8,"end_line":1215,"end_character":64},"in_reply_to":"f526ac70_9c25f697","updated":"2023-08-14 11:54:23.000000000","message":"Yes, it is required if os_hash_algo is other than the valid values, and it\u0027s covered in https://review.opendev.org/c/openstack/glance/+/881940/28/glance/tests/unit/v2/test_images_resource.py#4113\n\nNot sure why InvalidObject not thrown during schema validation.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8a59c892a5cdb76a1c2a74b26c8c975fb5d8f978","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"a330e85f_c6c9fcdd","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"updated":"2023-08-11 05:18:23.000000000","message":"I think this is backward incompatible change compared to old location API.\nIn case of old location update internally calls add location and then returns image instead of ID.\n\nThis is why old location API works without doing any changes in Nova side.\n\nI have made few changes in nova so that new API works for time being, without that change nova snapshot will fail and image in glance side will be deleted.\n\nApply these changes at nova side:\nhttps://paste.opendev.org/show/byztu5pjf8rWPKxyVS4m/\n\nNova new Add location API testing with multiple stores.\n1. Apply above patch in nova\n2. Restart all nova services using \u0027sudo systemctl restart devstack@n*\u0027\n3. Ensure glance and nova both are using rbd as backend\n4. Create image in glance (should be raw image)\n5. Create instance using that image\n6. Create instance snapshot","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"de9aa139a63a070e8ca85103b58c091dde53ca1a","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"398799ff_1560be03","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"in_reply_to":"278ac3b4_4f7b4a03","updated":"2023-08-11 14:08:08.000000000","message":"We will not be returning image locations in response since show_multiple_locations will be turned off. If we don\u0027t want new API to return same response as old one then we need to make changes in consumer to act according to what is returned from glance or change glanceclient to return expected values to consumers.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f5bc3682decb5e8f361f86915ac44c384fef690b","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"5b98d16b_87519da8","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"in_reply_to":"398799ff_1560be03","updated":"2023-08-11 14:18:56.000000000","message":"Right, I\u0027m suggesting the glanceclient change (that\u0027s what I meant by \"the client\"). I definitely don\u0027t want the new API to behave like the old one.\n\nThe client is really supposed to make as many of these things invisible to the caller as possible, IMHO. If we\u0027re going to remove the locations stuff eventually, making the add_location continue to behave as before and return an image with the locations like it was before, that\u0027s the most compatible.\n\nI\u0027m not sure what the best approach is really, but if we change nova to use the new client method, we need to build the \"new else old\" behavior into nova (and cinder) itself.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"815fa0bf_d02d779b","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"in_reply_to":"5b98d16b_87519da8","updated":"2023-08-14 11:54:23.000000000","message":"@Dan, are you suggesting something like this [1] to call the new add location api from old one ?\n\n[1]: https://review.opendev.org/c/openstack/python-glanceclient/+/890634/4/glanceclient/v2/images.py#499","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4aa3a1db6bc328a271e44117b9cddc77bb7e5f4a","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"5b32ce3d_1681d3b9","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"in_reply_to":"815fa0bf_d02d779b","updated":"2023-08-24 11:43:00.000000000","message":"Done","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"a1316d9a061c7a38982a337bf7bc05ee0aa530dc","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"            raise webob.exc.HTTPBadRequest("},{"line_number":1217,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1218,"context_line":""},{"line_number":1219,"context_line":"        return image_id"},{"line_number":1220,"context_line":""},{"line_number":1221,"context_line":""},{"line_number":1222,"context_line":"class RequestDeserializer(wsgi.JSONRequestDeserializer):"}],"source_content_type":"text/x-python","patch_set":28,"id":"278ac3b4_4f7b4a03","line":1219,"range":{"start_line":1219,"start_character":15,"end_line":1219,"end_character":23},"in_reply_to":"a330e85f_c6c9fcdd","updated":"2023-08-11 13:32:31.000000000","message":"Isn\u0027t this something that the client should handle? Use the new location API if provided, and GET the image afterwards to return so that nova gets what it expects?\n\nHowever, I\u0027m not sure it\u0027s best to use the new api to mimic the old one (i.e. shove the locations into the image blob so it *looks* like the old way) since we\u0027re trying to get away from that. It just means the client interface isn\u0027t very stable :/","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d124be4a9bd06aaf00363b984022bc1557b809aa","unresolved":true,"context_lines":[{"line_number":1153,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1154,"context_line":"                                                self.policy)"},{"line_number":1155,"context_line":"            api_pol.add_location()"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1158,"context_line":"                # NOTE(danms): This will raise exception.Conflict if the"},{"line_number":1159,"context_line":"                # lock is present and valid, or return if absent or invalid."}],"source_content_type":"text/x-python","patch_set":31,"id":"894651f4_83f850f0","line":1156,"updated":"2023-08-21 08:00:47.000000000","message":"I think after this policy check passes we need an additional check to reject the request if default_backend is not http/https and request.context.roles or request.context.service_roles does not contain service role.\n\nhttps://review.opendev.org/c/openstack/glance-specs/+/883491/8/specs/2023.2/approved/glance/new-location-info-apis.rst#50","commit_id":"48c08297777588fe31e2e55d471d7e6fd119105d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4aa3a1db6bc328a271e44117b9cddc77bb7e5f4a","unresolved":false,"context_lines":[{"line_number":1153,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1154,"context_line":"                                                self.policy)"},{"line_number":1155,"context_line":"            api_pol.add_location()"},{"line_number":1156,"context_line":""},{"line_number":1157,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1158,"context_line":"                # NOTE(danms): This will raise exception.Conflict if the"},{"line_number":1159,"context_line":"                # lock is present and valid, or return if absent or invalid."}],"source_content_type":"text/x-python","patch_set":31,"id":"e2d91740_d1ffa926","line":1156,"in_reply_to":"894651f4_83f850f0","updated":"2023-08-24 11:43:00.000000000","message":"Done","commit_id":"48c08297777588fe31e2e55d471d7e6fd119105d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3892949400d5f590b5f63f997c9becf83893b5b8","unresolved":true,"context_lines":[{"line_number":1155,"context_line":"            api_pol.add_location()"},{"line_number":1156,"context_line":"            # NOTE(pdeore): Consumers without service role will not be"},{"line_number":1157,"context_line":"            # allowed to add location except the store is \u0027http\u0027"},{"line_number":1158,"context_line":"            if (\u0027service\u0027 not in req.context.roles) and ("},{"line_number":1159,"context_line":"                    \u0027service\u0027 not in req.context.service_roles):"},{"line_number":1160,"context_line":"                if CONF.enabled_backends:"},{"line_number":1161,"context_line":"                    available_stores \u003d CONF.enabled_backends"},{"line_number":1162,"context_line":"                    # NOTE(pdeore): No one other than the HTTP store case,"},{"line_number":1163,"context_line":"                    # can add new location without \u0027service\u0027 role."},{"line_number":1164,"context_line":"                    for store in available_stores:"},{"line_number":1165,"context_line":"                        if available_stores[store] \u003d\u003d \u0027http\u0027:"},{"line_number":1166,"context_line":"                            continue"},{"line_number":1167,"context_line":"                        raise exception.Forbidden()"},{"line_number":1168,"context_line":"                elif \u0027http\u0027 not in CONF.glance_store.stores:"},{"line_number":1169,"context_line":"                    raise exception.Forbidden()"},{"line_number":1170,"context_line":""},{"line_number":1171,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1172,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":32,"id":"27a64ede_c1b4d7a8","line":1169,"range":{"start_line":1158,"start_character":12,"end_line":1169,"end_character":47},"updated":"2023-08-24 13:43:59.000000000","message":"you can simplify it like below;\n\nhttps://paste.opendev.org/show/bhrlZI8AawRvY1MZT9FM/\n\nAlso you can add custom message to describe why user is not permitted to perform this operation.","commit_id":"f6c3d616004e66266fa2c7390101b2abc29c18b6"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f83b4bd77b527ca25c1153ac39cfd2aba3590f68","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"            api_pol.add_location()"},{"line_number":1156,"context_line":"            # NOTE(pdeore): Consumers without service role will not be"},{"line_number":1157,"context_line":"            # allowed to add location except the store is \u0027http\u0027"},{"line_number":1158,"context_line":"            if (\u0027service\u0027 not in req.context.roles) and ("},{"line_number":1159,"context_line":"                    \u0027service\u0027 not in req.context.service_roles):"},{"line_number":1160,"context_line":"                if CONF.enabled_backends:"},{"line_number":1161,"context_line":"                    available_stores \u003d CONF.enabled_backends"},{"line_number":1162,"context_line":"                    # NOTE(pdeore): No one other than the HTTP store case,"},{"line_number":1163,"context_line":"                    # can add new location without \u0027service\u0027 role."},{"line_number":1164,"context_line":"                    for store in available_stores:"},{"line_number":1165,"context_line":"                        if available_stores[store] \u003d\u003d \u0027http\u0027:"},{"line_number":1166,"context_line":"                            continue"},{"line_number":1167,"context_line":"                        raise exception.Forbidden()"},{"line_number":1168,"context_line":"                elif \u0027http\u0027 not in CONF.glance_store.stores:"},{"line_number":1169,"context_line":"                    raise exception.Forbidden()"},{"line_number":1170,"context_line":""},{"line_number":1171,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1172,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":32,"id":"99a8e609_21f7363a","line":1169,"range":{"start_line":1158,"start_character":12,"end_line":1169,"end_character":47},"in_reply_to":"27a64ede_c1b4d7a8","updated":"2023-08-28 14:39:33.000000000","message":"Done","commit_id":"f6c3d616004e66266fa2c7390101b2abc29c18b6"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":1160,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1161,"context_line":"                                                self.policy)"},{"line_number":1162,"context_line":"            api_pol.add_location()"},{"line_number":1163,"context_line":"            # NOTE(pdeore): Consumers without service role will not be"},{"line_number":1164,"context_line":"            # allowed to add location except the store is \u0027http\u0027"},{"line_number":1165,"context_line":"            roles \u003d list(set(req.context.roles + req.context.service_roles))"},{"line_number":1166,"context_line":"            if \u0027service\u0027 not in roles:"},{"line_number":1167,"context_line":"                # NOTE(pdeore): Add location API is disabled for other stores"}],"source_content_type":"text/x-python","patch_set":33,"id":"feea756b_48b9ad5d","line":1164,"range":{"start_line":1163,"start_character":12,"end_line":1164,"end_character":64},"updated":"2023-08-28 06:23:23.000000000","message":"nit:this note is not needed now, since we have clear note at line 1167","commit_id":"f642f321be0b5061da368a983bd296db29fce00e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":false,"context_lines":[{"line_number":1160,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1161,"context_line":"                                                self.policy)"},{"line_number":1162,"context_line":"            api_pol.add_location()"},{"line_number":1163,"context_line":"            # NOTE(pdeore): Consumers without service role will not be"},{"line_number":1164,"context_line":"            # allowed to add location except the store is \u0027http\u0027"},{"line_number":1165,"context_line":"            roles \u003d list(set(req.context.roles + req.context.service_roles))"},{"line_number":1166,"context_line":"            if \u0027service\u0027 not in roles:"},{"line_number":1167,"context_line":"                # NOTE(pdeore): Add location API is disabled for other stores"}],"source_content_type":"text/x-python","patch_set":33,"id":"8cd800f8_b2d6ea51","line":1164,"range":{"start_line":1163,"start_character":12,"end_line":1164,"end_character":64},"in_reply_to":"feea756b_48b9ad5d","updated":"2023-08-28 07:53:04.000000000","message":"Done","commit_id":"f642f321be0b5061da368a983bd296db29fce00e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":1140,"context_line":"            raise webob.exc.HTTPInternalServerError("},{"line_number":1141,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"    def _is_http_store_configured(self):"},{"line_number":1144,"context_line":"        enabled_backends \u003d CONF.enabled_backends"},{"line_number":1145,"context_line":"        if enabled_backends:"},{"line_number":1146,"context_line":"            return \u0027http\u0027 in enabled_backends.values()"}],"source_content_type":"text/x-python","patch_set":34,"id":"fbba2814_ccac839c","line":1143,"range":{"start_line":1143,"start_character":34,"end_line":1143,"end_character":38},"updated":"2023-08-28 06:23:23.000000000","message":"nit: I think you can make this method either static or move it to common utility module so that it can be used in future if required as well.","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":false,"context_lines":[{"line_number":1140,"context_line":"            raise webob.exc.HTTPInternalServerError("},{"line_number":1141,"context_line":"                explanation\u003dencodeutils.exception_to_unicode(e))"},{"line_number":1142,"context_line":""},{"line_number":1143,"context_line":"    def _is_http_store_configured(self):"},{"line_number":1144,"context_line":"        enabled_backends \u003d CONF.enabled_backends"},{"line_number":1145,"context_line":"        if enabled_backends:"},{"line_number":1146,"context_line":"            return \u0027http\u0027 in enabled_backends.values()"}],"source_content_type":"text/x-python","patch_set":34,"id":"76538b4f_274434b4","line":1143,"range":{"start_line":1143,"start_character":34,"end_line":1143,"end_character":38},"in_reply_to":"fbba2814_ccac839c","updated":"2023-08-28 07:53:04.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":1175,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"},{"line_number":1176,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1177,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1178,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1179,"context_line":"            ctxt \u003d req.context"},{"line_number":1180,"context_line":"            stole_lock_from_task \u003d None"},{"line_number":1181,"context_line":"            task_factory \u003d self.gateway.get_task_factory(ctxt)"}],"source_content_type":"text/x-python","patch_set":34,"id":"ad4626d0_d887d0ab","line":1178,"updated":"2023-08-28 06:23:23.000000000","message":"nit: if new ps is required then put a blank line before this","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":false,"context_lines":[{"line_number":1175,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"},{"line_number":1176,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1177,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1178,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1179,"context_line":"            ctxt \u003d req.context"},{"line_number":1180,"context_line":"            stole_lock_from_task \u003d None"},{"line_number":1181,"context_line":"            task_factory \u003d self.gateway.get_task_factory(ctxt)"}],"source_content_type":"text/x-python","patch_set":34,"id":"14047830_fc8b3e20","line":1178,"in_reply_to":"ad4626d0_d887d0ab","updated":"2023-08-28 07:53:04.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":1216,"context_line":"                task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1217,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1218,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1219,"context_line":"            except exception.Forbidden as e:"},{"line_number":1220,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1221,"context_line":"                          \"location task.\")"},{"line_number":1222,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1223,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1224,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":34,"id":"0fe19c41_b241f6de","line":1221,"range":{"start_line":1219,"start_character":12,"end_line":1221,"end_character":43},"updated":"2023-08-28 06:23:23.000000000","message":"I think we need to refactor this in upcoming cycle. If task creation is called from internal API then we should not raise forbidden. I think its our onion layer which somehow checking task policy internally which was designed for /v2/tasks api.\n\nhttps://github.com/openstack/glance/blob/master/glance/policies/tasks.py#L76","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":false,"context_lines":[{"line_number":1216,"context_line":"                task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1217,"context_line":"                pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1218,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1219,"context_line":"            except exception.Forbidden as e:"},{"line_number":1220,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1221,"context_line":"                          \"location task.\")"},{"line_number":1222,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1223,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1224,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":34,"id":"ca88a9fa_6f23bbd6","line":1221,"range":{"start_line":1219,"start_character":12,"end_line":1221,"end_character":43},"in_reply_to":"0fe19c41_b241f6de","updated":"2023-08-28 07:53:04.000000000","message":"Ack","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"022c30f6e6da5dd2700da7b40f6d5b202bd29463","unresolved":true,"context_lines":[{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":1207,"context_line":"        except exception.NotFound as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1209,"context_line":"        except exception.Forbidden as e:"}],"source_content_type":"text/x-python","patch_set":40,"id":"10f5bea9_5473648b","line":1206,"range":{"start_line":1205,"start_character":12,"end_line":1206,"end_character":63},"updated":"2023-08-29 09:52:35.000000000","message":"I am doubtful that this exception will ever be raised as we are not modifying status outside taskflow at all.","commit_id":"9e3ff6b5e66b9b0aefe5bdfb2c9b5c119244556f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"08c14a947cab96e7f52b308a09ccdd655ff6a756","unresolved":true,"context_lines":[{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":1207,"context_line":"        except exception.NotFound as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1209,"context_line":"        except exception.Forbidden as e:"}],"source_content_type":"text/x-python","patch_set":40,"id":"6d621d31_f31a1f8d","line":1206,"range":{"start_line":1205,"start_character":12,"end_line":1206,"end_character":63},"in_reply_to":"10f5bea9_5473648b","updated":"2023-08-29 14:21:34.000000000","message":"yeah right, removed it now.","commit_id":"9e3ff6b5e66b9b0aefe5bdfb2c9b5c119244556f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":false,"context_lines":[{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"            except exception.InvalidImageStatusTransition as e:"},{"line_number":1206,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003de.msg)"},{"line_number":1207,"context_line":"        except exception.NotFound as e:"},{"line_number":1208,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"},{"line_number":1209,"context_line":"        except exception.Forbidden as e:"}],"source_content_type":"text/x-python","patch_set":40,"id":"d6419c94_ae4b241c","line":1206,"range":{"start_line":1205,"start_character":12,"end_line":1206,"end_character":63},"in_reply_to":"6d621d31_f31a1f8d","updated":"2023-08-30 15:41:02.000000000","message":"Done","commit_id":"9e3ff6b5e66b9b0aefe5bdfb2c9b5c119244556f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e687920b57f134abed24165055749bf39dba72d1","unresolved":true,"context_lines":[{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"},{"line_number":1183,"context_line":"                except exception.Duplicate:"},{"line_number":1184,"context_line":"                    msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1185,"context_line":"                             \"permitted as prior operation is still \""},{"line_number":1186,"context_line":"                             \"in progress\") % image_id)"},{"line_number":1187,"context_line":"                    raise exception.Conflict(msg)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"                # NOTE(pdeore): We now have the import lock on this image."},{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"}],"source_content_type":"text/x-python","patch_set":46,"id":"118afd07_a8bd6947","line":1187,"range":{"start_line":1184,"start_character":20,"end_line":1187,"end_character":49},"updated":"2023-10-31 09:49:31.000000000","message":"Do we have this covered in unit and functional tests? I don\u0027t see Conflict is caught anywhere below.","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"93f944683f042dd65d5aedcf1758b557be98aaf3","unresolved":true,"context_lines":[{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"},{"line_number":1183,"context_line":"                except exception.Duplicate:"},{"line_number":1184,"context_line":"                    msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1185,"context_line":"                             \"permitted as prior operation is still \""},{"line_number":1186,"context_line":"                             \"in progress\") % image_id)"},{"line_number":1187,"context_line":"                    raise exception.Conflict(msg)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"                # NOTE(pdeore): We now have the import lock on this image."},{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"}],"source_content_type":"text/x-python","patch_set":46,"id":"f2e01ff8_9ed77128","line":1187,"range":{"start_line":1184,"start_character":20,"end_line":1187,"end_character":49},"in_reply_to":"118afd07_a8bd6947","updated":"2023-11-02 09:38:31.000000000","message":"No, it\u0027s not. I think it\u0027s not covered for image import as well. I will check and add it later in the follow up patch.","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6aa1dbd07000f530c7f0cefd7f4990f2516ac01e","unresolved":false,"context_lines":[{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"},{"line_number":1183,"context_line":"                except exception.Duplicate:"},{"line_number":1184,"context_line":"                    msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1185,"context_line":"                             \"permitted as prior operation is still \""},{"line_number":1186,"context_line":"                             \"in progress\") % image_id)"},{"line_number":1187,"context_line":"                    raise exception.Conflict(msg)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"                # NOTE(pdeore): We now have the import lock on this image."},{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"}],"source_content_type":"text/x-python","patch_set":46,"id":"ac1a0b8b_8fe38865","line":1187,"range":{"start_line":1184,"start_character":20,"end_line":1187,"end_character":49},"in_reply_to":"a81e7d67_b5181dec","updated":"2024-02-01 10:34:16.000000000","message":"Done","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b01f0ca40a8dd37b6ee9efbe3ce65ba6f9f454c9","unresolved":true,"context_lines":[{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"},{"line_number":1183,"context_line":"                except exception.Duplicate:"},{"line_number":1184,"context_line":"                    msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1185,"context_line":"                             \"permitted as prior operation is still \""},{"line_number":1186,"context_line":"                             \"in progress\") % image_id)"},{"line_number":1187,"context_line":"                    raise exception.Conflict(msg)"},{"line_number":1188,"context_line":""},{"line_number":1189,"context_line":"                # NOTE(pdeore): We now have the import lock on this image."},{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"}],"source_content_type":"text/x-python","patch_set":46,"id":"a81e7d67_b5181dec","line":1187,"range":{"start_line":1184,"start_character":20,"end_line":1187,"end_character":49},"in_reply_to":"f2e01ff8_9ed77128","updated":"2024-01-30 06:54:37.000000000","message":"Any update on this?","commit_id":"cf644faaf11c77e639091684d9e6f3aadaa12373"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b01f0ca40a8dd37b6ee9efbe3ce65ba6f9f454c9","unresolved":true,"context_lines":[{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"},{"line_number":1191,"context_line":"                # task, try to clean up the import status information left"},{"line_number":1192,"context_line":"                # over from that execution."},{"line_number":1193,"context_line":"                if stole_lock_from_task:"},{"line_number":1194,"context_line":"                    self._cleanup_stale_task_progress(image_repo, image,"},{"line_number":1195,"context_line":"                                                      stole_lock_from_task)"},{"line_number":1196,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"012d2ca5_5b326803","line":1193,"range":{"start_line":1193,"start_character":19,"end_line":1193,"end_character":39},"updated":"2024-01-30 06:54:37.000000000","message":"I may missing something, but when will this execute as you are setting it to None at line 1162 and not assigning it anything after that?","commit_id":"9be49692618877c5d91f1cadcc73c690eb401d7e"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c8eac85c360866ee0f5111c5f61542204dfc7237","unresolved":true,"context_lines":[{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"},{"line_number":1191,"context_line":"                # task, try to clean up the import status information left"},{"line_number":1192,"context_line":"                # over from that execution."},{"line_number":1193,"context_line":"                if stole_lock_from_task:"},{"line_number":1194,"context_line":"                    self._cleanup_stale_task_progress(image_repo, image,"},{"line_number":1195,"context_line":"                                                      stole_lock_from_task)"},{"line_number":1196,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"58ba0cbf_c712c0a1","line":1193,"range":{"start_line":1193,"start_character":19,"end_line":1193,"end_character":39},"in_reply_to":"012d2ca5_5b326803","updated":"2024-01-30 13:44:02.000000000","message":"Yeah, seems wrong to me. I assume that also means there\u0027s a test missing for this case.","commit_id":"9be49692618877c5d91f1cadcc73c690eb401d7e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6aa1dbd07000f530c7f0cefd7f4990f2516ac01e","unresolved":false,"context_lines":[{"line_number":1190,"context_line":"                # If we busted the lock above and have a reference to that"},{"line_number":1191,"context_line":"                # task, try to clean up the import status information left"},{"line_number":1192,"context_line":"                # over from that execution."},{"line_number":1193,"context_line":"                if stole_lock_from_task:"},{"line_number":1194,"context_line":"                    self._cleanup_stale_task_progress(image_repo, image,"},{"line_number":1195,"context_line":"                                                      stole_lock_from_task)"},{"line_number":1196,"context_line":""}],"source_content_type":"text/x-python","patch_set":54,"id":"7a1c9a8d_79fc3ee5","line":1193,"range":{"start_line":1193,"start_character":19,"end_line":1193,"end_character":39},"in_reply_to":"58ba0cbf_c712c0a1","updated":"2024-02-01 10:34:16.000000000","message":"Done","commit_id":"9be49692618877c5d91f1cadcc73c690eb401d7e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"da02c7e6aaa7d32a27d25fa6a9fcb077e18c708e","unresolved":true,"context_lines":[{"line_number":1151,"context_line":"            if \u0027service\u0027 not in roles:"},{"line_number":1152,"context_line":"                # NOTE(pdeore): Add location API is disabled for other stores"},{"line_number":1153,"context_line":"                # than http"},{"line_number":1154,"context_line":"                if not utils.is_http_store_configured():"},{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1160,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":57,"id":"66e56cad_26aa9248","line":1157,"range":{"start_line":1154,"start_character":16,"end_line":1157,"end_character":50},"updated":"2024-02-20 06:52:57.000000000","message":"Need to enhance this check if multistore is enabled.","commit_id":"04f45f2219b8d8b56bd052dfe494972b245c4d37"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4af8b74393b30666d3f0dceb81444763b62e721c","unresolved":false,"context_lines":[{"line_number":1151,"context_line":"            if \u0027service\u0027 not in roles:"},{"line_number":1152,"context_line":"                # NOTE(pdeore): Add location API is disabled for other stores"},{"line_number":1153,"context_line":"                # than http"},{"line_number":1154,"context_line":"                if not utils.is_http_store_configured():"},{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":""},{"line_number":1159,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1160,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":57,"id":"512b2a6e_54f6e87e","line":1157,"range":{"start_line":1154,"start_character":16,"end_line":1157,"end_character":50},"in_reply_to":"66e56cad_26aa9248","updated":"2024-02-20 10:25:09.000000000","message":"Done","commit_id":"04f45f2219b8d8b56bd052dfe494972b245c4d37"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"014052e8891ed6a72d781f8c0f291bdea984e507","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"},{"line_number":1179,"context_line":"                try:"},{"line_number":1180,"context_line":"                    image_repo.set_property_atomic("},{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"}],"source_content_type":"text/x-python","patch_set":71,"id":"953b7890_797b2a3a","line":1179,"updated":"2024-02-28 23:14:43.000000000","message":"This is three levels of exception handling deep. I don\u0027t think that\u0027s helpful and definitely makes sanity checking this hard. AFAICT, you can put the catch of `exception.Duplicate` in the top-level exception handler and achieve the same goal without the extra nesting.","commit_id":"2f806d3285de2591166f0056f32602f4993986b9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4ba4629b2583070cb78a8daf156e5790d215daf2","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"                    user_id\u003dctxt.user_id,"},{"line_number":1177,"context_line":"                    request_id\u003dctxt.request_id)"},{"line_number":1178,"context_line":"                # NOTE(pdeore): Try to grab the lock for this task"},{"line_number":1179,"context_line":"                try:"},{"line_number":1180,"context_line":"                    image_repo.set_property_atomic("},{"line_number":1181,"context_line":"                        image, \u0027os_glance_import_task\u0027,"},{"line_number":1182,"context_line":"                        add_location_task.task_id)"}],"source_content_type":"text/x-python","patch_set":71,"id":"2f7530e2_4d1fa385","line":1179,"in_reply_to":"953b7890_797b2a3a","updated":"2024-02-29 10:19:33.000000000","message":"Done","commit_id":"2f806d3285de2591166f0056f32602f4993986b9"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"014052e8891ed6a72d781f8c0f291bdea984e507","unresolved":true,"context_lines":[{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"        except exception.NotFound as e:"},{"line_number":1206,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":71,"id":"313943e3_1eb993f2","line":1203,"updated":"2024-02-28 23:14:43.000000000","message":"Here too, you\u0027re already doing this in the top-level handler, why do you need another handler here just to catch and raise the same `HTTPForbidden`? Surely the error message in `str(e)` that you\u0027re raising must be helpful enough to know what\u0027s going on, so if you log it in both places it will be obvious for the admin.\n\nBut, I don\u0027t actually see an answer to the original question: When and why will this happen? Just adding a test for it helps with coverage, but.. is it actually a legit failure path? Nova will try to do this as the owner of the instance (which will generally be a completely unprivileged user). If this doesn\u0027t work, things will break. Obviously if they break they break, but you catching it here specifically makes it seem like this is _expected_ to break. If so, what are the conditions?","commit_id":"2f806d3285de2591166f0056f32602f4993986b9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"4ba4629b2583070cb78a8daf156e5790d215daf2","unresolved":true,"context_lines":[{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"        except exception.NotFound as e:"},{"line_number":1206,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":71,"id":"e50df2d8_d2712d97","line":1203,"in_reply_to":"313943e3_1eb993f2","updated":"2024-02-29 10:19:33.000000000","message":"As add location is allowed to service user or the owner of the image (in http case) and if we do the policy check for add_image_location at the start then we don\u0027t need check this for location_import task in think. Earlier I just tried to add it similar to image-import :/ \nRemoving it now.","commit_id":"2f806d3285de2591166f0056f32602f4993986b9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bd6adb8fdd022e710fc381935ad75d6c88c53f92","unresolved":false,"context_lines":[{"line_number":1200,"context_line":"                pool.spawn(add_location_task.run, task_executor)"},{"line_number":1201,"context_line":"            except exception.Forbidden as e:"},{"line_number":1202,"context_line":"                LOG.debug(\"User not permitted to create add \""},{"line_number":1203,"context_line":"                          \"location task.\")"},{"line_number":1204,"context_line":"                raise webob.exc.HTTPForbidden(explanation\u003de.msg)"},{"line_number":1205,"context_line":"        except exception.NotFound as e:"},{"line_number":1206,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003de.msg)"}],"source_content_type":"text/x-python","patch_set":71,"id":"abb83c56_28af177a","line":1203,"in_reply_to":"e50df2d8_d2712d97","updated":"2024-04-29 08:04:13.000000000","message":"Done","commit_id":"2f806d3285de2591166f0056f32602f4993986b9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d46a4b8ab3d64a6551cab0890b8e085cedc7f185","unresolved":true,"context_lines":[{"line_number":1161,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1162,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1165,"context_line":"            task_input \u003d {\u0027image_id\u0027: image_id,"},{"line_number":1166,"context_line":"                          \u0027loc_url\u0027: url,"},{"line_number":1167,"context_line":"                          \u0027validation_data\u0027: validation_data}"}],"source_content_type":"text/x-python","patch_set":81,"id":"d0dad5b8_0030ac98","line":1164,"range":{"start_line":1164,"start_character":12,"end_line":1164,"end_character":56},"updated":"2024-06-14 06:30:10.000000000","message":"I think this should be done before 1159","commit_id":"2daa78f28a74ed736dacaffff2c69fc8be3d4fa9"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"583063c47166798adaeab8f18f3457d4db18500e","unresolved":false,"context_lines":[{"line_number":1161,"context_line":"                # lock is present and valid, or return if absent or invalid."},{"line_number":1162,"context_line":"                stole_lock_from_task \u003d self._enforce_import_lock(req, image)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1165,"context_line":"            task_input \u003d {\u0027image_id\u0027: image_id,"},{"line_number":1166,"context_line":"                          \u0027loc_url\u0027: url,"},{"line_number":1167,"context_line":"                          \u0027validation_data\u0027: validation_data}"}],"source_content_type":"text/x-python","patch_set":81,"id":"5a93bb52_853dccb0","line":1164,"range":{"start_line":1164,"start_character":12,"end_line":1164,"end_character":56},"in_reply_to":"d0dad5b8_0030ac98","updated":"2024-06-14 10:36:55.000000000","message":"Done","commit_id":"2daa78f28a74ed736dacaffff2c69fc8be3d4fa9"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0b8299ac63a4aa6ed43bfe79897205833cdc49c8","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"9bd62684_989b1e85","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"updated":"2024-06-26 17:38:16.000000000","message":"I think this will now depend on new spec related to hashing algorithms, https://review.opendev.org/c/openstack/glance-specs/+/922015?usp\u003dsearch\n\nI think if that is approved and implementation gets merged before this one then you need to make changes here or afterwards. I would suggest to have discussion with stephen and find out final list of supported algorithms.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7315d13de031a5eac1bf1f786288e765e48d1ad0","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"aff0f66b_daff9152","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"1faf85d9_d5854e7e","updated":"2024-07-25 07:25:18.000000000","message":"Acknowledged, then should we also include md5 here?","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"db9df75e6d33faee9c87fb3f9ef6377fb26759cd","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"1faf85d9_d5854e7e","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"2140558f_9c314f6d","updated":"2024-07-25 06:57:02.000000000","message":"Well, I tried but not received reply from him, I will again try to ping him.\nBut by looking at the implementation part of the recent spec, sha512,sha256,sha1,md5 these are the allowed values.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c3d9d84f2cf0374c9eeb9392d60656b730e3c05c","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"ad421c86_8e6e1aa6","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"9bd62684_989b1e85","updated":"2024-06-28 12:48:22.000000000","message":"yeah, I will discuss with Stephen.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"bb6ec111_3c1ad1ec","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"ad421c86_8e6e1aa6","updated":"2024-07-18 05:18:53.000000000","message":"Have you discussed this with Stephen?","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"128508c54e99f2757ec312b611a9af93f0956834","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"28b2eff9_125d4fbc","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"aff0f66b_daff9152","updated":"2024-07-25 10:32:51.000000000","message":"yeah I think it would be better to add all allowed values as per the hash_algo spec","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"97d857523089fe8d46bc8f63e21baa48a1311d9f","unresolved":true,"context_lines":[{"line_number":1976,"context_line":"                        \u0027os_hash_algo\u0027: {"},{"line_number":1977,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"},{"line_number":1978,"context_line":"                            \u0027maxLength\u0027: 64,"},{"line_number":1979,"context_line":"                            \u0027enum\u0027: [\u0027sha1\u0027, \u0027sha224\u0027, \u0027sha256\u0027, \u0027sha384\u0027,"},{"line_number":1980,"context_line":"                                     \u0027sha512\u0027],"},{"line_number":1981,"context_line":"                        },"},{"line_number":1982,"context_line":"                        \u0027os_hash_value\u0027: {"},{"line_number":1983,"context_line":"                            \u0027type\u0027: \u0027string\u0027,"}],"source_content_type":"text/x-python","patch_set":82,"id":"2140558f_9c314f6d","line":1980,"range":{"start_line":1979,"start_character":28,"end_line":1980,"end_character":47},"in_reply_to":"bb6ec111_3c1ad1ec","updated":"2024-07-22 07:51:32.000000000","message":"???","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"edfe33f3b566f70e4a78e0b35ece0180aa968a91","unresolved":true,"context_lines":[{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1159,"context_line":""},{"line_number":1160,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1161,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":83,"id":"9c6e0302_eef42d44","line":1158,"range":{"start_line":1158,"start_character":11,"end_line":1158,"end_character":56},"updated":"2024-07-10 18:48:49.000000000","message":"Since service user will not send validation data should we call this method then also?\n\nI think here you should check if validation_data is not None then only call this method.","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b281ed61aba50f3236f337f87c559e40e5bd609","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":"            self._validate_hashing_data(validation_data)"},{"line_number":1159,"context_line":""},{"line_number":1160,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"},{"line_number":1161,"context_line":"                # NOTE(pdeore): This will raise exception.Conflict if the"}],"source_content_type":"text/x-python","patch_set":83,"id":"5bbfc3b3_c22693f9","line":1158,"range":{"start_line":1158,"start_character":11,"end_line":1158,"end_character":56},"in_reply_to":"9c6e0302_eef42d44","updated":"2024-07-16 10:55:30.000000000","message":"Done","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"edfe33f3b566f70e4a78e0b35ece0180aa968a91","unresolved":true,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"a41722b0_6da1da96","line":1194,"updated":"2024-07-10 18:48:49.000000000","message":"I think this is not covered or it will not reachable.","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"e5020df2_b6e54d11","line":1194,"in_reply_to":"152f4999_b5b0e2c1","updated":"2024-07-18 05:18:53.000000000","message":"As per your comment at line 1162 if there is already task in progress then it will raise Conflict and not Duplicate. So are you sure about this?\n\nAlso this except Duplicate should be limited to line 1180 only.\nFor example, https://github.com/openstack/glance/blob/master/glance/api/v2/images.py#L470\n\nAlso you need to catch Conflict exception before/after line 1200","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"128508c54e99f2757ec312b611a9af93f0956834","unresolved":false,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"f7bb2db5_5649025f","line":1194,"in_reply_to":"247b2714_223f0707","updated":"2024-07-25 10:32:51.000000000","message":"Done","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"db9df75e6d33faee9c87fb3f9ef6377fb26759cd","unresolved":true,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"247b2714_223f0707","line":1194,"in_reply_to":"9b66306e_7c791824","updated":"2024-07-25 06:57:02.000000000","message":"Yes, verfied, https://paste.opendev.org/show/btN4ocGmqzBAiDO4GXRN/","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b281ed61aba50f3236f337f87c559e40e5bd609","unresolved":true,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"152f4999_b5b0e2c1","line":1194,"in_reply_to":"a41722b0_6da1da96","updated":"2024-07-16 10:55:30.000000000","message":"This will be raise if previous task is in process and new operation is attempted, which is not allowed. And this is covered in [1]\n\n[1]: https://review.opendev.org/c/openstack/glance/+/881940/83/glance/tests/unit/v2/test_images_resource.py#4076","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"97d857523089fe8d46bc8f63e21baa48a1311d9f","unresolved":true,"context_lines":[{"line_number":1191,"context_line":"            task_executor \u003d executor_factory.new_task_executor(ctxt)"},{"line_number":1192,"context_line":"            pool \u003d common.get_thread_pool(\"tasks_pool\")"},{"line_number":1193,"context_line":"            pool.spawn(add_location_task.run, task_executor)"},{"line_number":1194,"context_line":"        except exception.Duplicate:"},{"line_number":1195,"context_line":"            msg \u003d (_(\"New operation on image \u0027%s\u0027 is not \""},{"line_number":1196,"context_line":"                     \"permitted as prior operation is still \""},{"line_number":1197,"context_line":"                     \"in progress\") % image_id)"}],"source_content_type":"text/x-python","patch_set":83,"id":"9b66306e_7c791824","line":1194,"in_reply_to":"e5020df2_b6e54d11","updated":"2024-07-22 07:51:32.000000000","message":"can you verify this comment is addressed or not?","commit_id":"b87637b604891ba9654dba16d05afda360665b9e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"8d36d5ab5257be38f55df2556f1615af460d460c","unresolved":true,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"            hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":941,"context_line":"                                     CONF[\u0027hashing_algorithm\u0027])"},{"line_number":942,"context_line":"            want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":943,"context_line":"            if len(hashval) !\u003d want_size:"},{"line_number":944,"context_line":"                msg \u003d (_(\"os_hash_value: (%(value)s) is not the correct \""},{"line_number":945,"context_line":"                         \"size for (%(algo)s) \""},{"line_number":946,"context_line":"                         \"(should be (%(want)d) bytes)\") %"},{"line_number":947,"context_line":"                       {\u0027value\u0027: val_data[\u0027os_hash_value\u0027],"},{"line_number":948,"context_line":"                        \u0027algo\u0027: hash_algo,"},{"line_number":949,"context_line":"                        \u0027want\u0027: want_size})"},{"line_number":950,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":953,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":85,"id":"1b228b8a_bbdb791d","line":950,"range":{"start_line":942,"start_character":12,"end_line":950,"end_character":63},"updated":"2024-07-18 08:05:51.000000000","message":"Valid hash value using sha256 for image \u0027cirros-0.3.4-x86_64-disk.img\u0027 is \u002734987d0d5702f8813f3ff9efe90e9e39e6926ec78658763580a79face67f3394\u0027 \n\nHere we are validating length expected for hash_algo and not actual expected hash value.\n\nSO if user provides garbage value for os_hash_value with same expected length, i.e.\nsomething like this (I am just changing last character of above valid hash) \u002734987d0d5702f8813f3ff9efe90e9e39e6926ec78658763580a79face67f3395\u0027 \n\nIn this case the image will be active with wrong hash value and it will be of no use as download or boot will fail with corrupt image error.\n\n\nSo should we allow providing hash values if we are not going to validate it if do_secure_hash is set to False?","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":true,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"            hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":941,"context_line":"                                     CONF[\u0027hashing_algorithm\u0027])"},{"line_number":942,"context_line":"            want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":943,"context_line":"            if len(hashval) !\u003d want_size:"},{"line_number":944,"context_line":"                msg \u003d (_(\"os_hash_value: (%(value)s) is not the correct \""},{"line_number":945,"context_line":"                         \"size for (%(algo)s) \""},{"line_number":946,"context_line":"                         \"(should be (%(want)d) bytes)\") %"},{"line_number":947,"context_line":"                       {\u0027value\u0027: val_data[\u0027os_hash_value\u0027],"},{"line_number":948,"context_line":"                        \u0027algo\u0027: hash_algo,"},{"line_number":949,"context_line":"                        \u0027want\u0027: want_size})"},{"line_number":950,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":953,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":85,"id":"9c813cdd_df70cf80","line":950,"range":{"start_line":942,"start_character":12,"end_line":950,"end_character":63},"in_reply_to":"1b228b8a_bbdb791d","updated":"2024-07-22 07:25:34.000000000","message":"yeah, the same issue is with old_location api as well.\nwe have only location url here, is there any way out to calculate the right hash value from loc ? Need to discuss this the experts. \n\nIf we find any solution after the discussion, I will fix this in follow-up patch.","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"db9df75e6d33faee9c87fb3f9ef6377fb26759cd","unresolved":false,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"            hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":941,"context_line":"                                     CONF[\u0027hashing_algorithm\u0027])"},{"line_number":942,"context_line":"            want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":943,"context_line":"            if len(hashval) !\u003d want_size:"},{"line_number":944,"context_line":"                msg \u003d (_(\"os_hash_value: (%(value)s) is not the correct \""},{"line_number":945,"context_line":"                         \"size for (%(algo)s) \""},{"line_number":946,"context_line":"                         \"(should be (%(want)d) bytes)\") %"},{"line_number":947,"context_line":"                       {\u0027value\u0027: val_data[\u0027os_hash_value\u0027],"},{"line_number":948,"context_line":"                        \u0027algo\u0027: hash_algo,"},{"line_number":949,"context_line":"                        \u0027want\u0027: want_size})"},{"line_number":950,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":953,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":85,"id":"043c9974_686543ba","line":950,"range":{"start_line":942,"start_character":12,"end_line":950,"end_character":63},"in_reply_to":"809c65d0_afdd2c2d","updated":"2024-07-25 06:57:02.000000000","message":"Acknowledged","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"97d857523089fe8d46bc8f63e21baa48a1311d9f","unresolved":true,"context_lines":[{"line_number":939,"context_line":""},{"line_number":940,"context_line":"            hash_algo \u003d val_data.get(\u0027os_hash_algo\u0027,"},{"line_number":941,"context_line":"                                     CONF[\u0027hashing_algorithm\u0027])"},{"line_number":942,"context_line":"            want_size \u003d hashlib.new(hash_algo).digest_size"},{"line_number":943,"context_line":"            if len(hashval) !\u003d want_size:"},{"line_number":944,"context_line":"                msg \u003d (_(\"os_hash_value: (%(value)s) is not the correct \""},{"line_number":945,"context_line":"                         \"size for (%(algo)s) \""},{"line_number":946,"context_line":"                         \"(should be (%(want)d) bytes)\") %"},{"line_number":947,"context_line":"                       {\u0027value\u0027: val_data[\u0027os_hash_value\u0027],"},{"line_number":948,"context_line":"                        \u0027algo\u0027: hash_algo,"},{"line_number":949,"context_line":"                        \u0027want\u0027: want_size})"},{"line_number":950,"context_line":"                raise webob.exc.HTTPBadRequest(explanation\u003dmsg)"},{"line_number":951,"context_line":""},{"line_number":952,"context_line":"    def _validate_validation_data(self, image, locations):"},{"line_number":953,"context_line":"        val_data \u003d {}"}],"source_content_type":"text/x-python","patch_set":85,"id":"809c65d0_afdd2c2d","line":950,"range":{"start_line":942,"start_character":12,"end_line":950,"end_character":63},"in_reply_to":"9c813cdd_df70cf80","updated":"2024-07-22 07:51:32.000000000","message":"If you are going to fix this in followup, i think better to mention in the reno as well.","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":1143,"context_line":"                msg \u003d _(\"It\u0027s not allowed to add locations if image status is \""},{"line_number":1144,"context_line":"                        \"%s.\") % image.status"},{"line_number":1145,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1146,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1147,"context_line":"                                                self.policy)"},{"line_number":1148,"context_line":"            api_pol.add_location()"},{"line_number":1149,"context_line":""}],"source_content_type":"text/x-python","patch_set":85,"id":"c296dc94_8303b481","line":1146,"updated":"2024-07-18 05:18:53.000000000","message":"nit:blank line before this","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":false,"context_lines":[{"line_number":1143,"context_line":"                msg \u003d _(\"It\u0027s not allowed to add locations if image status is \""},{"line_number":1144,"context_line":"                        \"%s.\") % image.status"},{"line_number":1145,"context_line":"                raise webob.exc.HTTPConflict(explanation\u003dmsg)"},{"line_number":1146,"context_line":"            api_pol \u003d api_policy.ImageAPIPolicy(req.context, image,"},{"line_number":1147,"context_line":"                                                self.policy)"},{"line_number":1148,"context_line":"            api_pol.add_location()"},{"line_number":1149,"context_line":""}],"source_content_type":"text/x-python","patch_set":85,"id":"e908c1e6_09ad2bdc","line":1146,"in_reply_to":"c296dc94_8303b481","updated":"2024-07-22 07:25:34.000000000","message":"Done","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":"            if validation_data is not None:"},{"line_number":1159,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"}],"source_content_type":"text/x-python","patch_set":85,"id":"925103cc_2da7aa8c","line":1158,"updated":"2024-07-18 05:18:53.000000000","message":"nit:blank line before this","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"                    msg \u003d _(\"http store must be enabled to use location API\""},{"line_number":1156,"context_line":"                            \" by normal user.\")"},{"line_number":1157,"context_line":"                    raise exception.Forbidden(msg)"},{"line_number":1158,"context_line":"            if validation_data is not None:"},{"line_number":1159,"context_line":"                self._validate_hashing_data(validation_data)"},{"line_number":1160,"context_line":""},{"line_number":1161,"context_line":"            if \u0027os_glance_import_task\u0027 in image.extra_properties:"}],"source_content_type":"text/x-python","patch_set":85,"id":"fa7cb512_d78353d6","line":1158,"in_reply_to":"925103cc_2da7aa8c","updated":"2024-07-22 07:25:34.000000000","message":"Done","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":1176,"context_line":"                image_id\u003dimage_id,"},{"line_number":1177,"context_line":"                user_id\u003dctxt.user_id,"},{"line_number":1178,"context_line":"                request_id\u003dctxt.request_id)"},{"line_number":1179,"context_line":"            # NOTE(pdeore): Try to grab the lock for this task"},{"line_number":1180,"context_line":"            image_repo.set_property_atomic(image, \u0027os_glance_import_task\u0027,"},{"line_number":1181,"context_line":"                                           add_location_task.task_id)"},{"line_number":1182,"context_line":""}],"source_content_type":"text/x-python","patch_set":85,"id":"6dcd5f9a_b963d834","line":1179,"updated":"2024-07-18 05:18:53.000000000","message":"nit:blank line before this","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":false,"context_lines":[{"line_number":1176,"context_line":"                image_id\u003dimage_id,"},{"line_number":1177,"context_line":"                user_id\u003dctxt.user_id,"},{"line_number":1178,"context_line":"                request_id\u003dctxt.request_id)"},{"line_number":1179,"context_line":"            # NOTE(pdeore): Try to grab the lock for this task"},{"line_number":1180,"context_line":"            image_repo.set_property_atomic(image, \u0027os_glance_import_task\u0027,"},{"line_number":1181,"context_line":"                                           add_location_task.task_id)"},{"line_number":1182,"context_line":""}],"source_content_type":"text/x-python","patch_set":85,"id":"65f26b48_893aa632","line":1179,"in_reply_to":"6dcd5f9a_b963d834","updated":"2024-07-22 07:25:34.000000000","message":"Done","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b200b7153b1119e8bc564e76be5af745ad756a38","unresolved":true,"context_lines":[{"line_number":1663,"context_line":"        body \u003d self._get_request_body(request)"},{"line_number":1664,"context_line":"        values \u003d {\u0027add_location\u0027: body}"},{"line_number":1665,"context_line":"        try:"},{"line_number":1666,"context_line":"            self.schema.validate(values)"},{"line_number":1667,"context_line":"        except exception.InvalidObject as e:"},{"line_number":1668,"context_line":"            raise webob.exc.HTTPBadRequest(explanation\u003de.msg)"},{"line_number":1669,"context_line":""}],"source_content_type":"text/x-python","patch_set":89,"id":"0bebde9c_9690a113","line":1666,"range":{"start_line":1666,"start_character":12,"end_line":1666,"end_character":40},"updated":"2024-07-31 07:24:22.000000000","message":"In order to unblock Artem, I think you need to remove add_location from get_base_properties and create new variable self.location_schema and call it self.loaction_schema.validate(values) here.","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"c67f2676bafa1f31212110e90a8321fbda6562ef","unresolved":true,"context_lines":[{"line_number":1956,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1957,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1958,"context_line":"        },"},{"line_number":1959,"context_line":"        \u0027add_location\u0027: {"},{"line_number":1960,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":1961,"context_line":"            \u0027description\u0027: _(\u0027Values of location url, do_secure_hash and \u0027"},{"line_number":1962,"context_line":"                             \u0027validation_data for new add location API\u0027),"}],"source_content_type":"text/x-python","patch_set":89,"id":"633679fc_160fadcb","line":1959,"updated":"2024-07-31 07:11:36.000000000","message":"what is the rationale behind this part of the change? You extend base jsonschema of the image with the stuff that is never part of the image schema. It broke codegenerator that is trying to generate openapi specs by inspecting the code of services since you in reality added \"add_location\" object into the base image schema what is immediately visible on the serializer and deserializer. Now I need to stop building code for glance (see the schema generated in https://a76d26fad86248a2c861-21cf5a0d939ed856705ff8889db81bff.ssl.cf1.rackcdn.com/925062/34/gate/codegenerator-openapi-image-tips-with-api-ref/151a41f/artifacts/openapi_specs/image/v2.16.yaml and look at ImagesIndexRequest as the detected image creation schema). It may be (still to be checked) have an impact of glance actually now accepting this parameter leading you to bugs (and it looks like that since i.e. image create call is just validating the body against the schema and would place \u0027add_location\u0027 into the extra_properties). I actually also do not really see where this addition is required at all.","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b200b7153b1119e8bc564e76be5af745ad756a38","unresolved":true,"context_lines":[{"line_number":1956,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1957,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1958,"context_line":"        },"},{"line_number":1959,"context_line":"        \u0027add_location\u0027: {"},{"line_number":1960,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":1961,"context_line":"            \u0027description\u0027: _(\u0027Values of location url, do_secure_hash and \u0027"},{"line_number":1962,"context_line":"                             \u0027validation_data for new add location API\u0027),"}],"source_content_type":"text/x-python","patch_set":89,"id":"cff6aa06_edfe6cae","line":1959,"in_reply_to":"633679fc_160fadcb","updated":"2024-07-31 07:24:22.000000000","message":"Could you please report this as a bug and set it as critical?","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"},{"author":{"_account_id":27900,"name":"Artem Goncharov","email":"artem.goncharov@gmail.com","username":"gtema"},"change_message_id":"0fc6732d0b9744f4f5126daa4b6643c5ca922368","unresolved":true,"context_lines":[{"line_number":1956,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1957,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1958,"context_line":"        },"},{"line_number":1959,"context_line":"        \u0027add_location\u0027: {"},{"line_number":1960,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":1961,"context_line":"            \u0027description\u0027: _(\u0027Values of location url, do_secure_hash and \u0027"},{"line_number":1962,"context_line":"                             \u0027validation_data for new add location API\u0027),"}],"source_content_type":"text/x-python","patch_set":89,"id":"f349f322_1205d181","line":1959,"in_reply_to":"8cd218af_8edc5839","updated":"2024-08-01 07:52:50.000000000","message":"Yes, thank you very much (https://13154b20c8bc7d130c91-277fe61cde1e0fafc7c227e50deabdc0.ssl.cf5.rackcdn.com/925443/1/check/codegenerator-openapi-image-tips-with-api-ref/0a8f790/artifacts/openapi_specs/image/v2.16.yaml). The image schema is now back to normal. I would need to make changes on my side to consume add_location schema from separate location, but that is at least not blocking any more.\n\nThank a lot one more time for quick fix.","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"175848786912642e5d1b73d17f8c877ef9d6c877","unresolved":true,"context_lines":[{"line_number":1956,"context_line":"            \u0027readOnly\u0027: True,"},{"line_number":1957,"context_line":"            \u0027description\u0027: _(\u0027An image schema url\u0027),"},{"line_number":1958,"context_line":"        },"},{"line_number":1959,"context_line":"        \u0027add_location\u0027: {"},{"line_number":1960,"context_line":"            \u0027type\u0027: \u0027object\u0027,"},{"line_number":1961,"context_line":"            \u0027description\u0027: _(\u0027Values of location url, do_secure_hash and \u0027"},{"line_number":1962,"context_line":"                             \u0027validation_data for new add location API\u0027),"}],"source_content_type":"text/x-python","patch_set":89,"id":"8cd218af_8edc5839","line":1959,"in_reply_to":"cff6aa06_edfe6cae","updated":"2024-08-01 06:24:25.000000000","message":"Hi Artem,\n\nCan you please verify that you are unblocked now, since https://review.opendev.org/c/openstack/glance/+/925333?usp\u003dsearch is merged?","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b200b7153b1119e8bc564e76be5af745ad756a38","unresolved":true,"context_lines":[{"line_number":2091,"context_line":""},{"line_number":2092,"context_line":"def create_resource(custom_properties\u003dNone):"},{"line_number":2093,"context_line":"    \"\"\"Images resource factory method\"\"\""},{"line_number":2094,"context_line":"    schema \u003d get_schema(custom_properties)"},{"line_number":2095,"context_line":"    deserializer \u003d RequestDeserializer(schema)"},{"line_number":2096,"context_line":"    serializer \u003d ResponseSerializer(schema)"},{"line_number":2097,"context_line":"    controller \u003d ImagesController()"}],"source_content_type":"text/x-python","patch_set":89,"id":"7086b35a_ef0149c3","line":2094,"updated":"2024-07-31 07:24:22.000000000","message":"define new variable location_schema \u003d. get_location_schema()\nalso add new keyword argument","commit_id":"4281558dff399dd9e7b462a499fa5a925245643a"}],"glance/api/v2/router.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        # Location APIs"},{"line_number":496,"context_line":"        image_actions_resource \u003d image_actions.create_resource()"},{"line_number":497,"context_line":"        mapper.connect(\u0027/images/{image_id}/location\u0027,"},{"line_number":498,"context_line":"                       controller\u003dimages_resource,"},{"line_number":499,"context_line":"                       action\u003d\u0027add_location\u0027,"},{"line_number":500,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027POST\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"d0bed0d8_49d5cf23","line":497,"range":{"start_line":497,"start_character":43,"end_line":497,"end_character":51},"updated":"2023-05-08 09:17:40.000000000","message":"this should be locations","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":494,"context_line":""},{"line_number":495,"context_line":"        # Location APIs"},{"line_number":496,"context_line":"        image_actions_resource \u003d image_actions.create_resource()"},{"line_number":497,"context_line":"        mapper.connect(\u0027/images/{image_id}/location\u0027,"},{"line_number":498,"context_line":"                       controller\u003dimages_resource,"},{"line_number":499,"context_line":"                       action\u003d\u0027add_location\u0027,"},{"line_number":500,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027POST\u0027]})"}],"source_content_type":"text/x-python","patch_set":5,"id":"4995c7be_bcff9e6e","line":497,"range":{"start_line":497,"start_character":43,"end_line":497,"end_character":51},"in_reply_to":"d0bed0d8_49d5cf23","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":498,"context_line":"                       controller\u003dimages_resource,"},{"line_number":499,"context_line":"                       action\u003d\u0027add_location\u0027,"},{"line_number":500,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027POST\u0027]})"},{"line_number":501,"context_line":"        mapper.connect(\u0027/images/{image_id}/locations\u0027,"},{"line_number":502,"context_line":"                       controller\u003dimages_resource,"},{"line_number":503,"context_line":"                       action\u003d\u0027get_locations\u0027,"},{"line_number":504,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027GET\u0027]})"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        image_tags_resource \u003d image_tags.create_resource()"},{"line_number":507,"context_line":"        mapper.connect(\u0027/images/{image_id}/tags/{tag_value}\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"00428c4d_c6c03460","line":504,"range":{"start_line":501,"start_character":16,"end_line":504,"end_character":54},"updated":"2023-05-08 09:17:40.000000000","message":"This should be part of the get_location patch","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":498,"context_line":"                       controller\u003dimages_resource,"},{"line_number":499,"context_line":"                       action\u003d\u0027add_location\u0027,"},{"line_number":500,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027POST\u0027]})"},{"line_number":501,"context_line":"        mapper.connect(\u0027/images/{image_id}/locations\u0027,"},{"line_number":502,"context_line":"                       controller\u003dimages_resource,"},{"line_number":503,"context_line":"                       action\u003d\u0027get_locations\u0027,"},{"line_number":504,"context_line":"                       conditions\u003d{\u0027method\u0027: [\u0027GET\u0027]})"},{"line_number":505,"context_line":""},{"line_number":506,"context_line":"        image_tags_resource \u003d image_tags.create_resource()"},{"line_number":507,"context_line":"        mapper.connect(\u0027/images/{image_id}/tags/{tag_value}\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"88f7355a_298ba41d","line":504,"range":{"start_line":501,"start_character":16,"end_line":504,"end_character":54},"in_reply_to":"00428c4d_c6c03460","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"}],"glance/async_/flows/api_image_import.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"c19debb83843c6c4c5d592c57d088b29af76453a","unresolved":true,"context_lines":[{"line_number":1106,"context_line":"                         delta\u003dimage_size)"},{"line_number":1107,"context_line":"            assert_quota(kwargs[\u0027context\u0027], task_repo, task_id,"},{"line_number":1108,"context_line":"                         stores, action_wrapper,"},{"line_number":1109,"context_line":"                         ks_quota.enforce_image_count_uploading)"},{"line_number":1110,"context_line":""},{"line_number":1111,"context_line":"    return flow"}],"source_content_type":"text/x-python","patch_set":15,"id":"81809aab_e9fa86ac","line":1109,"updated":"2023-06-21 13:53:12.000000000","message":"Yeah this is a good demonstration of Abhi\u0027s comment. You\u0027re basically putting the entire meat of this flow in an else (which is much too big, IMHO) and switching out dozens of lines for your two new ones. That makes the flow do one small thing *or* one large thing, which is not very helpful re-use I think.\n\nI think we need a new flow here, and anything we can share between the two is great. Your new flow can import and use _CompleteTask for example. AFAICT, that\u0027s about the only thing these two share.","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"}],"glance/common/config.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"2ab6acb84f44b6648d0944b21e2a8752bac5b1c9","unresolved":true,"context_lines":[{"line_number":424,"context_line":"\"\"\")),"},{"line_number":425,"context_line":"    cfg.IntOpt(\u0027http_retries\u0027, default\u003d3,"},{"line_number":426,"context_line":"               help\u003d_(\"\"\""},{"line_number":427,"context_line":"The number of retries to make for hash calculation incase of failure."},{"line_number":428,"context_line":"\"\"\")),"},{"line_number":429,"context_line":"    cfg.IntOpt(\u0027image_size_cap\u0027, default\u003d1099511627776, min\u003d1,"},{"line_number":430,"context_line":"               max\u003d9223372036854775808,"}],"source_content_type":"text/x-python","patch_set":15,"id":"2771c01f_d6d33fdc","line":427,"range":{"start_line":427,"start_character":51,"end_line":427,"end_character":57},"updated":"2023-06-21 16:43:19.000000000","message":"\"in case\"\n\nThis is not just hash calculation retries but also the number of times we\u0027ll try to fetch the image right? I would just suggest making the explanation here a little more generic in line with the name of the opt. It will also pay off if/when we later use this for web_download.","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":424,"context_line":"\"\"\")),"},{"line_number":425,"context_line":"    cfg.IntOpt(\u0027http_retries\u0027, default\u003d3,"},{"line_number":426,"context_line":"               help\u003d_(\"\"\""},{"line_number":427,"context_line":"The number of retries to make for hash calculation incase of failure."},{"line_number":428,"context_line":"\"\"\")),"},{"line_number":429,"context_line":"    cfg.IntOpt(\u0027image_size_cap\u0027, default\u003d1099511627776, min\u003d1,"},{"line_number":430,"context_line":"               max\u003d9223372036854775808,"}],"source_content_type":"text/x-python","patch_set":15,"id":"68287d35_ae8d4800","line":427,"range":{"start_line":427,"start_character":51,"end_line":427,"end_character":57},"in_reply_to":"2771c01f_d6d33fdc","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"a7583d1f1c58730a2de6d6d8732ff651540525f8"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b367eba95b494412e05c3c839f00a0035141652b","unresolved":true,"context_lines":[{"line_number":416,"context_line":"\"\"\")),"},{"line_number":417,"context_line":"    cfg.BoolOpt(\u0027do_secure_hash\u0027, default\u003dTrue,"},{"line_number":418,"context_line":"                help\u003d_(\"\"\""},{"line_number":419,"context_line":"Tell the API whether to do the hash calculation or not."},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"Possible values:"},{"line_number":422,"context_line":"    * True"}],"source_content_type":"text/x-python","patch_set":28,"id":"deddf413_0060e318","line":419,"range":{"start_line":419,"start_character":0,"end_line":419,"end_character":55},"updated":"2023-08-09 17:40:11.000000000","message":"Calculate hash and checksum for the image.\n\nThis configuration option indicates that /v2/images/{image_id}/locations POST API will calculate hash and checksum of the image on the fly. If False it will silently ignore the hash and checksum calculation.","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":false,"context_lines":[{"line_number":416,"context_line":"\"\"\")),"},{"line_number":417,"context_line":"    cfg.BoolOpt(\u0027do_secure_hash\u0027, default\u003dTrue,"},{"line_number":418,"context_line":"                help\u003d_(\"\"\""},{"line_number":419,"context_line":"Tell the API whether to do the hash calculation or not."},{"line_number":420,"context_line":""},{"line_number":421,"context_line":"Possible values:"},{"line_number":422,"context_line":"    * True"}],"source_content_type":"text/x-python","patch_set":28,"id":"f18fa549_083fc224","line":419,"range":{"start_line":419,"start_character":0,"end_line":419,"end_character":55},"in_reply_to":"deddf413_0060e318","updated":"2023-08-14 11:54:23.000000000","message":"Done","commit_id":"279c010892c5f27790f6b8e4aa3bd0bdcb84d3ce"}],"glance/common/utils.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"04b8ffe064ea18868833c37ae2bd7d2d9a84560c","unresolved":true,"context_lines":[{"line_number":740,"context_line":"def is_http_store_configured(url):"},{"line_number":741,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http:\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores"}],"source_content_type":"text/x-python","patch_set":58,"id":"02056f67_fc070dc0","line":743,"range":{"start_line":743,"start_character":71,"end_line":743,"end_character":76},"updated":"2024-02-20 13:55:53.000000000","message":"it will fail for https","commit_id":"bbba4c28b756341ee0969658f6118120b86db44d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"a60221e053704e13b9f633ceb0bae39357fe4d8d","unresolved":false,"context_lines":[{"line_number":740,"context_line":"def is_http_store_configured(url):"},{"line_number":741,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http:\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores"}],"source_content_type":"text/x-python","patch_set":58,"id":"4f5fb5ce_14113966","line":743,"range":{"start_line":743,"start_character":71,"end_line":743,"end_character":76},"in_reply_to":"02056f67_fc070dc0","updated":"2024-02-21 13:02:21.000000000","message":"Done","commit_id":"bbba4c28b756341ee0969658f6118120b86db44d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"04b8ffe064ea18868833c37ae2bd7d2d9a84560c","unresolved":true,"context_lines":[{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http:\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores"}],"source_content_type":"text/x-python","patch_set":58,"id":"22a34d75_ba11f860","line":745,"range":{"start_line":745,"start_character":8,"end_line":745,"end_character":49},"updated":"2024-02-20 13:55:53.000000000","message":"after giving more thoughts, I think it is possible to define more than store using stores option as well, like stores \u003d file,http,rbd so it will allow add location for rbd if rbd is defined as default store.\n\nSo in this case you can check either like, url.startswith(\"http\") and conf.glance.default_store \u003d\u003d http","commit_id":"bbba4c28b756341ee0969658f6118120b86db44d"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"a60221e053704e13b9f633ceb0bae39357fe4d8d","unresolved":false,"context_lines":[{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http:\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores"}],"source_content_type":"text/x-python","patch_set":58,"id":"5a2a9b95_478316cb","line":745,"range":{"start_line":745,"start_character":8,"end_line":745,"end_character":49},"in_reply_to":"22a34d75_ba11f860","updated":"2024-02-21 13:02:21.000000000","message":"Acknowledged","commit_id":"bbba4c28b756341ee0969658f6118120b86db44d"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"9f7f78bc9682e53dcb61efa8316836636db21ea9","unresolved":true,"context_lines":[{"line_number":739,"context_line":""},{"line_number":740,"context_line":"def is_http_store_configured(url):"},{"line_number":741,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":63,"id":"53f55d0f_e875d7cd","line":745,"range":{"start_line":742,"start_character":4,"end_line":745,"end_character":76},"updated":"2024-02-27 11:36:04.000000000","message":"nit:\navailable_stores \u003d CONF.glance_store.stores\nif CONF.enabled_backends:\navailable_stores \u003d CONF.enabled_backends.values()\n\nreturn \u0027http\u0027 in available_stores and url.startswith(\"http\")\n\n\nAlso better to add coverage for this method.","commit_id":"e1a652c2961b7c145ee261c903c25f991471b72b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"3a60746678c1d97ec5b4a6292ab72007f9dd8152","unresolved":false,"context_lines":[{"line_number":739,"context_line":""},{"line_number":740,"context_line":"def is_http_store_configured(url):"},{"line_number":741,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":742,"context_line":"    if enabled_backends:"},{"line_number":743,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":744,"context_line":"    else:"},{"line_number":745,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":63,"id":"bad83bab_ab6039b6","line":745,"range":{"start_line":742,"start_character":4,"end_line":745,"end_character":76},"in_reply_to":"53f55d0f_e875d7cd","updated":"2024-02-27 13:26:19.000000000","message":"I think, if multiple backends enabled, CONF.glance_store.stores values will not be set","commit_id":"e1a652c2961b7c145ee261c903c25f991471b72b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"0b8299ac63a4aa6ed43bfe79897205833cdc49c8","unresolved":true,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"e72d9767_8779474b","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"updated":"2024-06-26 17:38:16.000000000","message":"If another PS is needed, I guess you can refactor it\n\nJust return False if url does not starts with http\n\nsomething like;\n\n```\ndef is_http_supported(url):\n    if not url.startswith(\"http\"):\n        return False\n\n    stores \u003d CONF.glance_store.stores\n    enabled_backends \u003d CONF.enabled_backends\n    if enabled_backends:\n        stores \u003d enabled_backends.values()\n\n    return \u0027http\u0027 in stores\n```","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"11b0cd346546d37421215808f15a001065336c66","unresolved":true,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"0d7f11d7_1da3836a","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"in_reply_to":"03fcbca7_f4a345bc","updated":"2024-07-01 14:45:30.000000000","message":"No, I think it\u0027s not set when multiple backends are enabled.\nbecause it gives \u0027oslo_config.cfg.NoSuchOptError: no such option stores in group [glance_store]\u0027 when it tries to read it from CONF.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7f63e707fa62f092f43bd8473b86077eaee03d8c","unresolved":true,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"181a0a4f_26802ff6","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"in_reply_to":"0d7f11d7_1da3836a","updated":"2024-07-01 14:51:25.000000000","message":"In that case you can refactor it like;\n\n```\ndef is_http_supported(url):\n    if not url.startswith(\"http\"):\n        return False\n\n    enabled_backends \u003d CONF.enabled_backends\n    if enabled_backends:\n        stores \u003d enabled_backends.values()\n    else:\n        stores \u003d CONF.glance_store.stores\n\n    return \u0027http\u0027 in stores\n```","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"edfe33f3b566f70e4a78e0b35ece0180aa968a91","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"52b2e395_04ffc1e4","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"in_reply_to":"181a0a4f_26802ff6","updated":"2024-07-10 18:48:49.000000000","message":"Done","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b53f37969084eedcc0be7a42059390a418cdf5d3","unresolved":true,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"03fcbca7_f4a345bc","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"in_reply_to":"9779fe9e_d74c55b5","updated":"2024-06-28 13:34:27.000000000","message":"I think stores option has default value set, \n\nhttps://github.com/openstack/glance_store/blob/master/glance_store/backend.py#L35\n\nIf multiple backend is set then stores will have list from enabled_backends option","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c3d9d84f2cf0374c9eeb9392d60656b730e3c05c","unresolved":false,"context_lines":[{"line_number":753,"context_line":""},{"line_number":754,"context_line":"def is_http_store_configured(url):"},{"line_number":755,"context_line":"    enabled_backends \u003d CONF.enabled_backends"},{"line_number":756,"context_line":"    if enabled_backends:"},{"line_number":757,"context_line":"        return \u0027http\u0027 in enabled_backends.values() and url.startswith(\"http\")"},{"line_number":758,"context_line":"    else:"},{"line_number":759,"context_line":"        return \u0027http\u0027 in CONF.glance_store.stores and url.startswith(\"http\")"}],"source_content_type":"text/x-python","patch_set":82,"id":"9779fe9e_d74c55b5","line":759,"range":{"start_line":756,"start_character":4,"end_line":759,"end_character":76},"in_reply_to":"e72d9767_8779474b","updated":"2024-06-28 12:48:22.000000000","message":"Will \u0027CONF.glance_store.stores\u0027 this be set if multiple backends enabled? I think it\u0027s not , right?","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"}],"glance/policies/base.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":83,"context_line":"    f\u0027role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})\u0027"},{"line_number":84,"context_line":")"},{"line_number":85,"context_line":"SERVICE_OR_PROJECT_MEMBER \u003d ("},{"line_number":86,"context_line":"    f\u0027rule:service_api or ({PROJECT_MEMBER})\u0027"},{"line_number":87,"context_line":")"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"ADMIN \u003d f\u0027rule:context_is_admin\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"5b2927ed_76ded8ad","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":45},"updated":"2023-05-08 09:17:40.000000000","message":"this should be SERVICE_OR_PROJECT_MEMBER\n\n(as per spec this should be image owner though)","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    f\u0027role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})\u0027"},{"line_number":84,"context_line":")"},{"line_number":85,"context_line":"SERVICE_OR_PROJECT_MEMBER \u003d ("},{"line_number":86,"context_line":"    f\u0027rule:service_api or ({PROJECT_MEMBER})\u0027"},{"line_number":87,"context_line":")"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"ADMIN \u003d f\u0027rule:context_is_admin\u0027"}],"source_content_type":"text/x-python","patch_set":5,"id":"f61f2e25_a2687fe7","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":45},"in_reply_to":"5b2927ed_76ded8ad","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec42769ba23751ecb9fde1279972e003bc382424","unresolved":true,"context_lines":[{"line_number":83,"context_line":"    f\u0027role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})\u0027"},{"line_number":84,"context_line":")"},{"line_number":85,"context_line":"SERVICE_OR_PROJECT_MEMBER \u003d ("},{"line_number":86,"context_line":"    f\u0027rule:service_api or ({PROJECT_MEMBER} and project_id:%(owner)s)\u0027"},{"line_number":87,"context_line":")"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"ADMIN \u003d f\u0027rule:context_is_admin\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"758b9500_c6a891b7","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":22},"updated":"2023-08-04 07:26:18.000000000","message":"Can we replace it with {SERVICE} otherwise I don\u0027t see the use of line #90","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":true,"context_lines":[{"line_number":83,"context_line":"    f\u0027role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})\u0027"},{"line_number":84,"context_line":")"},{"line_number":85,"context_line":"SERVICE_OR_PROJECT_MEMBER \u003d ("},{"line_number":86,"context_line":"    f\u0027rule:service_api or ({PROJECT_MEMBER} and project_id:%(owner)s)\u0027"},{"line_number":87,"context_line":")"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"ADMIN \u003d f\u0027rule:context_is_admin\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"ea6ad95b_d54904d4","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":22},"in_reply_to":"758b9500_c6a891b7","updated":"2023-08-09 11:16:39.000000000","message":"Removed the line #90 here, it was added for get_location api, so removed it from here I added in get_location patch","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":false,"context_lines":[{"line_number":83,"context_line":"    f\u0027role:reader and (project_id:%(project_id)s or {IMAGE_MEMBER_CHECK})\u0027"},{"line_number":84,"context_line":")"},{"line_number":85,"context_line":"SERVICE_OR_PROJECT_MEMBER \u003d ("},{"line_number":86,"context_line":"    f\u0027rule:service_api or ({PROJECT_MEMBER} and project_id:%(owner)s)\u0027"},{"line_number":87,"context_line":")"},{"line_number":88,"context_line":""},{"line_number":89,"context_line":"ADMIN \u003d f\u0027rule:context_is_admin\u0027"}],"source_content_type":"text/x-python","patch_set":26,"id":"5d26d3db_3ff3489a","line":86,"range":{"start_line":86,"start_character":4,"end_line":86,"end_character":22},"in_reply_to":"ea6ad95b_d54904d4","updated":"2023-08-14 11:54:23.000000000","message":"Done","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"}],"glance/policies/image.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":194,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":195,"context_line":"        description\u003d\u0027Add location URI to given image\u0027,"},{"line_number":196,"context_line":"        operations\u003d["},{"line_number":197,"context_line":"            {\u0027path\u0027: \u0027/v2/images/{image_id}/location\u0027,"},{"line_number":198,"context_line":"             \u0027method\u0027: \u0027POST\u0027}"},{"line_number":199,"context_line":"        ],"},{"line_number":200,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":5,"id":"36b178ac_ca3014fa","line":197,"range":{"start_line":197,"start_character":44,"end_line":197,"end_character":52},"updated":"2023-05-08 09:17:40.000000000","message":"as per spec ths should be locations","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        scope_types\u003d[\u0027project\u0027],"},{"line_number":195,"context_line":"        description\u003d\u0027Add location URI to given image\u0027,"},{"line_number":196,"context_line":"        operations\u003d["},{"line_number":197,"context_line":"            {\u0027path\u0027: \u0027/v2/images/{image_id}/location\u0027,"},{"line_number":198,"context_line":"             \u0027method\u0027: \u0027POST\u0027}"},{"line_number":199,"context_line":"        ],"},{"line_number":200,"context_line":"    ),"}],"source_content_type":"text/x-python","patch_set":5,"id":"a21d620f_23b78edc","line":197,"range":{"start_line":197,"start_character":44,"end_line":197,"end_character":52},"in_reply_to":"36b178ac_ca3014fa","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"}],"glance/tests/functional/v2/test_images.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":3730,"context_line":"        url \u003d \u0027http://127.0.0.1:%s/foo_image\u0027 % self.http_port0"},{"line_number":3731,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url, \u0027do_secure_hash\u0027: True})"},{"line_number":3732,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3733,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3734,"context_line":""},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"0d748205_fc896cc9","line":3733,"updated":"2023-05-08 09:17:40.000000000","message":"You should all scenarios here, like combinations of do_secure_hash, validation data etc","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":3730,"context_line":"        url \u003d \u0027http://127.0.0.1:%s/foo_image\u0027 % self.http_port0"},{"line_number":3731,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url, \u0027do_secure_hash\u0027: True})"},{"line_number":3732,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3733,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3734,"context_line":""},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"e90b5a4b_69aeded6","line":3733,"in_reply_to":"0d748205_fc896cc9","updated":"2023-05-10 01:42:43.000000000","message":"I think still some scenarios are missing\n\nLike invalid key in validation data\nvalidation data os_hash_algo other than default set in glance conf\nchecksum and calculated checksum does not match\nos_hash_value and calculated os_hash_value does not match\ndo_secure_hash is false and checksum, os_hash_algo and os_hash_value is set as it is passed from validation data\nos_hash_algo is not from supported values.\n\nAlso identify other scenarios as well","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"        url \u003d \u0027http://127.0.0.1:%s/foo_image\u0027 % self.http_port0"},{"line_number":3731,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url, \u0027do_secure_hash\u0027: True})"},{"line_number":3732,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3733,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3734,"context_line":""},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"860f3c1a_502c9c00","line":3733,"in_reply_to":"e90b5a4b_69aeded6","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":3730,"context_line":"        url \u003d \u0027http://127.0.0.1:%s/foo_image\u0027 % self.http_port0"},{"line_number":3731,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url, \u0027do_secure_hash\u0027: True})"},{"line_number":3732,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3733,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3734,"context_line":""},{"line_number":3735,"context_line":""},{"line_number":3736,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":5,"id":"c30d0261_6cc4234e","line":3733,"in_reply_to":"e90b5a4b_69aeded6","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":3811,"context_line":"        data \u003d jsonutils.dumps({\u0027name\u0027: \u0027image-1\u0027, \u0027disk_format\u0027: \u0027aki\u0027,"},{"line_number":3812,"context_line":"                                \u0027container_format\u0027: \u0027aki\u0027})"},{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"}],"source_content_type":"text/x-python","patch_set":12,"id":"24042d55_8277d7e1","line":3814,"range":{"start_line":3814,"start_character":8,"end_line":3814,"end_character":60},"updated":"2023-05-15 14:23:41.000000000","message":"Here you need to assert that checksum, os_hash_value and os_hash_algo properties set to image.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3811,"context_line":"        data \u003d jsonutils.dumps({\u0027name\u0027: \u0027image-1\u0027, \u0027disk_format\u0027: \u0027aki\u0027,"},{"line_number":3812,"context_line":"                                \u0027container_format\u0027: \u0027aki\u0027})"},{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"}],"source_content_type":"text/x-python","patch_set":12,"id":"3220db3a_dfc2dad2","line":3814,"range":{"start_line":3814,"start_character":8,"end_line":3814,"end_character":60},"in_reply_to":"24042d55_8277d7e1","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3811,"context_line":"        data \u003d jsonutils.dumps({\u0027name\u0027: \u0027image-1\u0027, \u0027disk_format\u0027: \u0027aki\u0027,"},{"line_number":3812,"context_line":"                                \u0027container_format\u0027: \u0027aki\u0027})"},{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"}],"source_content_type":"text/x-python","patch_set":12,"id":"543c6831_20bc831f","line":3814,"range":{"start_line":3814,"start_character":8,"end_line":3814,"end_character":60},"in_reply_to":"24042d55_8277d7e1","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"},{"line_number":3818,"context_line":"        image_id \u003d image[\u0027id\u0027]"},{"line_number":3819,"context_line":"        self.assertEqual(\u0027queued\u0027, image[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"bba4f023_da10a9c0","line":3816,"updated":"2023-05-15 14:23:41.000000000","message":"Also add scenarios where do_secure_hash is False and True, and valid input data with os_hash_algo should be other than sha512 (other than default set in glance config)","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"},{"line_number":3818,"context_line":"        image_id \u003d image[\u0027id\u0027]"},{"line_number":3819,"context_line":"        self.assertEqual(\u0027queued\u0027, image[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"1d10db46_c100f098","line":3816,"in_reply_to":"bba4f023_da10a9c0","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3813,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3814,"context_line":"        self.assertEqual(http.CREATED, response.status_code)"},{"line_number":3815,"context_line":""},{"line_number":3816,"context_line":"        # Returned image entity should have a generated id and status"},{"line_number":3817,"context_line":"        image \u003d jsonutils.loads(response.text)"},{"line_number":3818,"context_line":"        image_id \u003d image[\u0027id\u0027]"},{"line_number":3819,"context_line":"        self.assertEqual(\u0027queued\u0027, image[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"21e2cedd_102e22bd","line":3816,"in_reply_to":"bba4f023_da10a9c0","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":3858,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url,"},{"line_number":3859,"context_line":"                                \u0027validation_data\u0027: validation_data})"},{"line_number":3860,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3861,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":""},{"line_number":3864,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"82cdce49_418572f4","line":3861,"range":{"start_line":3861,"start_character":8,"end_line":3861,"end_character":70},"updated":"2023-05-15 14:23:41.000000000","message":"ditto, check expected image properties are set here.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3858,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url,"},{"line_number":3859,"context_line":"                                \u0027validation_data\u0027: validation_data})"},{"line_number":3860,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3861,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":""},{"line_number":3864,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"89ecfb3a_e0ffcafd","line":3861,"range":{"start_line":3861,"start_character":8,"end_line":3861,"end_character":70},"in_reply_to":"82cdce49_418572f4","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":3858,"context_line":"        data \u003d jsonutils.dumps({\u0027url\u0027: url,"},{"line_number":3859,"context_line":"                                \u0027validation_data\u0027: validation_data})"},{"line_number":3860,"context_line":"        response \u003d requests.post(path, headers\u003dheaders, data\u003ddata)"},{"line_number":3861,"context_line":"        self.assertEqual(http.OK, response.status_code, response.text)"},{"line_number":3862,"context_line":""},{"line_number":3863,"context_line":""},{"line_number":3864,"context_line":"class TestImagesIPv6(functional.FunctionalTest):"}],"source_content_type":"text/x-python","patch_set":12,"id":"f17adab4_8bfecd49","line":3861,"range":{"start_line":3861,"start_character":8,"end_line":3861,"end_character":70},"in_reply_to":"82cdce49_418572f4","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"}],"glance/tests/unit/async_/flows/test_location_import.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"ec42769ba23751ecb9fde1279972e003bc382424","unresolved":true,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 Verizon Wireless"},{"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":26,"id":"c4ec85dd_fdaeda81","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"updated":"2023-08-04 07:26:18.000000000","message":"2023 RedHat ?","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2018 Verizon Wireless"},{"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":26,"id":"43db99bd_a79dc94c","line":1,"range":{"start_line":1,"start_character":12,"end_line":1,"end_character":16},"in_reply_to":"c4ec85dd_fdaeda81","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"c9d8618f6ee524dd2a0c78f0f6c4dce5f685d4e1"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"f6e9ede38a65e8acb5b56e44178cca8c36ec47d8","unresolved":true,"context_lines":[{"line_number":276,"context_line":"        set_hash_data.revert(None)"},{"line_number":277,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"},{"line_number":278,"context_line":"        self.assertIsNone(self.image.os_hash_value)"},{"line_number":279,"context_line":"        self.assertIsNone(self.image.checksum)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"class TestUpdateLocationTask(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":29,"id":"dea5b853_83effae5","line":279,"updated":"2023-08-14 14:57:02.000000000","message":"I think image state should also be asserted here","commit_id":"db13234a30e83f68aed844b6056758f1c6a19c8b"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d7b325eec9d517d2eb3a38a3a193d9b08b0e3d24","unresolved":false,"context_lines":[{"line_number":276,"context_line":"        set_hash_data.revert(None)"},{"line_number":277,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"},{"line_number":278,"context_line":"        self.assertIsNone(self.image.os_hash_value)"},{"line_number":279,"context_line":"        self.assertIsNone(self.image.checksum)"},{"line_number":280,"context_line":""},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"class TestUpdateLocationTask(test_utils.BaseTestCase):"}],"source_content_type":"text/x-python","patch_set":29,"id":"9715c967_ed8cf4be","line":279,"in_reply_to":"dea5b853_83effae5","updated":"2023-08-16 09:31:18.000000000","message":"Done","commit_id":"db13234a30e83f68aed844b6056758f1c6a19c8b"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":59,"context_line":"                                              project_id\u003dTENANT1,"},{"line_number":60,"context_line":"                                              overwrite\u003dFalse)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_execute_with_no_validation_data(self):"},{"line_number":63,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"},{"line_number":64,"context_line":"        self.image.status \u003d \u0027active\u0027"},{"line_number":65,"context_line":"        self.image.locations \u003d {\"url\": url, \"metadata\": {\"store\": \"foo\"}}"}],"source_content_type":"text/x-python","patch_set":34,"id":"81bae92b_493e831b","line":62,"updated":"2023-08-28 06:23:23.000000000","message":"this test is not required since this task does not need validation data any more as input.","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":true,"context_lines":[{"line_number":59,"context_line":"                                              project_id\u003dTENANT1,"},{"line_number":60,"context_line":"                                              overwrite\u003dFalse)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_execute_with_no_validation_data(self):"},{"line_number":63,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"},{"line_number":64,"context_line":"        self.image.status \u003d \u0027active\u0027"},{"line_number":65,"context_line":"        self.image.locations \u003d {\"url\": url, \"metadata\": {\"store\": \"foo\"}}"}],"source_content_type":"text/x-python","patch_set":34,"id":"8e1503e8_b4ecb4eb","line":62,"in_reply_to":"81bae92b_493e831b","updated":"2023-08-28 07:53:04.000000000","message":"since val_data input now replaced with image status in input, keeping this tests by modifying the test name.","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f83b4bd77b527ca25c1153ac39cfd2aba3590f68","unresolved":false,"context_lines":[{"line_number":59,"context_line":"                                              project_id\u003dTENANT1,"},{"line_number":60,"context_line":"                                              overwrite\u003dFalse)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def test_execute_with_no_validation_data(self):"},{"line_number":63,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"},{"line_number":64,"context_line":"        self.image.status \u003d \u0027active\u0027"},{"line_number":65,"context_line":"        self.image.locations \u003d {\"url\": url, \"metadata\": {\"store\": \"foo\"}}"}],"source_content_type":"text/x-python","patch_set":34,"id":"34ae519f_7a810e0e","line":62,"in_reply_to":"8e1503e8_b4ecb4eb","updated":"2023-08-28 14:39:33.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":145,"context_line":"        super(TestVerifyValidationDataTask, self).setUp()"},{"line_number":146,"context_line":"        self.task_repo \u003d mock.MagicMock()"},{"line_number":147,"context_line":"        self.task \u003d mock.MagicMock()"},{"line_number":148,"context_line":"        self.hash_task_input \u003d {"},{"line_number":149,"context_line":"            \u0027image_id\u0027: IMAGE_ID1,"},{"line_number":150,"context_line":"        }"},{"line_number":151,"context_line":"        self.image_repo \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":34,"id":"f3fe00ed_2e2aef3e","line":148,"range":{"start_line":148,"start_character":13,"end_line":148,"end_character":28},"updated":"2023-08-28 06:23:23.000000000","message":"nit: this should be val_data_taks_input","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":false,"context_lines":[{"line_number":145,"context_line":"        super(TestVerifyValidationDataTask, self).setUp()"},{"line_number":146,"context_line":"        self.task_repo \u003d mock.MagicMock()"},{"line_number":147,"context_line":"        self.task \u003d mock.MagicMock()"},{"line_number":148,"context_line":"        self.hash_task_input \u003d {"},{"line_number":149,"context_line":"            \u0027image_id\u0027: IMAGE_ID1,"},{"line_number":150,"context_line":"        }"},{"line_number":151,"context_line":"        self.image_repo \u003d mock.MagicMock()"}],"source_content_type":"text/x-python","patch_set":34,"id":"0a1b03e5_2a7d7dfb","line":148,"range":{"start_line":148,"start_character":13,"end_line":148,"end_character":28},"in_reply_to":"f3fe00ed_2e2aef3e","updated":"2023-08-28 07:53:04.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":34,"id":"55232b9d_3b18b908","line":389,"updated":"2023-08-28 06:23:23.000000000","message":"Missing tests for _SetImageToActive task","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"41eceeadd87cd51814cf75ad5c972a5d400e4554","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":34,"id":"e0e43a19_428f7bfa","line":389,"in_reply_to":"2fb1af18_427df945","updated":"2023-08-28 08:42:02.000000000","message":"yes we need a test for that","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":34,"id":"2fb1af18_427df945","line":389,"in_reply_to":"55232b9d_3b18b908","updated":"2023-08-28 07:53:04.000000000","message":"Do we need the separate tests for this task since i\u0027m calling this task from almost all of the above tests scenarios.","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f83b4bd77b527ca25c1153ac39cfd2aba3590f68","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":34,"id":"73f9657a_8b29e346","line":389,"in_reply_to":"e0e43a19_428f7bfa","updated":"2023-08-28 14:39:33.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":111,"context_line":"                                                      IMAGE_ID1,"},{"line_number":112,"context_line":"                                                      hashing_algo)"},{"line_number":113,"context_line":"        hash_calculation.execute()"},{"line_number":114,"context_line":"        self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":115,"context_line":"        self.assertEqual(\u0027active\u0027, self.image.status)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_execute_hash_calculation_fails_with_validation_data(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"571ecce7_51e6870e","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":53},"updated":"2023-08-28 15:05:03.000000000","message":"you should also assert that other properties are none","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                                                      IMAGE_ID1,"},{"line_number":112,"context_line":"                                                      hashing_algo)"},{"line_number":113,"context_line":"        hash_calculation.execute()"},{"line_number":114,"context_line":"        self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":115,"context_line":"        self.assertEqual(\u0027active\u0027, self.image.status)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def test_execute_hash_calculation_fails_with_validation_data(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"2c2008c9_8f3da348","line":114,"range":{"start_line":114,"start_character":8,"end_line":114,"end_character":53},"in_reply_to":"571ecce7_51e6870e","updated":"2023-08-29 09:06:23.000000000","message":"Done","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":151,"context_line":"                expected_data).hexdigest()"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            self.assertEqual(0, mock_ch.call_count)"},{"line_number":154,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        with mock.patch.object(hash_calculation,"},{"line_number":157,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"}],"source_content_type":"text/x-python","patch_set":39,"id":"a5c099aa_6d98c246","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":57},"updated":"2023-08-28 15:05:03.000000000","message":"ditto","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                expected_data).hexdigest()"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"            self.assertEqual(0, mock_ch.call_count)"},{"line_number":154,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"        with mock.patch.object(hash_calculation,"},{"line_number":157,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"}],"source_content_type":"text/x-python","patch_set":39,"id":"cbfe4f9b_bed8f4db","line":154,"range":{"start_line":154,"start_character":12,"end_line":154,"end_character":57},"in_reply_to":"a5c099aa_6d98c246","updated":"2023-08-29 09:06:23.000000000","message":"Done","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":159,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":160,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 1)"},{"line_number":161,"context_line":"            self.assertEqual(2, mock_ch.call_count)"},{"line_number":162,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.image.get_data.side_effect \u003d IOError"},{"line_number":165,"context_line":"        with mock.patch.object(import_flow.LOG, \u0027debug\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":39,"id":"8d9ee1e0_c7a0dcf1","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":57},"updated":"2023-08-28 15:05:03.000000000","message":"ditto\nalso can this be moved under above mock?","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"513067261af1afe98aa95576c7ed74f8b0796b4f","unresolved":true,"context_lines":[{"line_number":159,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":160,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 1)"},{"line_number":161,"context_line":"            self.assertEqual(2, mock_ch.call_count)"},{"line_number":162,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.image.get_data.side_effect \u003d IOError"},{"line_number":165,"context_line":"        with mock.patch.object(import_flow.LOG, \u0027debug\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":39,"id":"a833cf3d_fee95274","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":57},"in_reply_to":"15a77f55_718e4218","updated":"2023-08-29 17:07:28.000000000","message":"I think you can move this retry call in above mock as well.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2ab53a28306532dab9e9243b7dbb32f22e8aa399","unresolved":false,"context_lines":[{"line_number":159,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":160,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 1)"},{"line_number":161,"context_line":"            self.assertEqual(2, mock_ch.call_count)"},{"line_number":162,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.image.get_data.side_effect \u003d IOError"},{"line_number":165,"context_line":"        with mock.patch.object(import_flow.LOG, \u0027debug\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":39,"id":"0ca482f2_cd96774b","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":57},"in_reply_to":"87b64361_21fc5161","updated":"2023-08-30 05:25:17.000000000","message":"Ack","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":true,"context_lines":[{"line_number":159,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":160,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 1)"},{"line_number":161,"context_line":"            self.assertEqual(2, mock_ch.call_count)"},{"line_number":162,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.image.get_data.side_effect \u003d IOError"},{"line_number":165,"context_line":"        with mock.patch.object(import_flow.LOG, \u0027debug\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":39,"id":"15a77f55_718e4218","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":57},"in_reply_to":"8d9ee1e0_c7a0dcf1","updated":"2023-08-29 09:06:23.000000000","message":"din\u0027t get this, it\u0027s already there in above mock.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"06f7680ff2b91436b9744d4fc58f3c65f75ce4c2","unresolved":true,"context_lines":[{"line_number":159,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":160,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 1)"},{"line_number":161,"context_line":"            self.assertEqual(2, mock_ch.call_count)"},{"line_number":162,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":163,"context_line":""},{"line_number":164,"context_line":"        self.image.get_data.side_effect \u003d IOError"},{"line_number":165,"context_line":"        with mock.patch.object(import_flow.LOG, \u0027debug\u0027) as mock_log:"}],"source_content_type":"text/x-python","patch_set":39,"id":"87b64361_21fc5161","line":162,"range":{"start_line":162,"start_character":12,"end_line":162,"end_character":57},"in_reply_to":"a833cf3d_fee95274","updated":"2023-08-29 18:41:37.000000000","message":"I think it\u0027s better to keep separate since both are diff scenarios","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":168,"context_line":"            mock_log.assert_called_with(\u0027Hash calculation failed for image\u0027"},{"line_number":169,"context_line":"                                        \u0027 after retrying %(retry)s times\u0027,"},{"line_number":170,"context_line":"                                        {\u0027retry\u0027: 3})"},{"line_number":171,"context_line":"            # There will be 3 different debug logs, hence call count will"},{"line_number":172,"context_line":"            # be total of those"},{"line_number":173,"context_line":"            self.assertEqual(8, mock_log.call_count)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            debug_logs \u003d mock_log.call_args_list"},{"line_number":176,"context_line":"            self.assertIn((\"Retry no \u0027%s\u0027 for hash and checksum \""},{"line_number":177,"context_line":"                           \"calculation\", 3), debug_logs[5])"},{"line_number":178,"context_line":"            # The last debug log during retries"},{"line_number":179,"context_line":"            self.assertIn((\u0027Hash calculation failed for image after \u0027"},{"line_number":180,"context_line":"                           \u0027retrying %(retry)s times\u0027, {\u0027retry\u0027: 3}),"},{"line_number":181,"context_line":"                          debug_logs[7])"},{"line_number":182,"context_line":"            # There will be 3 different debug logs, hence call count will"},{"line_number":183,"context_line":"            # be total of those"},{"line_number":184,"context_line":"            self.assertEqual(8, mock_log.call_count)"},{"line_number":185,"context_line":"            self.assertEqual(\u0027importing\u0027, self.image.status)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        hash_calculation.revert(None)"}],"source_content_type":"text/x-python","patch_set":39,"id":"3411ee22_e231c6d6","line":184,"range":{"start_line":171,"start_character":12,"end_line":184,"end_character":52},"updated":"2023-08-28 15:05:03.000000000","message":"No need to assert all this, also line 184 is duplicate of line 173","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":false,"context_lines":[{"line_number":168,"context_line":"            mock_log.assert_called_with(\u0027Hash calculation failed for image\u0027"},{"line_number":169,"context_line":"                                        \u0027 after retrying %(retry)s times\u0027,"},{"line_number":170,"context_line":"                                        {\u0027retry\u0027: 3})"},{"line_number":171,"context_line":"            # There will be 3 different debug logs, hence call count will"},{"line_number":172,"context_line":"            # be total of those"},{"line_number":173,"context_line":"            self.assertEqual(8, mock_log.call_count)"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            debug_logs \u003d mock_log.call_args_list"},{"line_number":176,"context_line":"            self.assertIn((\"Retry no \u0027%s\u0027 for hash and checksum \""},{"line_number":177,"context_line":"                           \"calculation\", 3), debug_logs[5])"},{"line_number":178,"context_line":"            # The last debug log during retries"},{"line_number":179,"context_line":"            self.assertIn((\u0027Hash calculation failed for image after \u0027"},{"line_number":180,"context_line":"                           \u0027retrying %(retry)s times\u0027, {\u0027retry\u0027: 3}),"},{"line_number":181,"context_line":"                          debug_logs[7])"},{"line_number":182,"context_line":"            # There will be 3 different debug logs, hence call count will"},{"line_number":183,"context_line":"            # be total of those"},{"line_number":184,"context_line":"            self.assertEqual(8, mock_log.call_count)"},{"line_number":185,"context_line":"            self.assertEqual(\u0027importing\u0027, self.image.status)"},{"line_number":186,"context_line":""},{"line_number":187,"context_line":"        hash_calculation.revert(None)"}],"source_content_type":"text/x-python","patch_set":39,"id":"ee9637e6_454ae90d","line":184,"range":{"start_line":171,"start_character":12,"end_line":184,"end_character":52},"in_reply_to":"3411ee22_e231c6d6","updated":"2023-08-29 09:06:23.000000000","message":"Done","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        self.image_repo.save.side_effect \u003d None"},{"line_number":487,"context_line":"        set_image_active.revert(None)"},{"line_number":488,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":489,"context_line":"        self.assertEqual(1, self.image.locations.pop.call_count)"}],"source_content_type":"text/x-python","patch_set":39,"id":"8a586ab0_192d9b86","line":488,"range":{"start_line":488,"start_character":0,"end_line":488,"end_character":53},"updated":"2023-08-28 15:05:03.000000000","message":"I think this will be never happen, like setting active image to queued is not possible at all\n\nalso as you are mocking everything, the test should only test its specific execute  and revert","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"513067261af1afe98aa95576c7ed74f8b0796b4f","unresolved":true,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        self.image_repo.save.side_effect \u003d None"},{"line_number":487,"context_line":"        set_image_active.revert(None)"},{"line_number":488,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":489,"context_line":"        self.assertEqual(1, self.image.locations.pop.call_count)"}],"source_content_type":"text/x-python","patch_set":39,"id":"7e4a7082_858ad3be","line":488,"range":{"start_line":488,"start_character":0,"end_line":488,"end_character":53},"in_reply_to":"4a21f2eb_cb35af08","updated":"2023-08-29 17:07:28.000000000","message":"Ok, a comment could have helped to understand what exactly you are doing.\n\nThe scenario here you are testing is image failed while saving to active state in that case yes it is correct.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"06f7680ff2b91436b9744d4fc58f3c65f75ce4c2","unresolved":false,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        self.image_repo.save.side_effect \u003d None"},{"line_number":487,"context_line":"        set_image_active.revert(None)"},{"line_number":488,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":489,"context_line":"        self.assertEqual(1, self.image.locations.pop.call_count)"}],"source_content_type":"text/x-python","patch_set":39,"id":"9d68208b_35e86596","line":488,"range":{"start_line":488,"start_character":0,"end_line":488,"end_character":53},"in_reply_to":"7e4a7082_858ad3be","updated":"2023-08-29 18:41:37.000000000","message":"Done","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":true,"context_lines":[{"line_number":485,"context_line":""},{"line_number":486,"context_line":"        self.image_repo.save.side_effect \u003d None"},{"line_number":487,"context_line":"        set_image_active.revert(None)"},{"line_number":488,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":489,"context_line":"        self.assertEqual(1, self.image.locations.pop.call_count)"}],"source_content_type":"text/x-python","patch_set":39,"id":"4a21f2eb_cb35af08","line":488,"range":{"start_line":488,"start_character":0,"end_line":488,"end_character":53},"in_reply_to":"8a586ab0_192d9b86","updated":"2023-08-29 09:06:23.000000000","message":"This task is failing so image will never be set to active, right ? I\u0027m just checking here it\u0027s still queued even after the failure and location is popped out","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2ab53a28306532dab9e9243b7dbb32f22e8aa399","unresolved":true,"context_lines":[{"line_number":162,"context_line":"        # Check if hash calculation sucessful in first retry"},{"line_number":163,"context_line":"        with mock.patch.object(hash_calculation,"},{"line_number":164,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":165,"context_line":"            mock_ch.side_effect \u003d import_flow._HashCalculationFailed"},{"line_number":166,"context_line":"            expected_size \u003d 4 * units.Ki"},{"line_number":167,"context_line":"            expected_data \u003d b\"*\" * expected_size"},{"line_number":168,"context_line":"            self.image.get_data.return_value \u003d io.BytesIO(expected_data)"}],"source_content_type":"text/x-python","patch_set":42,"id":"c15371c0_0c89a699","line":165,"range":{"start_line":165,"start_character":46,"end_line":165,"end_character":68},"updated":"2023-08-30 05:25:17.000000000","message":"Since we are not raising exception from _CalculateHash this does not make sense.\nAlso I don\u0027t see you are calling execute method anywhere.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c71b623373d0fb5ce51a3e159818317f8289db79","unresolved":false,"context_lines":[{"line_number":162,"context_line":"        # Check if hash calculation sucessful in first retry"},{"line_number":163,"context_line":"        with mock.patch.object(hash_calculation,"},{"line_number":164,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":165,"context_line":"            mock_ch.side_effect \u003d import_flow._HashCalculationFailed"},{"line_number":166,"context_line":"            expected_size \u003d 4 * units.Ki"},{"line_number":167,"context_line":"            expected_data \u003d b\"*\" * expected_size"},{"line_number":168,"context_line":"            self.image.get_data.return_value \u003d io.BytesIO(expected_data)"}],"source_content_type":"text/x-python","patch_set":42,"id":"6ae37a75_e742d073","line":165,"range":{"start_line":165,"start_character":46,"end_line":165,"end_character":68},"in_reply_to":"c15371c0_0c89a699","updated":"2023-08-30 08:45:04.000000000","message":"Done","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2ab53a28306532dab9e9243b7dbb32f22e8aa399","unresolved":true,"context_lines":[{"line_number":170,"context_line":"            self.image.os_hash_value \u003d hashlib.sha512("},{"line_number":171,"context_line":"                expected_data).hexdigest()"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.assertEqual(0, mock_ch.call_count)"},{"line_number":174,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":175,"context_line":"            self.assertIsNotNone(self.image.checksum)"},{"line_number":176,"context_line":"            self.assertIsNotNone(self.image.os_hash_value)"}],"source_content_type":"text/x-python","patch_set":42,"id":"9f619f7c_d72d97bf","line":173,"range":{"start_line":173,"start_character":12,"end_line":173,"end_character":51},"updated":"2023-08-30 05:25:17.000000000","message":"as you are not calling execute method the call count is 0 here and you are setting these values explicitly at line 168-170 and asserting them below. This is not how it should be tested.\n\nYou should pass required input to task and it\u0027s execute method should do what is required for you. Even if you are mocking internal method it should have been called once.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0178b71c65bda4abc50fe3a5257f54ea25eb5afb","unresolved":false,"context_lines":[{"line_number":170,"context_line":"            self.image.os_hash_value \u003d hashlib.sha512("},{"line_number":171,"context_line":"                expected_data).hexdigest()"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.assertEqual(0, mock_ch.call_count)"},{"line_number":174,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":175,"context_line":"            self.assertIsNotNone(self.image.checksum)"},{"line_number":176,"context_line":"            self.assertIsNotNone(self.image.os_hash_value)"}],"source_content_type":"text/x-python","patch_set":42,"id":"c35fb11e_d7d608c3","line":173,"range":{"start_line":173,"start_character":12,"end_line":173,"end_character":51},"in_reply_to":"7d6b4e75_a24f7908","updated":"2023-09-05 07:26:52.000000000","message":"Done","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c71b623373d0fb5ce51a3e159818317f8289db79","unresolved":true,"context_lines":[{"line_number":170,"context_line":"            self.image.os_hash_value \u003d hashlib.sha512("},{"line_number":171,"context_line":"                expected_data).hexdigest()"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.assertEqual(0, mock_ch.call_count)"},{"line_number":174,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":175,"context_line":"            self.assertIsNotNone(self.image.checksum)"},{"line_number":176,"context_line":"            self.assertIsNotNone(self.image.os_hash_value)"}],"source_content_type":"text/x-python","patch_set":42,"id":"7d6b4e75_a24f7908","line":173,"range":{"start_line":173,"start_character":12,"end_line":173,"end_character":51},"in_reply_to":"9f619f7c_d72d97bf","updated":"2023-08-30 08:45:04.000000000","message":"Yeah i just missed it while modifying the tests, so yeah now i\u0027m calling hash execute, raising IOError from get_data, and trying to set the hash values to check if call count is 1 if retry successful in first call. I know call count should be 2 ideally in this case, but this is the only way i found to check the hash calculation successful.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2ab53a28306532dab9e9243b7dbb32f22e8aa399","unresolved":true,"context_lines":[{"line_number":180,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":181,"context_line":"            self.image.checksum \u003d None"},{"line_number":182,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":183,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 0)"},{"line_number":184,"context_line":"            self.assertEqual(3, mock_ch.call_count)"},{"line_number":185,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":186,"context_line":"            self.assertIsNone(self.image.checksum)"}],"source_content_type":"text/x-python","patch_set":42,"id":"f02f0793_da38e256","line":183,"range":{"start_line":183,"start_character":29,"end_line":183,"end_character":52},"updated":"2023-08-30 05:25:17.000000000","message":"I think correct way is to raise exception from _set_checksum_and_hash and call execute method here.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":181,"context_line":"            self.image.checksum \u003d None"},{"line_number":182,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":183,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 0)"},{"line_number":184,"context_line":"            self.assertEqual(3, mock_ch.call_count)"},{"line_number":185,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":186,"context_line":"            self.assertIsNone(self.image.checksum)"}],"source_content_type":"text/x-python","patch_set":42,"id":"c3d7d7c0_b2872cb0","line":183,"range":{"start_line":183,"start_character":29,"end_line":183,"end_character":52},"in_reply_to":"5f9b6b24_2101bf74","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":180,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":181,"context_line":"            self.image.checksum \u003d None"},{"line_number":182,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":183,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 0)"},{"line_number":184,"context_line":"            self.assertEqual(3, mock_ch.call_count)"},{"line_number":185,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":186,"context_line":"            self.assertIsNone(self.image.checksum)"}],"source_content_type":"text/x-python","patch_set":42,"id":"5f9b6b24_2101bf74","line":183,"range":{"start_line":183,"start_character":29,"end_line":183,"end_character":52},"in_reply_to":"d494544f_80729b11","updated":"2023-08-30 15:41:02.000000000","message":"you can avoid calling it here? or atleast comment why you are calling it.\nAlso you can assert expected values for line 188-190","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c71b623373d0fb5ce51a3e159818317f8289db79","unresolved":true,"context_lines":[{"line_number":180,"context_line":"                               \"_set_checksum_and_hash\") as mock_ch:"},{"line_number":181,"context_line":"            self.image.checksum \u003d None"},{"line_number":182,"context_line":"            self.image.os_hash_value \u003d None"},{"line_number":183,"context_line":"            hash_calculation._retry_hash_calculation(self.image, 0)"},{"line_number":184,"context_line":"            self.assertEqual(3, mock_ch.call_count)"},{"line_number":185,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":186,"context_line":"            self.assertIsNone(self.image.checksum)"}],"source_content_type":"text/x-python","patch_set":42,"id":"d494544f_80729b11","line":183,"range":{"start_line":183,"start_character":29,"end_line":183,"end_character":52},"in_reply_to":"f02f0793_da38e256","updated":"2023-08-30 08:45:04.000000000","message":"If we raise exception from _set_checksum_and_hash, we won\u0027t be able to check the retry calls incase of failure right? So i think it\u0027s better to raise IOError from get_data.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"2ab53a28306532dab9e9243b7dbb32f22e8aa399","unresolved":true,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":386,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        self.assertEqual(\u0027sha512\u0027, self.image.os_hash_algo)"},{"line_number":389,"context_line":"        self.assertEqual(hash_value, self.image.os_hash_value)"},{"line_number":390,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"}],"source_content_type":"text/x-python","patch_set":42,"id":"c6f39b8f_f4e924ca","line":387,"updated":"2023-08-30 05:25:17.000000000","message":"here also you not calling execute method.","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c71b623373d0fb5ce51a3e159818317f8289db79","unresolved":false,"context_lines":[{"line_number":384,"context_line":""},{"line_number":385,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":386,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"},{"line_number":387,"context_line":""},{"line_number":388,"context_line":"        self.assertEqual(\u0027sha512\u0027, self.image.os_hash_algo)"},{"line_number":389,"context_line":"        self.assertEqual(hash_value, self.image.os_hash_value)"},{"line_number":390,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"}],"source_content_type":"text/x-python","patch_set":42,"id":"b6780295_1a22024d","line":387,"in_reply_to":"c6f39b8f_f4e924ca","updated":"2023-08-30 08:45:04.000000000","message":"Done","commit_id":"a471eb8a0239a2e7774c3a394109b18d8f26d551"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":150,"context_line":"        location_update.execute()"},{"line_number":151,"context_line":"        self.assertEqual(1, self.image.locations.append.call_count)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        hashing_algo \u003d CONF.hashing_algorithm"},{"line_number":154,"context_line":"        hash_calculation \u003d import_flow._CalculateHash(TASK_ID1, TASK_TYPE,"},{"line_number":155,"context_line":"                                                      self.image_repo,"},{"line_number":156,"context_line":"                                                      IMAGE_ID1,"}],"source_content_type":"text/x-python","patch_set":43,"id":"42266967_91beba73","line":153,"updated":"2023-08-30 15:41:02.000000000","message":"nit: you can move it before line 137","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":150,"context_line":"        location_update.execute()"},{"line_number":151,"context_line":"        self.assertEqual(1, self.image.locations.append.call_count)"},{"line_number":152,"context_line":""},{"line_number":153,"context_line":"        hashing_algo \u003d CONF.hashing_algorithm"},{"line_number":154,"context_line":"        hash_calculation \u003d import_flow._CalculateHash(TASK_ID1, TASK_TYPE,"},{"line_number":155,"context_line":"                                                      self.image_repo,"},{"line_number":156,"context_line":"                                                      IMAGE_ID1,"}],"source_content_type":"text/x-python","patch_set":43,"id":"25f8014f_6e337f3e","line":153,"in_reply_to":"42266967_91beba73","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":172,"context_line":"                expected_data).hexdigest()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            self.assertEqual(1, mock_ch.call_count)"},{"line_number":175,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":176,"context_line":"            self.assertIsNotNone(self.image.checksum)"},{"line_number":177,"context_line":"            self.assertIsNotNone(self.image.os_hash_value)"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"e61dcfaa_f42d52a8","line":175,"range":{"start_line":175,"start_character":12,"end_line":175,"end_character":57},"updated":"2023-08-30 15:41:02.000000000","message":"atleast you should check these with expected values since you have those.\nyou can also calculate expected checksum similar to expected hash I guess.\n\nDo it if required new PS","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":172,"context_line":"                expected_data).hexdigest()"},{"line_number":173,"context_line":""},{"line_number":174,"context_line":"            self.assertEqual(1, mock_ch.call_count)"},{"line_number":175,"context_line":"            self.assertIsNotNone(self.image.os_hash_algo)"},{"line_number":176,"context_line":"            self.assertIsNotNone(self.image.checksum)"},{"line_number":177,"context_line":"            self.assertIsNotNone(self.image.os_hash_value)"},{"line_number":178,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"7017cedc_02546241","line":175,"range":{"start_line":175,"start_character":12,"end_line":175,"end_character":57},"in_reply_to":"e61dcfaa_f42d52a8","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":197,"context_line":"                           \"calculation\", 3), debug_logs[5])"},{"line_number":198,"context_line":"            self.assertEqual(\u0027importing\u0027, self.image.status)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":201,"context_line":"                              verify_validation_data.execute)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        verify_validation_data.revert(None)"},{"line_number":204,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ec662ab7_1ba70795","line":201,"range":{"start_line":200,"start_character":12,"end_line":201,"end_character":61},"updated":"2023-08-30 15:41:02.000000000","message":"comment here will be helpful that why this task will raise error,\nhere it is raising error because os_hash_value is not set to image and not because there is differnce between expected value and actual value.","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                           \"calculation\", 3), debug_logs[5])"},{"line_number":198,"context_line":"            self.assertEqual(\u0027importing\u0027, self.image.status)"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"            self.assertRaises(exception.InvalidParameterValue,"},{"line_number":201,"context_line":"                              verify_validation_data.execute)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        verify_validation_data.revert(None)"},{"line_number":204,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"}],"source_content_type":"text/x-python","patch_set":43,"id":"23df570a_73e02fda","line":201,"range":{"start_line":200,"start_character":12,"end_line":201,"end_character":61},"in_reply_to":"ec662ab7_1ba70795","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":264,"context_line":"        expected_data \u003d b\"*\" * expected_size"},{"line_number":265,"context_line":"        self.image.get_data.return_value \u003d io.BytesIO(expected_data)"},{"line_number":266,"context_line":"        checksum \u003d md5(expected_data).hexdigest()"},{"line_number":267,"context_line":"        # os_hash_value \u003d 256"},{"line_number":268,"context_line":"        hash_value \u003d hashlib.sha256(expected_data).hexdigest()"},{"line_number":269,"context_line":"        val_data \u003d {"},{"line_number":270,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"b1939338_e1a1f786","line":267,"updated":"2023-08-30 15:41:02.000000000","message":"I think this is leftover","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":264,"context_line":"        expected_data \u003d b\"*\" * expected_size"},{"line_number":265,"context_line":"        self.image.get_data.return_value \u003d io.BytesIO(expected_data)"},{"line_number":266,"context_line":"        checksum \u003d md5(expected_data).hexdigest()"},{"line_number":267,"context_line":"        # os_hash_value \u003d 256"},{"line_number":268,"context_line":"        hash_value \u003d hashlib.sha256(expected_data).hexdigest()"},{"line_number":269,"context_line":"        val_data \u003d {"},{"line_number":270,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"}],"source_content_type":"text/x-python","patch_set":43,"id":"3f2068be_3232f003","line":267,"in_reply_to":"b1939338_e1a1f786","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":274,"context_line":"        self.image.checksum \u003d checksum"},{"line_number":275,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":276,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":277,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("},{"line_number":280,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"61be50dc_02b3b468","line":277,"range":{"start_line":277,"start_character":48,"end_line":277,"end_character":71},"updated":"2023-08-30 15:41:02.000000000","message":"this is not required as it will never be executed","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":274,"context_line":"        self.image.checksum \u003d checksum"},{"line_number":275,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":276,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":277,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":278,"context_line":""},{"line_number":279,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("},{"line_number":280,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"ab9bd5a9_25c4952d","line":277,"range":{"start_line":277,"start_character":48,"end_line":277,"end_character":71},"in_reply_to":"61be50dc_02b3b468","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":305,"context_line":"        self.image.checksum \u003d checksum"},{"line_number":306,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":307,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":308,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":309,"context_line":"        self.val_data_task_input.update(val_data\u003dval_data)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("}],"source_content_type":"text/x-python","patch_set":43,"id":"5a39a979_cdef8225","line":308,"range":{"start_line":308,"start_character":47,"end_line":308,"end_character":72},"updated":"2023-08-30 15:41:02.000000000","message":"ditto","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        self.image.checksum \u003d checksum"},{"line_number":306,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":307,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":308,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":309,"context_line":"        self.val_data_task_input.update(val_data\u003dval_data)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("}],"source_content_type":"text/x-python","patch_set":43,"id":"6f27a69b_f1393d7b","line":308,"range":{"start_line":308,"start_character":47,"end_line":308,"end_character":72},"in_reply_to":"5a39a979_cdef8225","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":306,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":307,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":308,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":309,"context_line":"        self.val_data_task_input.update(val_data\u003dval_data)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("},{"line_number":312,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1,"}],"source_content_type":"text/x-python","patch_set":43,"id":"db88bf50_278b980c","line":309,"range":{"start_line":309,"start_character":0,"end_line":309,"end_character":11},"updated":"2023-08-30 15:41:02.000000000","message":"I didn\u0027t understood the use of this line","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"0178b71c65bda4abc50fe3a5257f54ea25eb5afb","unresolved":false,"context_lines":[{"line_number":306,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":307,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":308,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":309,"context_line":"        self.val_data_task_input.update(val_data\u003dval_data)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("},{"line_number":312,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1,"}],"source_content_type":"text/x-python","patch_set":43,"id":"c93d12fd_e58f0221","line":309,"range":{"start_line":309,"start_character":0,"end_line":309,"end_character":11},"in_reply_to":"345110f8_423ef6f5","updated":"2023-09-05 07:26:52.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":true,"context_lines":[{"line_number":306,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":307,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":308,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":309,"context_line":"        self.val_data_task_input.update(val_data\u003dval_data)"},{"line_number":310,"context_line":""},{"line_number":311,"context_line":"        verify_validation_data \u003d import_flow._VerifyValidationData("},{"line_number":312,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1,"}],"source_content_type":"text/x-python","patch_set":43,"id":"345110f8_423ef6f5","line":309,"range":{"start_line":309,"start_character":0,"end_line":309,"end_character":11},"in_reply_to":"db88bf50_278b980c","updated":"2023-08-31 07:58:59.000000000","message":"sry it remained by mistake.","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":350,"context_line":"        self.hash_task_input.update(val_data\u003dval_data)"},{"line_number":351,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":352,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":353,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":356,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"988e555b_adbf18ff","line":353,"range":{"start_line":353,"start_character":47,"end_line":353,"end_character":72},"updated":"2023-08-30 15:41:02.000000000","message":"ditto","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":350,"context_line":"        self.hash_task_input.update(val_data\u003dval_data)"},{"line_number":351,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":352,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":353,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":356,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"f05c2f92_9d660b00","line":353,"range":{"start_line":353,"start_character":47,"end_line":353,"end_character":72},"in_reply_to":"988e555b_adbf18ff","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":365,"context_line":"        set_image_active.execute()"},{"line_number":366,"context_line":"        self.assertEqual(\u0027active\u0027, self.image.status)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        set_hash_data.revert(None)"},{"line_number":369,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"},{"line_number":370,"context_line":"        self.assertIsNone(self.image.os_hash_value)"},{"line_number":371,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_execute_with_set_hash_data_failure(self):"},{"line_number":374,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"}],"source_content_type":"text/x-python","patch_set":43,"id":"f0a681e4_83bdf028","line":371,"range":{"start_line":368,"start_character":0,"end_line":371,"end_character":53},"updated":"2023-08-30 15:41:02.000000000","message":"since this is positive scenario, no use of calling this here.","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":365,"context_line":"        set_image_active.execute()"},{"line_number":366,"context_line":"        self.assertEqual(\u0027active\u0027, self.image.status)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"        set_hash_data.revert(None)"},{"line_number":369,"context_line":"        self.assertIsNone(self.image.os_hash_algo)"},{"line_number":370,"context_line":"        self.assertIsNone(self.image.os_hash_value)"},{"line_number":371,"context_line":"        self.assertEqual(\u0027queued\u0027, self.image.status)"},{"line_number":372,"context_line":""},{"line_number":373,"context_line":"    def test_execute_with_set_hash_data_failure(self):"},{"line_number":374,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"}],"source_content_type":"text/x-python","patch_set":43,"id":"903c0d07_6fade8ca","line":371,"range":{"start_line":368,"start_character":0,"end_line":371,"end_character":53},"in_reply_to":"f0a681e4_83bdf028","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"dce73e2a71dfcd8b457de9be93d55b4a9ff1646b","unresolved":true,"context_lines":[{"line_number":385,"context_line":"        self.hash_task_input.update(val_data\u003dval_data)"},{"line_number":386,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":387,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":388,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":391,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"9235aa4b_9f778859","line":388,"range":{"start_line":388,"start_character":47,"end_line":388,"end_character":72},"updated":"2023-08-30 15:41:02.000000000","message":"ditto","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"d91df4c60498fc2acde8f0975c6161b81c7ed7cd","unresolved":false,"context_lines":[{"line_number":385,"context_line":"        self.hash_task_input.update(val_data\u003dval_data)"},{"line_number":386,"context_line":"        self.image.os_hash_value \u003d hash_value"},{"line_number":387,"context_line":"        self.image.os_hash_algo \u003d val_data.get(\"os_hash_algo\","},{"line_number":388,"context_line":"                                               CONF[\u0027hashing_algorithm\u0027])"},{"line_number":389,"context_line":""},{"line_number":390,"context_line":"        set_hash_data \u003d import_flow._SetHashValues("},{"line_number":391,"context_line":"            TASK_ID1, TASK_TYPE, self.image_repo, IMAGE_ID1, val_data)"}],"source_content_type":"text/x-python","patch_set":43,"id":"339b62f5_a4138d32","line":388,"range":{"start_line":388,"start_character":47,"end_line":388,"end_character":72},"in_reply_to":"9235aa4b_9f778859","updated":"2023-08-31 07:58:59.000000000","message":"Done","commit_id":"0c3a43202da44951f4ad4560e41640a6bcd29604"}],"glance/tests/unit/v2/test_images_resource.py":[{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":4025,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4026,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4027,"context_line":"        self.assertTrue(output.checksum)"},{"line_number":4028,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4029,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"},{"line_number":4030,"context_line":""},{"line_number":4031,"context_line":"    @mock.patch.object(glance.location.ImageRepoProxy, \u0027_set_acls\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"6e7b085f_4bb91b7a","line":4028,"updated":"2023-05-08 09:17:40.000000000","message":"you should assert for os_hash_algo and os_hash_value as well","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":4025,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4026,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4027,"context_line":"        self.assertTrue(output.checksum)"},{"line_number":4028,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4029,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"},{"line_number":4030,"context_line":""},{"line_number":4031,"context_line":"    @mock.patch.object(glance.location.ImageRepoProxy, \u0027_set_acls\u0027)"}],"source_content_type":"text/x-python","patch_set":5,"id":"81c75ef5_3648a527","line":4028,"in_reply_to":"6e7b085f_4bb91b7a","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":4052,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":4053,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"},{"line_number":4054,"context_line":"        do_secure_hash \u003d True"},{"line_number":4055,"context_line":"        self.assertRaisesRegex("},{"line_number":4056,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4057,"context_line":"            \u0027checksum is already set with a different value\u0027,"},{"line_number":4058,"context_line":"            self.controller.add_location,"},{"line_number":4059,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4060,"context_line":""},{"line_number":4061,"context_line":"    @mock.patch.object(store, \u0027get_size_from_backend\u0027)"},{"line_number":4062,"context_line":"    def test_add_location_with_invalid_validation_data("}],"source_content_type":"text/x-python","patch_set":5,"id":"81f8e53b_4b2df868","line":4059,"range":{"start_line":4055,"start_character":8,"end_line":4059,"end_character":68},"updated":"2023-05-08 09:17:40.000000000","message":"as per spec we are going to fail this operation, so you should assert for image status is set back to queued.","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":4052,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":4053,"context_line":"        url \u003d \u0027%s/fake_location_1\u0027 % BASE_URI"},{"line_number":4054,"context_line":"        do_secure_hash \u003d True"},{"line_number":4055,"context_line":"        self.assertRaisesRegex("},{"line_number":4056,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4057,"context_line":"            \u0027checksum is already set with a different value\u0027,"},{"line_number":4058,"context_line":"            self.controller.add_location,"},{"line_number":4059,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4060,"context_line":""},{"line_number":4061,"context_line":"    @mock.patch.object(store, \u0027get_size_from_backend\u0027)"},{"line_number":4062,"context_line":"    def test_add_location_with_invalid_validation_data("}],"source_content_type":"text/x-python","patch_set":5,"id":"3b08d2c3_a8f871cb","line":4059,"range":{"start_line":4055,"start_character":8,"end_line":4059,"end_character":68},"in_reply_to":"81f8e53b_4b2df868","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"b3223e8a7a71abbd8db3d303a4c75e6e2a153bc8","unresolved":true,"context_lines":[{"line_number":4104,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"},{"line_number":4105,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":4106,"context_line":"        }"},{"line_number":4107,"context_line":"        self.assertRaisesRegex("},{"line_number":4108,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4109,"context_line":"            \u0027os_hash_algo must be sha512\u0027,"},{"line_number":4110,"context_line":"            self.controller.add_location,"},{"line_number":4111,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4112,"context_line":""},{"line_number":4113,"context_line":"        validation_data \u003d {"},{"line_number":4114,"context_line":"            \u0027checksum\u0027: CHKSUM,"}],"source_content_type":"text/x-python","patch_set":5,"id":"ecde32a8_851dae68","line":4111,"range":{"start_line":4107,"start_character":8,"end_line":4111,"end_character":68},"updated":"2023-05-08 09:17:40.000000000","message":"do we only allow sha512?","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de692cb6df7c16bfb708d3ddfaa4d7a4b70c4f11","unresolved":false,"context_lines":[{"line_number":4104,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"},{"line_number":4105,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":4106,"context_line":"        }"},{"line_number":4107,"context_line":"        self.assertRaisesRegex("},{"line_number":4108,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4109,"context_line":"            \u0027os_hash_algo must be sha512\u0027,"},{"line_number":4110,"context_line":"            self.controller.add_location,"},{"line_number":4111,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4112,"context_line":""},{"line_number":4113,"context_line":"        validation_data \u003d {"},{"line_number":4114,"context_line":"            \u0027checksum\u0027: CHKSUM,"}],"source_content_type":"text/x-python","patch_set":5,"id":"31a66721_9b8e303c","line":4111,"range":{"start_line":4107,"start_character":8,"end_line":4111,"end_character":68},"in_reply_to":"ecde32a8_851dae68","updated":"2023-05-09 13:43:44.000000000","message":"Done","commit_id":"d5623ac92da28bbb116962cc49a4ee6dd25580e0"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":4114,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"},{"line_number":4115,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":4116,"context_line":"        }"},{"line_number":4117,"context_line":"        self.assertRaisesRegex("},{"line_number":4118,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4119,"context_line":"            \u0027os_hash_algo must be .*, not .*\u0027,"},{"line_number":4120,"context_line":"            self.controller.add_location,"},{"line_number":4121,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4122,"context_line":""},{"line_number":4123,"context_line":"        validation_data \u003d {"},{"line_number":4124,"context_line":"            \u0027checksum\u0027: CHKSUM,"}],"source_content_type":"text/x-python","patch_set":7,"id":"a832e769_dfc486c8","line":4121,"range":{"start_line":4117,"start_character":8,"end_line":4121,"end_character":68},"updated":"2023-05-10 01:42:43.000000000","message":"I think this scenario is incorrect\nsha256 is valid value so should be supported","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":4114,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha256\u0027,"},{"line_number":4115,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":4116,"context_line":"        }"},{"line_number":4117,"context_line":"        self.assertRaisesRegex("},{"line_number":4118,"context_line":"            webob.exc.HTTPConflict,"},{"line_number":4119,"context_line":"            \u0027os_hash_algo must be .*, not .*\u0027,"},{"line_number":4120,"context_line":"            self.controller.add_location,"},{"line_number":4121,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4122,"context_line":""},{"line_number":4123,"context_line":"        validation_data \u003d {"},{"line_number":4124,"context_line":"            \u0027checksum\u0027: CHKSUM,"}],"source_content_type":"text/x-python","patch_set":7,"id":"88e38211_19c4c6bf","line":4121,"range":{"start_line":4117,"start_character":8,"end_line":4121,"end_character":68},"in_reply_to":"a832e769_dfc486c8","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7ad5a3d738c6d411b65d071602f7f7d92c40de93","unresolved":true,"context_lines":[{"line_number":4141,"context_line":"            \u0027os_hash_value .* is not the correct size for sha512\u0027,"},{"line_number":4142,"context_line":"            self.controller.add_location,"},{"line_number":4143,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4144,"context_line":""},{"line_number":4145,"context_line":""},{"line_number":4146,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4147,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"aefaf2cc_a10037a6","line":4144,"updated":"2023-05-10 01:42:43.000000000","message":"Also identify missing scenarios as pointed in functional tests","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"c4b9b81052fb31ab4f4bc47704fed55351e885de","unresolved":false,"context_lines":[{"line_number":4141,"context_line":"            \u0027os_hash_value .* is not the correct size for sha512\u0027,"},{"line_number":4142,"context_line":"            self.controller.add_location,"},{"line_number":4143,"context_line":"            request, image_id, url, do_secure_hash, validation_data)"},{"line_number":4144,"context_line":""},{"line_number":4145,"context_line":""},{"line_number":4146,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4147,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"14eec96f_fe44a769","line":4144,"in_reply_to":"aefaf2cc_a10037a6","updated":"2023-05-10 14:55:13.000000000","message":"Done","commit_id":"bd6fb9b0923db775844a984bca9109d9964a6425"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"c899fd9ac86f6ee26b60977688b151027af5c07e","unresolved":true,"context_lines":[{"line_number":4117,"context_line":"            self, mock_get_size):"},{"line_number":4118,"context_line":"        mock_get_size.return_value \u003d 1"},{"line_number":4119,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":4120,"context_line":"        \u0027\u0027\u0027expected_size \u003d 4 * units.Ki"},{"line_number":4121,"context_line":"        expected_data \u003d b\"*\" * expected_size"},{"line_number":4122,"context_line":"        checksum \u003d md5(expected_data).hexdigest()"},{"line_number":4123,"context_line":"        hash_value \u003d hashlib.sha512(expected_data).hexdigest()\u0027\u0027\u0027"},{"line_number":4124,"context_line":"        self.images \u003d ["},{"line_number":4125,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1,"},{"line_number":4126,"context_line":"                        checksum\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"f2ea039f_bae5ae0b","line":4123,"range":{"start_line":4120,"start_character":8,"end_line":4123,"end_character":65},"updated":"2023-05-15 08:52:34.000000000","message":"why is this commented?","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":4117,"context_line":"            self, mock_get_size):"},{"line_number":4118,"context_line":"        mock_get_size.return_value \u003d 1"},{"line_number":4119,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":4120,"context_line":"        \u0027\u0027\u0027expected_size \u003d 4 * units.Ki"},{"line_number":4121,"context_line":"        expected_data \u003d b\"*\" * expected_size"},{"line_number":4122,"context_line":"        checksum \u003d md5(expected_data).hexdigest()"},{"line_number":4123,"context_line":"        hash_value \u003d hashlib.sha512(expected_data).hexdigest()\u0027\u0027\u0027"},{"line_number":4124,"context_line":"        self.images \u003d ["},{"line_number":4125,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1,"},{"line_number":4126,"context_line":"                        checksum\u003dNone,"}],"source_content_type":"text/x-python","patch_set":10,"id":"fd255072_047f6970","line":4123,"range":{"start_line":4120,"start_character":8,"end_line":4123,"end_character":65},"in_reply_to":"f2ea039f_bae5ae0b","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"b3bd4db85d20793b41fc3a53d32cbe888746f90f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":4266,"context_line":"            \u0027os_hash_value .* is not the correct size\u0027,"},{"line_number":4267,"context_line":"            self.controller.add_location,"},{"line_number":4268,"context_line":"            request, image_id, req_body)"},{"line_number":4269,"context_line":""},{"line_number":4270,"context_line":""},{"line_number":4271,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4272,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"3d8e57a1_a7cb2c25","line":4269,"updated":"2023-05-15 14:23:41.000000000","message":"I think the scenario I pointed is still missing\nvalidation_data \u003d {\u0027os_hash_value\u0027: \u0027sha256\u0027, \u0027os_hash_value\u0027: \u0027******\u0027, do_secure_hash\u003dTrue/False}\n\nThis case will ensure that even if sha512 is set in glance-api.conf it will set sha256 to the image.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7dd98fbb7a2a6f294cfdd44b757780c52eed1cbe","unresolved":true,"context_lines":[{"line_number":4266,"context_line":"            \u0027os_hash_value .* is not the correct size\u0027,"},{"line_number":4267,"context_line":"            self.controller.add_location,"},{"line_number":4268,"context_line":"            request, image_id, req_body)"},{"line_number":4269,"context_line":""},{"line_number":4270,"context_line":""},{"line_number":4271,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4272,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"4262454c_a993483c","line":4269,"in_reply_to":"3d8e57a1_a7cb2c25","updated":"2023-05-16 15:23:36.000000000","message":"You added test for this scenario but it is not working as expected. (line 4168)","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":true,"context_lines":[{"line_number":4266,"context_line":"            \u0027os_hash_value .* is not the correct size\u0027,"},{"line_number":4267,"context_line":"            self.controller.add_location,"},{"line_number":4268,"context_line":"            request, image_id, req_body)"},{"line_number":4269,"context_line":""},{"line_number":4270,"context_line":""},{"line_number":4271,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4272,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"5a613ae0_a5607740","line":4269,"in_reply_to":"4262454c_a993483c","updated":"2023-08-09 11:16:39.000000000","message":"Added this scenario in test_location_import.py","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"1b1adc2eabdf2cfbd0f978615fe5f5495e7db784","unresolved":false,"context_lines":[{"line_number":4266,"context_line":"            \u0027os_hash_value .* is not the correct size\u0027,"},{"line_number":4267,"context_line":"            self.controller.add_location,"},{"line_number":4268,"context_line":"            request, image_id, req_body)"},{"line_number":4269,"context_line":""},{"line_number":4270,"context_line":""},{"line_number":4271,"context_line":"class TestImagesControllerPolicies(base.IsolatedUnitTest):"},{"line_number":4272,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"2e160293_adb66435","line":4269,"in_reply_to":"5a613ae0_a5607740","updated":"2023-08-14 11:54:23.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"bab31f58_b50541b0","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"updated":"2023-05-15 14:23:41.000000000","message":"what if I pass\nurl: valid url\ndo_secure_hash: False","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2b68841c1e4f4b53270b09de2d978dfc82837b0d","unresolved":true,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"6e70020a_eedba079","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"in_reply_to":"0c99cef7_72fb5914","updated":"2023-05-17 08:01:14.000000000","message":"I misread your first comment, i thought if pass invalid url.\nit definitely should work.\nHere it\u0027s failing because of invalid do_secure_hash value.\n\nI\u0027m adding the new positive test with valid url, but since it\u0027s a deserializer method we are testing here, didn\u0027t get your comment about asserting checksum and other values.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"289aa0d310b476c955d303badc3396f382c2574c","unresolved":true,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"e1223719_605a8c91","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"in_reply_to":"6e70020a_eedba079","updated":"2023-05-17 08:16:18.000000000","message":"If this is request deserializer then we should add the scenario I am talking about in the actual controller test where we can assert the things I mentioned (If present then ignore it else this scenario needs to be covered.)","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7dd98fbb7a2a6f294cfdd44b757780c52eed1cbe","unresolved":true,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"0c99cef7_72fb5914","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"in_reply_to":"71285b79_03739314","updated":"2023-05-16 15:23:36.000000000","message":"why it should fail with invalid location?\nI am passing valid input to the request\n\nurl \u003d \u0027%s/fake_location_1\u0027 % BASE_URI\n        req_body \u003d {\n            \u0027url\u0027: url,\n            \u0027do_secure_hash\u0027: False,\n        }\n      \nI think this has to work and we should assert that checksum, os_hash_value and os_hash_algo is None.","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":true,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"71285b79_03739314","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"in_reply_to":"bab31f58_b50541b0","updated":"2023-05-16 14:24:30.000000000","message":"That will fail with invalid location error. I\u0027ve added that scenario as well at #4003","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":5325,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5326,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5327,"context_line":""},{"line_number":5328,"context_line":"        body \u003d {"},{"line_number":5329,"context_line":"            \u0027url\u0027: \u0027scheme1://path1\u0027,"},{"line_number":5330,"context_line":"            \u0027do_secure_hash\u0027: \u0027abcd\u0027,"},{"line_number":5331,"context_line":"        }"},{"line_number":5332,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5333,"context_line":"        self.assertRaisesRegex("},{"line_number":5334,"context_line":"            webob.exc.HTTPBadRequest,"}],"source_content_type":"text/x-python","patch_set":12,"id":"ed52214e_10db4a7e","line":5331,"range":{"start_line":5328,"start_character":8,"end_line":5331,"end_character":9},"in_reply_to":"e1223719_605a8c91","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"d7a6c8a25c0cc9058b29e3fa22f83a5014a26927","unresolved":true,"context_lines":[{"line_number":5394,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5395,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5396,"context_line":""},{"line_number":5397,"context_line":"        body \u003d {"},{"line_number":5398,"context_line":"            \u0027url\u0027: \u0027scheme1://path2\u0027,"},{"line_number":5399,"context_line":"            \u0027do_secure_hash\u0027: True,"},{"line_number":5400,"context_line":"            \u0027validation_data\u0027: {"},{"line_number":5401,"context_line":"                \u0027os_hash_algo\u0027: \u0027sha512\u0027,"},{"line_number":5402,"context_line":"                \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":5403,"context_line":"                \u0027checksum\u0027: CHKSUM,"},{"line_number":5404,"context_line":"            }"},{"line_number":5405,"context_line":"        }"},{"line_number":5406,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5407,"context_line":"        self.deserializer.add_location(request)"},{"line_number":5408,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"6f0e78d5_88efd3a9","line":5405,"range":{"start_line":5397,"start_character":8,"end_line":5405,"end_character":9},"updated":"2023-05-15 14:23:41.000000000","message":"add one more\n\nbody \u003d {\n            \u0027url\u0027: \u0027scheme1://path2\u0027,\n            \u0027do_secure_hash\u0027: True,\n            \u0027validation_data\u0027: {\n                bogus_value: test\n            }\n        }","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f0b357784813031ba2d174c522c775d6104373a2","unresolved":false,"context_lines":[{"line_number":5394,"context_line":"            \u0027Provided object does not match schema\u0027,"},{"line_number":5395,"context_line":"            self.deserializer.add_location, request)"},{"line_number":5396,"context_line":""},{"line_number":5397,"context_line":"        body \u003d {"},{"line_number":5398,"context_line":"            \u0027url\u0027: \u0027scheme1://path2\u0027,"},{"line_number":5399,"context_line":"            \u0027do_secure_hash\u0027: True,"},{"line_number":5400,"context_line":"            \u0027validation_data\u0027: {"},{"line_number":5401,"context_line":"                \u0027os_hash_algo\u0027: \u0027sha512\u0027,"},{"line_number":5402,"context_line":"                \u0027os_hash_value\u0027: MULTIHASH1,"},{"line_number":5403,"context_line":"                \u0027checksum\u0027: CHKSUM,"},{"line_number":5404,"context_line":"            }"},{"line_number":5405,"context_line":"        }"},{"line_number":5406,"context_line":"        request.body \u003d jsonutils.dump_as_bytes(body)"},{"line_number":5407,"context_line":"        self.deserializer.add_location(request)"},{"line_number":5408,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"7b57c96e_cee1d20a","line":5405,"range":{"start_line":5397,"start_character":8,"end_line":5405,"end_character":9},"in_reply_to":"6f0e78d5_88efd3a9","updated":"2023-05-16 14:24:30.000000000","message":"Done","commit_id":"55bdaa5ad3ec5fe82d61ad1977cf4a397b21072e"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"7dd98fbb7a2a6f294cfdd44b757780c52eed1cbe","unresolved":true,"context_lines":[{"line_number":4202,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4203,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4204,"context_line":"        self.assertTrue(checksum, output.checksum)"},{"line_number":4205,"context_line":"        self.assertTrue(\u0027sha512\u0027, output.os_hash_algo)"},{"line_number":4206,"context_line":"        self.assertTrue(hash_value, output.os_hash_value)"},{"line_number":4207,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4208,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"}],"source_content_type":"text/x-python","patch_set":13,"id":"cb04e50c_3b76fd6a","line":4205,"range":{"start_line":4205,"start_character":25,"end_line":4205,"end_character":31},"updated":"2023-05-16 15:23:36.000000000","message":"Haven\u0027t we decided that if os_hash_algo passed in request body using validataion_data then it should calculate the hash on that basis and not using default value set in CONF file \"hashing_algorithm\"?","commit_id":"cffc5ec1583980b744fe235864153bfcd4429e71"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"289aa0d310b476c955d303badc3396f382c2574c","unresolved":true,"context_lines":[{"line_number":4202,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4203,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4204,"context_line":"        self.assertTrue(checksum, output.checksum)"},{"line_number":4205,"context_line":"        self.assertTrue(\u0027sha512\u0027, output.os_hash_algo)"},{"line_number":4206,"context_line":"        self.assertTrue(hash_value, output.os_hash_value)"},{"line_number":4207,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4208,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"}],"source_content_type":"text/x-python","patch_set":13,"id":"f10b2d98_418a36ff","line":4205,"range":{"start_line":4205,"start_character":25,"end_line":4205,"end_character":31},"in_reply_to":"2ab5626e_974c1500","updated":"2023-05-17 08:16:18.000000000","message":"strange!!","commit_id":"cffc5ec1583980b744fe235864153bfcd4429e71"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"2b68841c1e4f4b53270b09de2d978dfc82837b0d","unresolved":true,"context_lines":[{"line_number":4202,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4203,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4204,"context_line":"        self.assertTrue(checksum, output.checksum)"},{"line_number":4205,"context_line":"        self.assertTrue(\u0027sha512\u0027, output.os_hash_algo)"},{"line_number":4206,"context_line":"        self.assertTrue(hash_value, output.os_hash_value)"},{"line_number":4207,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4208,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"}],"source_content_type":"text/x-python","patch_set":13,"id":"2ab5626e_974c1500","line":4205,"range":{"start_line":4205,"start_character":25,"end_line":4205,"end_character":31},"in_reply_to":"cb04e50c_3b76fd6a","updated":"2023-05-17 08:01:14.000000000","message":"hmmm ..missed it since it didn\u0027t fail due to assertTrue :/","commit_id":"cffc5ec1583980b744fe235864153bfcd4429e71"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"97bf57399165b5f39442f86c43bcda8c2fb75c40","unresolved":false,"context_lines":[{"line_number":4202,"context_line":"        self.assertEqual(image_id, output.image_id)"},{"line_number":4203,"context_line":"        self.assertEqual(1, len(output.locations))"},{"line_number":4204,"context_line":"        self.assertTrue(checksum, output.checksum)"},{"line_number":4205,"context_line":"        self.assertTrue(\u0027sha512\u0027, output.os_hash_algo)"},{"line_number":4206,"context_line":"        self.assertTrue(hash_value, output.os_hash_value)"},{"line_number":4207,"context_line":"        self.assertEqual(url, output.locations[0][\u0027url\u0027])"},{"line_number":4208,"context_line":"        self.assertEqual(\u0027active\u0027, output.status)"}],"source_content_type":"text/x-python","patch_set":13,"id":"ea0ddbca_2e5d4daa","line":4205,"range":{"start_line":4205,"start_character":25,"end_line":4205,"end_character":31},"in_reply_to":"f10b2d98_418a36ff","updated":"2023-08-09 11:16:39.000000000","message":"Done","commit_id":"cffc5ec1583980b744fe235864153bfcd4429e71"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"bb0062237edb6a3f208d6d70f2cfa1ee0f4bf07c","unresolved":true,"context_lines":[{"line_number":4079,"context_line":"        self.db.image_create(None, self.images[0])"},{"line_number":4080,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":4081,"context_line":"        validation_data \u003d {"},{"line_number":4082,"context_line":"            \u0027checksum\u0027: \u0027something the same length as md5\u0027,"},{"line_number":4083,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha512\u0027,"},{"line_number":4084,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1}"},{"line_number":4085,"context_line":"        req_body \u003d {"}],"source_content_type":"text/x-python","patch_set":34,"id":"6c3de720_db946469","line":4082,"updated":"2023-08-28 06:23:23.000000000","message":"as per your comment on client patch [1] since we are not passing checksum as input, I think all these tests are now invalid.\n\nhttps://review.opendev.org/c/openstack/python-glanceclient/+/890634/comment/d660b414_ae3d286b/","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"6034c350100892c2ac50d68a7dac29746095014f","unresolved":true,"context_lines":[{"line_number":4079,"context_line":"        self.db.image_create(None, self.images[0])"},{"line_number":4080,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":4081,"context_line":"        validation_data \u003d {"},{"line_number":4082,"context_line":"            \u0027checksum\u0027: \u0027something the same length as md5\u0027,"},{"line_number":4083,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha512\u0027,"},{"line_number":4084,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1}"},{"line_number":4085,"context_line":"        req_body \u003d {"}],"source_content_type":"text/x-python","patch_set":34,"id":"c314fdf8_c8db0588","line":4082,"in_reply_to":"6c3de720_db946469","updated":"2023-08-28 07:53:04.000000000","message":"removed the checksum related tests.","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"f83b4bd77b527ca25c1153ac39cfd2aba3590f68","unresolved":false,"context_lines":[{"line_number":4079,"context_line":"        self.db.image_create(None, self.images[0])"},{"line_number":4080,"context_line":"        request \u003d unit_test_utils.get_fake_request()"},{"line_number":4081,"context_line":"        validation_data \u003d {"},{"line_number":4082,"context_line":"            \u0027checksum\u0027: \u0027something the same length as md5\u0027,"},{"line_number":4083,"context_line":"            \u0027os_hash_algo\u0027: \u0027sha512\u0027,"},{"line_number":4084,"context_line":"            \u0027os_hash_value\u0027: MULTIHASH1}"},{"line_number":4085,"context_line":"        req_body \u003d {"}],"source_content_type":"text/x-python","patch_set":34,"id":"f43605d3_ec67e870","line":4082,"in_reply_to":"c314fdf8_c8db0588","updated":"2023-08-28 14:39:33.000000000","message":"Done","commit_id":"c7ad2532e0c79de3b80f9ed3e7a07fcf053a48b5"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"3031d379a3a658e5c974cf05ea96f72fe7b76f71","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"77b62c5e_e1e66655","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"updated":"2023-08-28 15:05:03.000000000","message":"i think add location with service role is missing.\nAlso do_secure_hash true and hashcalculation fails and image remains in active state is missing as well","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"022c30f6e6da5dd2700da7b40f6d5b202bd29463","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"bc3ce1b4_a0d93984","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"2b43604f_f4b1ad7b","updated":"2023-08-29 09:52:35.000000000","message":"why it is in other file and not here?\nI think in test_location_import.py you are just calling individual tasks and not actual API. It should be better written here rather than have different scenarios in two different files.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"de83ae2c5caa5c5d5fe02e436d2a02c981a4c386","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"2b43604f_f4b1ad7b","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"77b62c5e_e1e66655","updated":"2023-08-29 09:06:23.000000000","message":"The second scenario is already covered in test_location_import.py","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"93f944683f042dd65d5aedcf1758b557be98aaf3","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"9ce24a61_a48d9afa","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"887bec5f_a1e776dc","updated":"2023-11-02 09:38:31.000000000","message":"yes, those are for functional scenarios.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"7a0f61bef6d5e3a2de925751c4c0664ff1b2c432","unresolved":false,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"154f0949_5443de14","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"9ce24a61_a48d9afa","updated":"2024-02-26 14:19:50.000000000","message":"Done","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"ce74cacadb6cba9f5989078b058cb9af9128daad","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"dd4f2b6d_09375266","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"bc3ce1b4_a0d93984","updated":"2023-10-31 09:30:49.000000000","message":"As discussed during PTG, this particular scenario is not possible to add here since we are faking everything here so difficult to test the error case in async operation.","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e687920b57f134abed24165055749bf39dba72d1","unresolved":true,"context_lines":[{"line_number":4007,"context_line":"            self.controller.add_location,"},{"line_number":4008,"context_line":"            request, image_id, req_body)"},{"line_number":4009,"context_line":""},{"line_number":4010,"context_line":"    def test_add_location_without_service_role(self):"},{"line_number":4011,"context_line":"        # Need to make sure \u0027http\u0027 store is not enabled"},{"line_number":4012,"context_line":"        self.config(stores\u003d\u0027file\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":4013,"context_line":"        image_id \u003d str(uuid.uuid4())"}],"source_content_type":"text/x-python","patch_set":39,"id":"887bec5f_a1e776dc","line":4010,"range":{"start_line":4010,"start_character":8,"end_line":4010,"end_character":46},"in_reply_to":"dd4f2b6d_09375266","updated":"2023-10-31 09:49:31.000000000","message":"I think dan has suggested some workaround but may be those for functional scenario?","commit_id":"f56eac9bb3fa4fb810c8582c77f92f4253328b0f"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":3940,"context_line":"        self.config(default_store\u003d\u0027http\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":3941,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":3942,"context_line":"        self.images \u003d ["},{"line_number":3943,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1, checksum\u003dCHKSUM,"},{"line_number":3944,"context_line":"                        name\u003d\u00271\u0027,"},{"line_number":3945,"context_line":"                        disk_format\u003d\u0027raw\u0027,"},{"line_number":3946,"context_line":"                        container_format\u003d\u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":85,"id":"90353b4c_53c6727c","line":3943,"range":{"start_line":3943,"start_character":49,"end_line":3943,"end_character":65},"updated":"2024-07-18 05:18:53.000000000","message":"I think you should avoid passing checksum as input to create image since do_secure_hash is True which means you are going to calculate it.","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":true,"context_lines":[{"line_number":3940,"context_line":"        self.config(default_store\u003d\u0027http\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":3941,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":3942,"context_line":"        self.images \u003d ["},{"line_number":3943,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1, checksum\u003dCHKSUM,"},{"line_number":3944,"context_line":"                        name\u003d\u00271\u0027,"},{"line_number":3945,"context_line":"                        disk_format\u003d\u0027raw\u0027,"},{"line_number":3946,"context_line":"                        container_format\u003d\u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":85,"id":"926892a4_fca5844b","line":3943,"range":{"start_line":3943,"start_character":49,"end_line":3943,"end_character":65},"in_reply_to":"90353b4c_53c6727c","updated":"2024-07-22 07:25:34.000000000","message":"oops, this one got skipped, will remove it","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"282bd70b91628834e1d4cd34572dd91d58cebc2f","unresolved":false,"context_lines":[{"line_number":3940,"context_line":"        self.config(default_store\u003d\u0027http\u0027, group\u003d\u0027glance_store\u0027)"},{"line_number":3941,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":3942,"context_line":"        self.images \u003d ["},{"line_number":3943,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1, checksum\u003dCHKSUM,"},{"line_number":3944,"context_line":"                        name\u003d\u00271\u0027,"},{"line_number":3945,"context_line":"                        disk_format\u003d\u0027raw\u0027,"},{"line_number":3946,"context_line":"                        container_format\u003d\u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":85,"id":"5b79c7b7_2c608bbc","line":3943,"range":{"start_line":3943,"start_character":49,"end_line":3943,"end_character":65},"in_reply_to":"926892a4_fca5844b","updated":"2024-07-22 07:45:05.000000000","message":"Done","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"e4ab0925581952561a405a3296f38ac844d30e00","unresolved":true,"context_lines":[{"line_number":3971,"context_line":"        self.config(do_secure_hash\u003dTrue)"},{"line_number":3972,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":3973,"context_line":"        self.images \u003d ["},{"line_number":3974,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1, checksum\u003dCHKSUM,"},{"line_number":3975,"context_line":"                        name\u003d\u00271\u0027,"},{"line_number":3976,"context_line":"                        disk_format\u003d\u0027raw\u0027,"},{"line_number":3977,"context_line":"                        container_format\u003d\u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":85,"id":"49774290_c55b6049","line":3974,"range":{"start_line":3974,"start_character":49,"end_line":3974,"end_character":65},"updated":"2024-07-18 05:18:53.000000000","message":"ditto","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"282bd70b91628834e1d4cd34572dd91d58cebc2f","unresolved":false,"context_lines":[{"line_number":3971,"context_line":"        self.config(do_secure_hash\u003dTrue)"},{"line_number":3972,"context_line":"        image_id \u003d str(uuid.uuid4())"},{"line_number":3973,"context_line":"        self.images \u003d ["},{"line_number":3974,"context_line":"            _db_fixture(image_id, owner\u003dTENANT1, checksum\u003dCHKSUM,"},{"line_number":3975,"context_line":"                        name\u003d\u00271\u0027,"},{"line_number":3976,"context_line":"                        disk_format\u003d\u0027raw\u0027,"},{"line_number":3977,"context_line":"                        container_format\u003d\u0027bare\u0027,"}],"source_content_type":"text/x-python","patch_set":85,"id":"9ce26a16_cf4729f3","line":3974,"range":{"start_line":3974,"start_character":49,"end_line":3974,"end_character":65},"in_reply_to":"49774290_c55b6049","updated":"2024-07-22 07:45:05.000000000","message":"Done","commit_id":"2b9967e75ac06711a2197f1357aeec34288310cf"}],"releasenotes/notes/add-new-add-location-api-acd459299976b4a5.yaml":[{"author":{"_account_id":5314,"name":"Brian Rosmaita","email":"rosmaita.fossdev@gmail.com","username":"brian-rosmaita"},"change_message_id":"5f44d6039e9a9214d18dc63f191d750ad556ed67","unresolved":true,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This release brings the additional functionality of adding new"},{"line_number":5,"context_line":"    location to an ``queued`` state image which will replace the"},{"line_number":6,"context_line":"    image-update mechanism for consumers like cinder and nova for"},{"line_number":7,"context_line":"    for OSSN-0090 and OSSN-0065."}],"source_content_type":"text/x-yaml","patch_set":73,"id":"62d76f4e_328ea736","line":7,"range":{"start_line":6,"start_character":62,"end_line":7,"end_character":7},"updated":"2024-02-29 14:12:35.000000000","message":"maybe replace \"for for\" with \"to address\"","commit_id":"de08233f8e264a496c681b53794a7cc878626c36"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"bd6adb8fdd022e710fc381935ad75d6c88c53f92","unresolved":false,"context_lines":[{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This release brings the additional functionality of adding new"},{"line_number":5,"context_line":"    location to an ``queued`` state image which will replace the"},{"line_number":6,"context_line":"    image-update mechanism for consumers like cinder and nova for"},{"line_number":7,"context_line":"    for OSSN-0090 and OSSN-0065."}],"source_content_type":"text/x-yaml","patch_set":73,"id":"2c83a517_67083c19","line":7,"range":{"start_line":6,"start_character":62,"end_line":7,"end_character":7},"in_reply_to":"62d76f4e_328ea736","updated":"2024-04-29 08:04:13.000000000","message":"Done","commit_id":"de08233f8e264a496c681b53794a7cc878626c36"},{"author":{"_account_id":8122,"name":"Cyril Roelandt","email":"cyril@redhat.com","username":"cyril.roelandt.enovance"},"change_message_id":"e02134fbfcf79026c040a67e25967be5470b9e84","unresolved":true,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This release brings the additional functionality of adding new"},{"line_number":5,"context_line":"    location to an ``queued`` state image which will replace the"},{"line_number":6,"context_line":"    image-update mechanism for consumers like cinder and nova to"},{"line_number":7,"context_line":"    address OSSN-0090 and OSSN-0065."}],"source_content_type":"text/x-yaml","patch_set":82,"id":"eca82240_ef30cd42","line":5,"range":{"start_line":5,"start_character":16,"end_line":5,"end_character":18},"updated":"2024-06-18 15:28:20.000000000","message":"If you need another patchset, s/to an/to a/.","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"527fba75d0fb725529e44ef774112354d46818ae","unresolved":false,"context_lines":[{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    This release brings the additional functionality of adding new"},{"line_number":5,"context_line":"    location to an ``queued`` state image which will replace the"},{"line_number":6,"context_line":"    image-update mechanism for consumers like cinder and nova to"},{"line_number":7,"context_line":"    address OSSN-0090 and OSSN-0065."}],"source_content_type":"text/x-yaml","patch_set":82,"id":"24cfb5dc_bcdb8621","line":5,"range":{"start_line":5,"start_character":16,"end_line":5,"end_character":18},"in_reply_to":"eca82240_ef30cd42","updated":"2024-07-22 07:25:34.000000000","message":"Done","commit_id":"3e255374bb759c6e00e62b8c62e7fd2379791f8c"},{"author":{"_account_id":9303,"name":"Abhishek Kekane","email":"akekane@redhat.com","username":"abhishekkekane"},"change_message_id":"97d857523089fe8d46bc8f63e21baa48a1311d9f","unresolved":true,"context_lines":[{"line_number":7,"context_line":"    address OSSN-0090 and OSSN-0065."},{"line_number":8,"context_line":"issues:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    In case of ``http`` store if bad value is passed for ``os_hash_value``"},{"line_number":11,"context_line":"    in validation data then task fails which is expected but it stores"},{"line_number":12,"context_line":"    location of the image which is wrong, that needs to be popped out."},{"line_number":13,"context_line":"    The location doesn\u0027t get deleted because deletion of location"},{"line_number":14,"context_line":"    is not allowed for ``http`` store."}],"source_content_type":"text/x-yaml","patch_set":86,"id":"7c99068f_69414db7","line":14,"range":{"start_line":10,"start_character":4,"end_line":14,"end_character":38},"updated":"2024-07-22 07:51:32.000000000","message":"Here you should also mention that image needs to be deleted as it is of no use.","commit_id":"20010512e87e0fbbfad168f077f39d40401d6a74"},{"author":{"_account_id":19138,"name":"Pranali Deore","email":"pdeore@redhat.com","username":"PranaliD"},"change_message_id":"db9df75e6d33faee9c87fb3f9ef6377fb26759cd","unresolved":false,"context_lines":[{"line_number":7,"context_line":"    address OSSN-0090 and OSSN-0065."},{"line_number":8,"context_line":"issues:"},{"line_number":9,"context_line":"  - |"},{"line_number":10,"context_line":"    In case of ``http`` store if bad value is passed for ``os_hash_value``"},{"line_number":11,"context_line":"    in validation data then task fails which is expected but it stores"},{"line_number":12,"context_line":"    location of the image which is wrong, that needs to be popped out."},{"line_number":13,"context_line":"    The location doesn\u0027t get deleted because deletion of location"},{"line_number":14,"context_line":"    is not allowed for ``http`` store."}],"source_content_type":"text/x-yaml","patch_set":86,"id":"605079d8_dec58f4d","line":14,"range":{"start_line":10,"start_character":4,"end_line":14,"end_character":38},"in_reply_to":"7c99068f_69414db7","updated":"2024-07-25 06:57:02.000000000","message":"Acknowledged","commit_id":"20010512e87e0fbbfad168f077f39d40401d6a74"}]}
