)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d52fecea22a45a7d73e2e29d45975f87d4f2e91b","unresolved":true,"context_lines":[{"line_number":10,"context_line":"abort as soon as we\u0027re sure that what we\u0027ve read is not a match. In"},{"line_number":11,"context_line":"the case of glance where the user has already promised to upload a"},{"line_number":12,"context_line":"given format, we want to abort before we\u0027ve read tons of traffic only"},{"line_number":13,"context_line":"to reject the image later."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Related to blueprint glance-as-defender"},{"line_number":16,"context_line":"Change-Id: Idf254b242d76ad0bfa9b06babc368d8b92f1c15f"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"5fe234ef_79afa605","line":13,"updated":"2024-10-08 11:56:24.000000000","message":"ah yes that does make sesne for the glance usecase.\n\nfor nova we have already fully downloaded it but i can see its use for glance","commit_id":"b86c3bdfc577b7acef1b9c2ecb9d8f1967d393ae"}],"oslo_utils/imageutils/format_inspector.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"d52fecea22a45a7d73e2e29d45975f87d4f2e91b","unresolved":true,"context_lines":[{"line_number":1336,"context_line":"                        inspector.complete and not inspector.format_match):"},{"line_number":1337,"context_line":"                    raise ImageFormatError("},{"line_number":1338,"context_line":"                        \u0027Content does not match expected format %r\u0027 % ("},{"line_number":1339,"context_line":"                            inspector.NAME))"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"    def __next__(self):"},{"line_number":1342,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"0d8bb2be_26c3542c","line":1339,"updated":"2024-10-08 11:56:24.000000000","message":"so in the nova version, i had an optimisation to remove the inspector form the list\nof inspectors, once it was \u0027complete\u0027 i.e. had read all the data for that\n\n\nhttps://review.opendev.org/c/openstack/nova/+/923533/8/nova/image/format_inspector.py#1027\n\nso this is a more specialised version of that optimisation for a single chunk with a given expected format.\n\n\ni wonder if it would make sense to implement that optimisation in __next__ also?\n\nbasically we would need to add self._matched_inspectors, move the iteration over the inspectors to __next__ and pass a single inspector to _process_chunk at a time.\n\nthen when called without a expected format we would get the same optimiation for all inspectors.\n\ni don\u0027t know if that still makes sense with the footers support? i assume that is why it was dropped originally when this was imported into oslo?","commit_id":"b86c3bdfc577b7acef1b9c2ecb9d8f1967d393ae"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"994113c79c5fc46f436121e51d489df7c3a15e3d","unresolved":true,"context_lines":[{"line_number":1336,"context_line":"                        inspector.complete and not inspector.format_match):"},{"line_number":1337,"context_line":"                    raise ImageFormatError("},{"line_number":1338,"context_line":"                        \u0027Content does not match expected format %r\u0027 % ("},{"line_number":1339,"context_line":"                            inspector.NAME))"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"    def __next__(self):"},{"line_number":1342,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"a0053c10_f24af0d5","line":1339,"in_reply_to":"0d8bb2be_26c3542c","updated":"2024-10-08 14:47:40.000000000","message":"\u003e so in the nova version, i had an optimisation to remove the inspector form the list\n\u003e of inspectors, once it was \u0027complete\u0027 i.e. had read all the data for that\n\nI\u0027m still doing that for errored inspectors. For complete ones there\u0027s no real value in taking them out of the list, since no regions will grab data. However, in order for the `size` and `virtual_size` for things like `GPTInspector` (and `Raw`) to be correct (or close to it), we need to at least keep telling those that we\u0027re reading data. That\u0027s not important for nova, but it is for glance.\n\n\u003e i don\u0027t know if that still makes sense with the footers support? i assume that is why it was dropped originally when this was imported into oslo?\n\nThe footer stuff is implemented as EndCaptureRegion, which should keep an inspector using it from being complete until we call finished. However, for the reason above I think it\u0027s best to keep this simple and consistent, especially since running through `eat_chunk()` with no incomplete region is just updating the counters.","commit_id":"b86c3bdfc577b7acef1b9c2ecb9d8f1967d393ae"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"eaef7e47ec8be0978fff9d7e2813dde68667e2d7","unresolved":false,"context_lines":[{"line_number":1336,"context_line":"                        inspector.complete and not inspector.format_match):"},{"line_number":1337,"context_line":"                    raise ImageFormatError("},{"line_number":1338,"context_line":"                        \u0027Content does not match expected format %r\u0027 % ("},{"line_number":1339,"context_line":"                            inspector.NAME))"},{"line_number":1340,"context_line":""},{"line_number":1341,"context_line":"    def __next__(self):"},{"line_number":1342,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"946b5e59_6f0b761d","line":1339,"in_reply_to":"a0053c10_f24af0d5","updated":"2024-10-08 15:37:37.000000000","message":"Acknowledged","commit_id":"b86c3bdfc577b7acef1b9c2ecb9d8f1967d393ae"}]}
