)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"96634ae2185dcad5fa5998a717585403d2409b5c","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Collects stats on EC versions, schemes, and CRCs in use."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Iea1c989cd4bdde1f31a7387a7ad892d7ed4ef019"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"9f560f44_aa3c7bc8","line":11,"updated":"2020-07-30 23:26:52.000000000","message":"Should probably add a\n\n Related-Bug: 1886088","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"}],"swift/obj/audit_ec_data.py":[{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"f736b71d91f140e87fd937b52d65199e951f9a1f","unresolved":false,"context_lines":[{"line_number":1,"context_line":"import collections"},{"line_number":2,"context_line":"import ctypes"},{"line_number":3,"context_line":"import ctypes.util"},{"line_number":4,"context_line":"import os"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_35de0c11","line":1,"updated":"2020-07-31 02:08:23.000000000","message":"pep8: H102: Apache 2.0 license header not found","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"0386c1ef4231cdf6026d76c3435328cd46de7f0c","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027archives\u0027: 0, \u0027bytes\u0027: 0})"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def see_object(self, sequence_number, object_metadata, policy_index,"},{"line_number":60,"context_line":"                   partition, device, path, **kwargs):"},{"line_number":61,"context_line":"        if self.audit_type \u003d\u003d \u0027ZBF\u0027:"},{"line_number":62,"context_line":"            return"},{"line_number":63,"context_line":"        if POLICIES[policy_index].policy_type !\u003d EC_POLICY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_19ef1eea","line":60,"updated":"2020-08-12 01:51:22.000000000","message":"What is device for in this case? The path is not URL, it\u0027s a real filename. Maybe rename \"path\" to avoid that confusion?","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b1cfb47bd0dc82e13844ff46d6761a338e8d8fbe","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            \u0027archives\u0027: 0, \u0027bytes\u0027: 0})"},{"line_number":58,"context_line":""},{"line_number":59,"context_line":"    def see_object(self, sequence_number, object_metadata, policy_index,"},{"line_number":60,"context_line":"                   partition, device, path, **kwargs):"},{"line_number":61,"context_line":"        if self.audit_type \u003d\u003d \u0027ZBF\u0027:"},{"line_number":62,"context_line":"            return"},{"line_number":63,"context_line":"        if POLICIES[policy_index].policy_type !\u003d EC_POLICY:"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_d211f3ae","line":60,"in_reply_to":"9f560f44_19ef1eea","updated":"2020-08-12 20:44:25.000000000","message":"Oh, and just let the **kwargs eat it? Sure; could probably do it for partition and sequence_number, too. (Speaking of, now that it\u0027s all inline, do we still need sequence_number/final_sequence_number?)\n\nMaybe datafile_path would be better?","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"96634ae2185dcad5fa5998a717585403d2409b5c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if content_length \u003d\u003d 0:"},{"line_number":67,"context_line":"            return"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if content_length \u003c 80:"},{"line_number":70,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":71,"context_line":"            self.logger.warning("},{"line_number":72,"context_line":"                \u0027Archive too short to contain liberasurecode fragments: %s\u0027,"},{"line_number":73,"context_line":"                path)"},{"line_number":74,"context_line":"            return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            with open(path, \u0027rb\u0027) as fp:"},{"line_number":78,"context_line":"                header \u003d fp.read(80)"},{"line_number":79,"context_line":"        except (OSError, IOError) as err:"},{"line_number":80,"context_line":"            self.errors[\u0027cannot_read\u0027] +\u003d 1"},{"line_number":81,"context_line":"            self.logger.warning(\u0027Could not read archive %s: %s\u0027, path, err)"},{"line_number":82,"context_line":"            return"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if len(header) !\u003d 80:"},{"line_number":85,"context_line":"            # This should never come up; auditor would have quarantined before"},{"line_number":86,"context_line":"            # handing it to us. Belt \u0026 bracers."},{"line_number":87,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":88,"context_line":"            self.logger.warning("},{"line_number":89,"context_line":"                \u0027Archive too short to contain liberasurecode fragments, \u0027"},{"line_number":90,"context_line":"                \u0027despite metadata: %s\u0027, path)"},{"line_number":91,"context_line":"            return"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # See fragment_header_s definition in erasurecode.h"},{"line_number":94,"context_line":"        meta, magic, version, crc \u003d struct.unpack(\u0027\u003d59sIII\u0027, header[:71])"},{"line_number":95,"context_line":"        if magic !\u003d LIBEC_MAGIC:"},{"line_number":96,"context_line":"            self.errors[\u0027bad_magic\u0027] +\u003d 1"},{"line_number":97,"context_line":"            self.logger.warning("},{"line_number":98,"context_line":"                \u0027Archive does not contain a liberasurecode fragment: %s\u0027, path)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.versions[unpack_version(version)] +\u003d 1"},{"line_number":102,"context_line":"        scheme_stats \u003d self.schemes[object_metadata[\u0027X-Object-Sysmeta-Ec-Scheme\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_2a77cba2","line":99,"range":{"start_line":69,"start_character":0,"end_line":99,"end_character":18},"updated":"2020-07-30 23:26:52.000000000","message":"I wonder how much of this could/should be moved into the auditor proper...","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"0386c1ef4231cdf6026d76c3435328cd46de7f0c","unresolved":false,"context_lines":[{"line_number":66,"context_line":"        if content_length \u003d\u003d 0:"},{"line_number":67,"context_line":"            return"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"        if content_length \u003c 80:"},{"line_number":70,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":71,"context_line":"            self.logger.warning("},{"line_number":72,"context_line":"                \u0027Archive too short to contain liberasurecode fragments: %s\u0027,"},{"line_number":73,"context_line":"                path)"},{"line_number":74,"context_line":"            return"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"        try:"},{"line_number":77,"context_line":"            with open(path, \u0027rb\u0027) as fp:"},{"line_number":78,"context_line":"                header \u003d fp.read(80)"},{"line_number":79,"context_line":"        except (OSError, IOError) as err:"},{"line_number":80,"context_line":"            self.errors[\u0027cannot_read\u0027] +\u003d 1"},{"line_number":81,"context_line":"            self.logger.warning(\u0027Could not read archive %s: %s\u0027, path, err)"},{"line_number":82,"context_line":"            return"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        if len(header) !\u003d 80:"},{"line_number":85,"context_line":"            # This should never come up; auditor would have quarantined before"},{"line_number":86,"context_line":"            # handing it to us. Belt \u0026 bracers."},{"line_number":87,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":88,"context_line":"            self.logger.warning("},{"line_number":89,"context_line":"                \u0027Archive too short to contain liberasurecode fragments, \u0027"},{"line_number":90,"context_line":"                \u0027despite metadata: %s\u0027, path)"},{"line_number":91,"context_line":"            return"},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"        # See fragment_header_s definition in erasurecode.h"},{"line_number":94,"context_line":"        meta, magic, version, crc \u003d struct.unpack(\u0027\u003d59sIII\u0027, header[:71])"},{"line_number":95,"context_line":"        if magic !\u003d LIBEC_MAGIC:"},{"line_number":96,"context_line":"            self.errors[\u0027bad_magic\u0027] +\u003d 1"},{"line_number":97,"context_line":"            self.logger.warning("},{"line_number":98,"context_line":"                \u0027Archive does not contain a liberasurecode fragment: %s\u0027, path)"},{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.versions[unpack_version(version)] +\u003d 1"},{"line_number":102,"context_line":"        scheme_stats \u003d self.schemes[object_metadata[\u0027X-Object-Sysmeta-Ec-Scheme\u0027]]"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_b9e1d2ff","line":99,"range":{"start_line":69,"start_character":0,"end_line":99,"end_character":18},"in_reply_to":"9f560f44_2a77cba2","updated":"2020-08-12 01:51:22.000000000","message":"Indeed... Some of it looks actionable.\n\nBut note that David (dsariel) is working on invoking quarantine from the plugin.","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":22348,"name":"Zuul","username":"zuul","tags":["SERVICE_USER"]},"tag":"autogenerated:zuul:check","change_message_id":"f736b71d91f140e87fd937b52d65199e951f9a1f","unresolved":false,"context_lines":[{"line_number":99,"context_line":"            return"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"        self.versions[unpack_version(version)] +\u003d 1"},{"line_number":102,"context_line":"        scheme_stats \u003d self.schemes[object_metadata[\u0027X-Object-Sysmeta-Ec-Scheme\u0027]]"},{"line_number":103,"context_line":"        scheme_stats[\u0027archives\u0027] +\u003d 1"},{"line_number":104,"context_line":"        scheme_stats[\u0027bytes\u0027] +\u003d content_length"},{"line_number":105,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_15e148d1","line":102,"updated":"2020-07-31 02:08:23.000000000","message":"pep8: E501 line too long (82 \u003e 79 characters)","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"96634ae2185dcad5fa5998a717585403d2409b5c","unresolved":false,"context_lines":[{"line_number":128,"context_line":"            \u0027versions\u0027: self.versions,"},{"line_number":129,"context_line":"            \u0027schemes\u0027: self.schemes,"},{"line_number":130,"context_line":"            \u0027crcs\u0027: self.crcs,"},{"line_number":131,"context_line":"            \u0027reported\u0027: time.time(),"},{"line_number":132,"context_line":"        }}, self.rcache, self.logger)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_4a5b1f2d","line":131,"range":{"start_line":131,"start_character":12,"end_line":131,"end_character":36},"updated":"2020-07-30 23:26:52.000000000","message":"If you turn off the watcher, the recon data will hang around indefinitely -- this can at least tell you how stale it is.","commit_id":"d2a1fb93e3f5abf8cfd4de34854540d6a1167841"},{"author":{"_account_id":18142,"name":"David Sariel","email":"dsariel@redhat.com","username":"dsariel"},"change_message_id":"e3b82c9319c8d5017ad75679f61c44d08569b140","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if len(header) !\u003d 80:"},{"line_number":101,"context_line":"            # This should never come up; auditor would have quarantined before"},{"line_number":102,"context_line":"            # handing it to us. Belt \u0026 bracers."},{"line_number":103,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":104,"context_line":"            raise df._quarantine("},{"line_number":105,"context_line":"                df._data_file,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_53e42e3c","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":47},"updated":"2020-11-11 15:37:30.000000000","message":"is this comment still relevant? Because 80 chars read at line 93. And I guess there is no parallel auditor invocation on the same file. Just to learn whether auditor pass detects and quarantines files with shorter header somewhere else. Thanks.","commit_id":"3416209800adb20cd9016d826d5d0b61f96e8aa9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7a44a71f79e1927e9e765ee857db43954cd96073","unresolved":false,"context_lines":[{"line_number":98,"context_line":"            return"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":"        if len(header) !\u003d 80:"},{"line_number":101,"context_line":"            # This should never come up; auditor would have quarantined before"},{"line_number":102,"context_line":"            # handing it to us. Belt \u0026 bracers."},{"line_number":103,"context_line":"            self.errors[\u0027too_short\u0027] +\u003d 1"},{"line_number":104,"context_line":"            raise df._quarantine("},{"line_number":105,"context_line":"                df._data_file,"}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_76bf9360","line":102,"range":{"start_line":101,"start_character":0,"end_line":102,"end_character":47},"in_reply_to":"1f621f24_53e42e3c","updated":"2020-11-12 00:51:56.000000000","message":"With audit type ALL, we open up the disk file and make sure we can still read the whole thing [0]. The read does a few things -- notably, during open it verifies that the content-length in metadata matches the size on disk [1] and during close it verifies that the etag stored in metadata matches the md5 of the content on disk [2].\n\nSo, with the `if content_length \u003c 80:` check at L84, this really shouldn\u0027t ever get tripped; we should always be able to read at least 80 bytes. I figured it\u0027d be best to include it for completeness, though.\n\n(Note that ZBF audits skip the read; part of why I wanted this to only hook into ALL audits. I wonder how much use people will have for ZBF watchers...)\n\n[0] https://github.com/openstack/swift/blob/2.26.0/swift/obj/auditor.py#L250-L261\n[1] https://github.com/openstack/swift/blob/2.26.0/swift/obj/diskfile.py#L2604-L2608\n[2] https://github.com/openstack/swift/blob/2.26.0/swift/obj/diskfile.py#L2188-L2213","commit_id":"3416209800adb20cd9016d826d5d0b61f96e8aa9"}],"swift/obj/auditor.py":[{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"0386c1ef4231cdf6026d76c3435328cd46de7f0c","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        except (Exception, Timeout):"},{"line_number":522,"context_line":"            self.logger.exception("},{"line_number":523,"context_line":"                \u0027Error in see_object(meta\u003d%r, policy_index\u003d%r, partition\u003d%r)\u0027,"},{"line_number":524,"context_line":"                meta, policy_index, partition)"},{"line_number":525,"context_line":"            # Do *not* flag watcher as being in an error state; a failure"},{"line_number":526,"context_line":"            # to process one object shouldn\u0027t impact the ability to process"},{"line_number":527,"context_line":"            # others."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_59ba36e1","side":"PARENT","line":524,"updated":"2020-08-12 01:51:22.000000000","message":"I think I\u0027m going to squash at least this part if you don\u0027t mind.","commit_id":"97d22ac51c32b275f80ea1fc371de33026615837"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"b1cfb47bd0dc82e13844ff46d6761a338e8d8fbe","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        except (Exception, Timeout):"},{"line_number":522,"context_line":"            self.logger.exception("},{"line_number":523,"context_line":"                \u0027Error in see_object(meta\u003d%r, policy_index\u003d%r, partition\u003d%r)\u0027,"},{"line_number":524,"context_line":"                meta, policy_index, partition)"},{"line_number":525,"context_line":"            # Do *not* flag watcher as being in an error state; a failure"},{"line_number":526,"context_line":"            # to process one object shouldn\u0027t impact the ability to process"},{"line_number":527,"context_line":"            # others."}],"source_content_type":"text/x-python","patch_set":1,"id":"9f560f44_7220e7f8","side":"PARENT","line":524,"in_reply_to":"9f560f44_59ba36e1","updated":"2020-08-12 20:44:25.000000000","message":"By all means! Part of why I wanted to do this was to see how it could inform API design/development on the parent patch.","commit_id":"97d22ac51c32b275f80ea1fc371de33026615837"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"1595e794478af8050e3fb8201b6179e8963a56e1","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        except (Exception, Timeout):"},{"line_number":527,"context_line":"            self.logger.exception("},{"line_number":528,"context_line":"                \u0027Error in see_object(%s)\u0027,"},{"line_number":529,"context_line":"                \u0027, \u0027.join(\u0027%s\u003d%r\u0027 % (k, v) for k, v in kwargs.items()))"},{"line_number":530,"context_line":"            # Do *not* flag watcher as being in an error state; a failure"},{"line_number":531,"context_line":"            # to process one object shouldn\u0027t impact the ability to process"},{"line_number":532,"context_line":"            # others."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f65232a_f4b3064c","line":529,"updated":"2020-10-27 18:57:13.000000000","message":"This makes more sense with https://review.opendev.org/759929 so you know where the diskfile\u0027s looking.","commit_id":"3416209800adb20cd9016d826d5d0b61f96e8aa9"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"f786c1e5b82de96da48e9f70ffd5a87a8ff15309","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        except (Exception, Timeout):"},{"line_number":527,"context_line":"            self.logger.exception("},{"line_number":528,"context_line":"                \u0027Error in see_object(%s)\u0027,"},{"line_number":529,"context_line":"                \u0027, \u0027.join(\u0027%s\u003d%r\u0027 % (k, v) for k, v in kwargs.items()))"},{"line_number":530,"context_line":"            # Do *not* flag watcher as being in an error state; a failure"},{"line_number":531,"context_line":"            # to process one object shouldn\u0027t impact the ability to process"},{"line_number":532,"context_line":"            # others."}],"source_content_type":"text/x-python","patch_set":2,"id":"1f621f24_f58d0b7c","line":529,"in_reply_to":"3f65232a_151dd9bc","updated":"2020-10-28 17:22:53.000000000","message":"I mean, we already had that anyway in the parent patch. But yeah, it gets pretty noisy if you\u0027ve got encryption turned on (say).","commit_id":"3416209800adb20cd9016d826d5d0b61f96e8aa9"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"dd0380db2f3ca1f9ddb8bddfe460ef360ca87aed","unresolved":false,"context_lines":[{"line_number":526,"context_line":"        except (Exception, Timeout):"},{"line_number":527,"context_line":"            self.logger.exception("},{"line_number":528,"context_line":"                \u0027Error in see_object(%s)\u0027,"},{"line_number":529,"context_line":"                \u0027, \u0027.join(\u0027%s\u003d%r\u0027 % (k, v) for k, v in kwargs.items()))"},{"line_number":530,"context_line":"            # Do *not* flag watcher as being in an error state; a failure"},{"line_number":531,"context_line":"            # to process one object shouldn\u0027t impact the ability to process"},{"line_number":532,"context_line":"            # others."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f65232a_151dd9bc","line":529,"in_reply_to":"3f65232a_f4b3064c","updated":"2020-10-28 04:26:04.000000000","message":"So, it\u0027s going to spew the meta dictionary as %r. Not sure I like it. But I do like a uniform display of all kwargs. Decisions!","commit_id":"3416209800adb20cd9016d826d5d0b61f96e8aa9"}],"swift/obj/watchers/ec_data.py":[{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"7a44a71f79e1927e9e765ee857db43954cd96073","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            with open(df._data_file, \u0027rb\u0027) as fp:"},{"line_number":93,"context_line":"                header \u003d fp.read(80)"},{"line_number":94,"context_line":"        except (OSError, IOError) as err:"},{"line_number":95,"context_line":"            self.errors[\u0027cannot_read\u0027] +\u003d 1"},{"line_number":96,"context_line":"            raise df._quarantine("}],"source_content_type":"text/x-python","patch_set":3,"id":"1f621f24_7632f311","line":93,"updated":"2020-11-12 00:51:56.000000000","message":"Needs a with\n\n closing(fp):","commit_id":"ab163868b2ed03dc47a2e44315a99d2e743c5ab6"},{"author":{"_account_id":597,"name":"Pete Zaitcev","email":"zaitcev@kotori.zaitcev.us","username":"zaitcev"},"change_message_id":"a56c6db65c7865057e96a5e9884b972489d1887b","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            with open(df._data_file, \u0027rb\u0027) as fp:"},{"line_number":93,"context_line":"                header \u003d fp.read(80)"},{"line_number":94,"context_line":"        except (OSError, IOError) as err:"},{"line_number":95,"context_line":"            self.errors[\u0027cannot_read\u0027] +\u003d 1"},{"line_number":96,"context_line":"            raise df._quarantine("}],"source_content_type":"text/x-python","patch_set":3,"id":"82ff21e7_6c919e75","line":93,"in_reply_to":"1f621f24_7632f311","updated":"2020-12-15 22:59:05.000000000","message":"\u003e Needs a with\n\u003e \n\u003e  closing(fp):\n\nI do not understand why closing(fp) is needed. \"with open as fp:\" should be just as good. The closing() is applicable if you get something passed, but df is not open at see_object().","commit_id":"ab163868b2ed03dc47a2e44315a99d2e743c5ab6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"9487aedf30dcf36d8944345cac636de3ada5c4e7","unresolved":false,"context_lines":[{"line_number":90,"context_line":""},{"line_number":91,"context_line":"        try:"},{"line_number":92,"context_line":"            with open(df._data_file, \u0027rb\u0027) as fp:"},{"line_number":93,"context_line":"                header \u003d fp.read(80)"},{"line_number":94,"context_line":"        except (OSError, IOError) as err:"},{"line_number":95,"context_line":"            self.errors[\u0027cannot_read\u0027] +\u003d 1"},{"line_number":96,"context_line":"            raise df._quarantine("}],"source_content_type":"text/x-python","patch_set":3,"id":"b4a80244_5ea12d82","line":93,"in_reply_to":"1f621f24_7632f311","updated":"2020-12-16 00:30:26.000000000","message":"Yeah, I was being dumb; open() gives us that for free.","commit_id":"ab163868b2ed03dc47a2e44315a99d2e743c5ab6"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"59a3e4736e4a7924770f44a82d46d6f42282b3cd","unresolved":true,"context_lines":[{"line_number":113,"context_line":"        self.versions[unpack_version(version)] +\u003d 1"},{"line_number":114,"context_line":"        scheme_stats \u003d self.schemes["},{"line_number":115,"context_line":"            object_metadata[\u0027X-Object-Sysmeta-Ec-Scheme\u0027]]"},{"line_number":116,"context_line":"        scheme_stats[\u0027archives\u0027] +\u003d 1"},{"line_number":117,"context_line":"        scheme_stats[\u0027bytes\u0027] +\u003d content_length"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if crc \u003d\u003d 0:"},{"line_number":120,"context_line":"            self.crcs[\u0027none\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"709adb5e_f39c60af","line":117,"range":{"start_line":116,"start_character":8,"end_line":117,"end_character":47},"updated":"2020-12-16 01:09:57.000000000","message":"We could probably skip collecting these stats here if we\u0027re thinking https://review.opendev.org/c/openstack/swift/+/766640 seems reasonable.","commit_id":"9a37f9cc9afda480a031ae1dfe7cbd72693de9a6"}]}
