)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"014f642a5d356a405e51844e64ee01ce5b3020ea","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"relinker: Warn on unmounted disks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"...rather than raising EPERM because we can\u0027t create the status file."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Icb0b2282113dc0bc1cfac711470027ea31e0b022"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"64f49db6_b4f71454","line":9,"updated":"2021-02-10 14:18:49.000000000","message":"this statement doesn\u0027t seem to relate to the patch - is it referring to an alternative solution?","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c6bc60f7ebd0a09ebfe30064c80f049c5ab61c69","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"relinker: Warn on unmounted disks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"...rather than raising EPERM because we can\u0027t create the status file."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Icb0b2282113dc0bc1cfac711470027ea31e0b022"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"8da9cbfa_28082606","line":9,"in_reply_to":"64f49db6_b4f71454","updated":"2021-02-10 22:56:54.000000000","message":"No, this is what will (or, should) happen today on master. When the disk is unmounted and the mount point is owned by root, the relinker will try to create the state file and hit a permissions error.\n\nOh, also, this should have a\n\n Closes-Bug: 1910470","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"relinker: Warn on unmounted disks"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"...rather than raising EPERM because we can\u0027t create the status file."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: Icb0b2282113dc0bc1cfac711470027ea31e0b022"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"f73272b3_321c8f8a","line":9,"in_reply_to":"8da9cbfa_28082606","updated":"2021-02-11 15:03:09.000000000","message":"got it, switching the order of mount check and pre_hook fixes the EPERM. thanks","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"}],"swift/cli/relinker.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7a800d0876af84394c2e07c5c39e4585ff528a1f","unresolved":true,"context_lines":[{"line_number":217,"context_line":"    if errors \u003e 0 or err_track_logger.errors \u003e 0:"},{"line_number":218,"context_line":"        return 1"},{"line_number":219,"context_line":"    if err_track_logger.warnings \u003e 0:"},{"line_number":220,"context_line":"        return 2"},{"line_number":221,"context_line":"    return 0"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"292be663_94eb9896","line":220,"updated":"2021-02-01 05:32:19.000000000","message":"So what\u0027s the deal with the return codes? 1 is error and 2 is warning? or is 2 (on line 215) mean no policy found?\n\nJusr curius, as we done seem to mention it.","commit_id":"27fee63c9a36f633c5d54baab51fadb7627d0266"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"31788055fc3afe544bd0f46586ac58c4e91061fa","unresolved":true,"context_lines":[{"line_number":217,"context_line":"    if errors \u003e 0 or err_track_logger.errors \u003e 0:"},{"line_number":218,"context_line":"        return 1"},{"line_number":219,"context_line":"    if err_track_logger.warnings \u003e 0:"},{"line_number":220,"context_line":"        return 2"},{"line_number":221,"context_line":"    return 0"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"197f84f5_9decfde3","line":220,"in_reply_to":"292be663_94eb9896","updated":"2021-02-01 16:55:44.000000000","message":"I was thinking it was a simple error/warning indicator, comparable to what swift-ring-builder does (even if the meanings are reversed 😕). Maybe it\u0027d be good to have a third exit code, though -- not finding any applicable policies *does* seem like a different class of problem from finding an unmounted disk. So maybe those meanings aren\u0027t as reversed as I first thought...\n\n🤣 Somewhat amusingly, the ambiguity is all my fault: https://review.opendev.org/c/openstack/swift/+/432143/\n\nSo, what do we *want* return codes to mean? I can bring it up at the next meeting.","commit_id":"27fee63c9a36f633c5d54baab51fadb7627d0266"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"014f642a5d356a405e51844e64ee01ce5b3020ea","unresolved":true,"context_lines":[{"line_number":37,"context_line":"STEP_CLEANUP \u003d \u0027cleanup\u0027"},{"line_number":38,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":39,"context_line":"EXIT_NO_APPLICABLE_POLICY \u003d 2"},{"line_number":40,"context_line":"EXIT_ERROR \u003d 1"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def non_negative_float(value):"}],"source_content_type":"text/x-python","patch_set":3,"id":"c8c7bace_2c0d8640","line":40,"updated":"2021-02-10 14:18:49.000000000","message":"+1 for defining the exit codes","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c6bc60f7ebd0a09ebfe30064c80f049c5ab61c69","unresolved":false,"context_lines":[{"line_number":37,"context_line":"STEP_CLEANUP \u003d \u0027cleanup\u0027"},{"line_number":38,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":39,"context_line":"EXIT_NO_APPLICABLE_POLICY \u003d 2"},{"line_number":40,"context_line":"EXIT_ERROR \u003d 1"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def non_negative_float(value):"}],"source_content_type":"text/x-python","patch_set":3,"id":"c1030857_fbc2eea5","line":40,"in_reply_to":"c8c7bace_2c0d8640","updated":"2021-02-10 22:56:54.000000000","message":"Ack","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"014f642a5d356a405e51844e64ee01ce5b3020ea","unresolved":true,"context_lines":[{"line_number":233,"context_line":"    if errors \u003e 0 or err_track_logger.errors \u003e 0 or \\"},{"line_number":234,"context_line":"            err_track_logger.warnings \u003e 0:"},{"line_number":235,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":236,"context_line":"        # but we want to treat them as errors"},{"line_number":237,"context_line":"        return EXIT_ERROR"},{"line_number":238,"context_line":"    return EXIT_SUCCESS"},{"line_number":239,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"3edf6285_969c921d","line":236,"updated":"2021-02-10 14:18:49.000000000","message":"this seems very brittle - IIUC any other warning added to audit_location_generator will trip this and get elevated to an error? And there is another possible warning in audit_location_generator from listdir (which maybe we also want to be treated as an error).\n\nAt first glance it doesn\u0027t seem too hard to refactor audit_location_generator to break out a per_device_audit_location_generator and then do the mount checking up-front in the relinker?\n\nOr, collect the locations\u0027 devices in a set and compare with the inout devices.","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":236,"context_line":"    if listdir_errors:"},{"line_number":237,"context_line":"        logger.warning(\u0027There were %d errors listing partition directories\u0027,"},{"line_number":238,"context_line":"                       listdir_errors)"},{"line_number":239,"context_line":"    if err_counter:"},{"line_number":240,"context_line":"        logger.warning("},{"line_number":241,"context_line":"            \u0027There were unexpected errors while enumerating disk files: %r\u0027,"},{"line_number":242,"context_line":"            err_counter)"}],"source_content_type":"text/x-python","patch_set":4,"id":"bbd62ffa_f99b873e","line":239,"updated":"2021-02-11 15:03:09.000000000","message":"nice forward thinking","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":false,"context_lines":[{"line_number":236,"context_line":"    if listdir_errors:"},{"line_number":237,"context_line":"        logger.warning(\u0027There were %d errors listing partition directories\u0027,"},{"line_number":238,"context_line":"                       listdir_errors)"},{"line_number":239,"context_line":"    if err_counter:"},{"line_number":240,"context_line":"        logger.warning("},{"line_number":241,"context_line":"            \u0027There were unexpected errors while enumerating disk files: %r\u0027,"},{"line_number":242,"context_line":"            err_counter)"}],"source_content_type":"text/x-python","patch_set":4,"id":"5084a61c_94690032","line":239,"in_reply_to":"bbd62ffa_f99b873e","updated":"2021-02-11 18:52:03.000000000","message":"Ack","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    logger.info(\u0027Relinked %d diskfiles (%d errors)\u0027, relinked,"},{"line_number":245,"context_line":"                errors + listdir_errors)"},{"line_number":246,"context_line":"    if errors + listdir_errors + unmounted \u003e 0:"},{"line_number":247,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":248,"context_line":"        # but we want to treat them as errors"},{"line_number":249,"context_line":"        return EXIT_ERROR"}],"source_content_type":"text/x-python","patch_set":4,"id":"e8c6c502_abf8935b","line":246,"updated":"2021-02-11 15:03:09.000000000","message":"might want to include unexpected errors here","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":true,"context_lines":[{"line_number":243,"context_line":""},{"line_number":244,"context_line":"    logger.info(\u0027Relinked %d diskfiles (%d errors)\u0027, relinked,"},{"line_number":245,"context_line":"                errors + listdir_errors)"},{"line_number":246,"context_line":"    if errors + listdir_errors + unmounted \u003e 0:"},{"line_number":247,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":248,"context_line":"        # but we want to treat them as errors"},{"line_number":249,"context_line":"        return EXIT_ERROR"}],"source_content_type":"text/x-python","patch_set":4,"id":"1a8fd653_2d5f19bc","line":246,"in_reply_to":"e8c6c502_abf8935b","updated":"2021-02-11 18:52:03.000000000","message":"I\u0027m not entirely sure -- I\u0027m still on the fence about whether listdir_errors ought to be here. I have *no idea* what else we might add in the future.","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":349,"context_line":"                logger.warning(\u0027Error cleaning up %s: %r\u0027, fname, exc)"},{"line_number":350,"context_line":"                errors +\u003d 1"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    if not run:"},{"line_number":353,"context_line":"        logger.warning(\"No policy found to increase the partition power.\")"},{"line_number":354,"context_line":"        return EXIT_NO_APPLICABLE_POLICY"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    unmounted \u003d err_counter.pop(\u0027unmounted\u0027, 0)"},{"line_number":357,"context_line":"    if unmounted:"},{"line_number":358,"context_line":"        logger.warning(\u0027%d disks were unmounted\u0027, unmounted)"},{"line_number":359,"context_line":"    listdir_errors \u003d err_counter.pop(\u0027listdir_error\u0027, 0)"},{"line_number":360,"context_line":"    if listdir_errors:"},{"line_number":361,"context_line":"        logger.warning(\u0027There were %d errors listing partition directories\u0027,"},{"line_number":362,"context_line":"                       listdir_errors)"},{"line_number":363,"context_line":"    if err_counter:"},{"line_number":364,"context_line":"        logger.warning("},{"line_number":365,"context_line":"            \u0027There were unexpected errors while enumerating disk files: %r\u0027,"},{"line_number":366,"context_line":"            err_counter)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    logger.info(\u0027Cleaned up %d diskfiles (%d errors)\u0027, cleaned_up,"},{"line_number":369,"context_line":"                errors + listdir_errors)"},{"line_number":370,"context_line":"    if errors + listdir_errors + unmounted \u003e 0:"},{"line_number":371,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":372,"context_line":"        # but we want to treat them as errors"},{"line_number":373,"context_line":"        return EXIT_ERROR"},{"line_number":374,"context_line":"    return EXIT_SUCCESS"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"def main(args):"},{"line_number":378,"context_line":"    parser \u003d argparse.ArgumentParser("}],"source_content_type":"text/x-python","patch_set":4,"id":"e8095814_20a16cac","line":375,"range":{"start_line":352,"start_character":0,"end_line":375,"end_character":0},"updated":"2021-02-11 15:03:09.000000000","message":"checking \u0026 reporting code could be shared with relink","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                logger.warning(\u0027Error cleaning up %s: %r\u0027, fname, exc)"},{"line_number":350,"context_line":"                errors +\u003d 1"},{"line_number":351,"context_line":""},{"line_number":352,"context_line":"    if not run:"},{"line_number":353,"context_line":"        logger.warning(\"No policy found to increase the partition power.\")"},{"line_number":354,"context_line":"        return EXIT_NO_APPLICABLE_POLICY"},{"line_number":355,"context_line":""},{"line_number":356,"context_line":"    unmounted \u003d err_counter.pop(\u0027unmounted\u0027, 0)"},{"line_number":357,"context_line":"    if unmounted:"},{"line_number":358,"context_line":"        logger.warning(\u0027%d disks were unmounted\u0027, unmounted)"},{"line_number":359,"context_line":"    listdir_errors \u003d err_counter.pop(\u0027listdir_error\u0027, 0)"},{"line_number":360,"context_line":"    if listdir_errors:"},{"line_number":361,"context_line":"        logger.warning(\u0027There were %d errors listing partition directories\u0027,"},{"line_number":362,"context_line":"                       listdir_errors)"},{"line_number":363,"context_line":"    if err_counter:"},{"line_number":364,"context_line":"        logger.warning("},{"line_number":365,"context_line":"            \u0027There were unexpected errors while enumerating disk files: %r\u0027,"},{"line_number":366,"context_line":"            err_counter)"},{"line_number":367,"context_line":""},{"line_number":368,"context_line":"    logger.info(\u0027Cleaned up %d diskfiles (%d errors)\u0027, cleaned_up,"},{"line_number":369,"context_line":"                errors + listdir_errors)"},{"line_number":370,"context_line":"    if errors + listdir_errors + unmounted \u003e 0:"},{"line_number":371,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":372,"context_line":"        # but we want to treat them as errors"},{"line_number":373,"context_line":"        return EXIT_ERROR"},{"line_number":374,"context_line":"    return EXIT_SUCCESS"},{"line_number":375,"context_line":""},{"line_number":376,"context_line":""},{"line_number":377,"context_line":"def main(args):"},{"line_number":378,"context_line":"    parser \u003d argparse.ArgumentParser("}],"source_content_type":"text/x-python","patch_set":4,"id":"6fa6be9a_3bca5e66","line":375,"range":{"start_line":352,"start_character":0,"end_line":375,"end_character":0},"in_reply_to":"e8095814_20a16cac","updated":"2021-02-11 18:52:03.000000000","message":"Done","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"3967702baf2257d0e4ba56c58baad30609054beb","unresolved":true,"context_lines":[{"line_number":36,"context_line":"STEP_RELINK \u003d \u0027relink\u0027"},{"line_number":37,"context_line":"STEP_CLEANUP \u003d \u0027cleanup\u0027"},{"line_number":38,"context_line":"EXIT_SUCCESS \u003d 0"},{"line_number":39,"context_line":"EXIT_NO_APPLICABLE_POLICY \u003d 2"},{"line_number":40,"context_line":"EXIT_ERROR \u003d 1"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"6b29161c_d903503c","line":39,"range":{"start_line":39,"start_character":0,"end_line":39,"end_character":29},"updated":"2021-02-12 11:39:48.000000000","message":"as noticed on https://review.opendev.org/c/openstack/swift/+/775366/1 exit code 2 collides with argparse failing to parse args, so we might want to change this. But I\u0027m happy for this patch to proceed since this is not a new issue.","commit_id":"a90515bbbe2db6914229e03da8937e35114e0adb"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f6b4e23dc20a54bde1a327f76a6a7696094d6b4","unresolved":true,"context_lines":[{"line_number":183,"context_line":"            error_counter)"},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"    logger.info(\u0027%d diskfiles %s (%d errors)\u0027, processed, action,"},{"line_number":186,"context_line":"                action_errors + listdir_errors)"},{"line_number":187,"context_line":"    if action_errors + listdir_errors + unmounted \u003e 0:"},{"line_number":188,"context_line":"        # NB: audit_location_generator logs unmounted disks as warnings,"},{"line_number":189,"context_line":"        # but we want to treat them as errors"}],"source_content_type":"text/x-python","patch_set":6,"id":"4fe1111a_725998ac","line":186,"range":{"start_line":186,"start_character":16,"end_line":186,"end_character":46},"updated":"2021-02-12 09:55:21.000000000","message":"just want to check: unmounted is not included here?","commit_id":"a90515bbbe2db6914229e03da8937e35114e0adb"}],"swift/common/utils.py":[{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"7a800d0876af84394c2e07c5c39e4585ff528a1f","unresolved":true,"context_lines":[{"line_number":2079,"context_line":"    \"\"\""},{"line_number":2080,"context_line":"    Tracks calls to warning, error, and exception."},{"line_number":2081,"context_line":"    \"\"\""},{"line_number":2082,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":2083,"context_line":"        self.exceptions \u003d self.errors \u003d self.warnings \u003d 0"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"    def warning(self, *a, **kw):"}],"source_content_type":"text/x-python","patch_set":1,"id":"6db03919_25469e34","line":2082,"updated":"2021-02-01 05:32:19.000000000","message":"I needed to add:\n\n  super(ErrorTrackingLoggerAdapter, self).__init__(*a, **kw)\n\nor a:\n\n  SwiftLoggerAdapter.__init__(self, *a, **kw)\n\nAs extra is never defined down in one of the logging ancestors.\n\n  Traceback (most recent call last):\n  File \"/usr/bin/swift-object-relinker\", line 7, in \u003cmodule\u003e\n    exec(compile(f.read(), __file__, \u0027exec\u0027))\n  File \"/home/vagrant/swift/bin/swift-object-relinker\", line 43, in \u003cmodule\u003e\n    sys.exit(main(args))\n  File \"/home/vagrant/swift/swift/cli/relinker.py\", line 342, in main\n    device\u003dargs.device)\n  File \"/home/vagrant/swift/swift/cli/relinker.py\", line 203, in relink\n    for fname, _, _ in locations:\n  File \"/home/vagrant/swift/swift/common/utils.py\", line 3286, in audit_location_generator\n    _(\u0027Skipping %s as it is not mounted\u0027), device)\n  File \"/home/vagrant/swift/swift/common/utils.py\", line 2087, in warning\n    return super(ErrorTrackingLoggerAdapter, self).warning(*a, **kw)\n  File \"/usr/lib64/python2.7/logging/__init__.py\", line 1437, in warning\n    msg, kwargs \u003d self.process(msg, kwargs)\n  File \"/usr/lib64/python2.7/logging/__init__.py\", line 1413, in process\n    kwargs[\"extra\"] \u003d self.extra\n  AttributeError: \u0027ErrorTrackingLoggerAdapter\u0027 object has no attribute \u0027extra\u0027\n\nThen this looks good:\n\n  $ swift-object-relinker relink --devices /srv/2/node/\n  Relinking files for policy gold under /srv/2/node/\n  Skipping sdb2 as it is not mounted\n  Relinked 0 diskfiles (0 errors)\n  $ $ echo $?\n  2","commit_id":"27fee63c9a36f633c5d54baab51fadb7627d0266"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"31788055fc3afe544bd0f46586ac58c4e91061fa","unresolved":true,"context_lines":[{"line_number":2079,"context_line":"    \"\"\""},{"line_number":2080,"context_line":"    Tracks calls to warning, error, and exception."},{"line_number":2081,"context_line":"    \"\"\""},{"line_number":2082,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":2083,"context_line":"        self.exceptions \u003d self.errors \u003d self.warnings \u003d 0"},{"line_number":2084,"context_line":""},{"line_number":2085,"context_line":"    def warning(self, *a, **kw):"}],"source_content_type":"text/x-python","patch_set":1,"id":"b82def26_7dbca4fb","line":2082,"in_reply_to":"6db03919_25469e34","updated":"2021-02-01 16:55:44.000000000","message":"Sorry -- I\u0027d spotted that when I was testing things locally, but amended the wrong patch in the chain! #willfix","commit_id":"27fee63c9a36f633c5d54baab51fadb7627d0266"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"014f642a5d356a405e51844e64ee01ce5b3020ea","unresolved":true,"context_lines":[{"line_number":2075,"context_line":"        return (msg, kwargs)"},{"line_number":2076,"context_line":""},{"line_number":2077,"context_line":""},{"line_number":2078,"context_line":"class ErrorTrackingLoggerAdapter(SwiftLoggerAdapter):"},{"line_number":2079,"context_line":"    \"\"\""},{"line_number":2080,"context_line":"    Tracks calls to warning, error, and exception."},{"line_number":2081,"context_line":"    \"\"\""}],"source_content_type":"text/x-python","patch_set":3,"id":"d19b96ce_783a3b6e","line":2078,"updated":"2021-02-10 14:18:49.000000000","message":"I don\u0027t think this *needs* to extend SwiftLoggerAdapter (vs logging.LoggerAdapter), but I guess someone may want both extensions at some point. But then what about extending PrefixLoggerAdapter?","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"014f642a5d356a405e51844e64ee01ce5b3020ea","unresolved":true,"context_lines":[{"line_number":2081,"context_line":"    \"\"\""},{"line_number":2082,"context_line":"    def __init__(self, *a, **kw):"},{"line_number":2083,"context_line":"        self.exceptions \u003d self.errors \u003d self.warnings \u003d 0"},{"line_number":2084,"context_line":"        return super(ErrorTrackingLoggerAdapter, self).__init__(*a, **kw)"},{"line_number":2085,"context_line":""},{"line_number":2086,"context_line":"    def warning(self, *a, **kw):"},{"line_number":2087,"context_line":"        self.warnings +\u003d 1"}],"source_content_type":"text/x-python","patch_set":3,"id":"13ce2c2c_ee4c7fd4","line":2084,"range":{"start_line":2084,"start_character":8,"end_line":2084,"end_character":15},"updated":"2021-02-10 14:18:49.000000000","message":"return ineffective here","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"c6bc60f7ebd0a09ebfe30064c80f049c5ab61c69","unresolved":true,"context_lines":[{"line_number":3236,"context_line":"                             hook_pre_device\u003dNone, hook_post_device\u003dNone,"},{"line_number":3237,"context_line":"                             hook_pre_partition\u003dNone, hook_post_partition\u003dNone,"},{"line_number":3238,"context_line":"                             hook_pre_suffix\u003dNone, hook_post_suffix\u003dNone,"},{"line_number":3239,"context_line":"                             hook_pre_hash\u003dNone, hook_post_hash\u003dNone):"},{"line_number":3240,"context_line":"    \"\"\""},{"line_number":3241,"context_line":"    Given a devices path and a data directory, yield (path, device,"},{"line_number":3242,"context_line":"    partition) for all files in that directory"}],"source_content_type":"text/x-python","patch_set":3,"id":"510ab8a0_a21a54e4","line":3239,"updated":"2021-02-10 22:56:54.000000000","message":"Maybe we can get something similar by adding a mutable arg here instead of needing to piggy-back off logging. I\u0027ll try it out.","commit_id":"ae721ce5c774d840183a9ca4f9166d5bb105d666"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4c09394b7ef49d40e56caee572fcb8c6db3de425","unresolved":true,"context_lines":[{"line_number":3254,"context_line":"    :hook_pre_suffix: a callable taking suff_path as parameter"},{"line_number":3255,"context_line":"    :hook_post_suffix: a callable taking suff_path as parameter"},{"line_number":3256,"context_line":"    :hook_pre_hash: a callable taking hash_path as parameter"},{"line_number":3257,"context_line":"    :hook_post_hash: a callable taking hash_path as parameter"},{"line_number":3258,"context_line":"    \"\"\""},{"line_number":3259,"context_line":"    device_dir \u003d listdir(devices)"},{"line_number":3260,"context_line":"    # randomize devices in case of process restart before sweep completed"}],"source_content_type":"text/x-python","patch_set":4,"id":"3d7d13d7_f538d8b5","line":3257,"updated":"2021-02-11 05:44:04.000000000","message":"no error_counter here. As we may want to let people know it need sto be a dict.","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":false,"context_lines":[{"line_number":3254,"context_line":"    :hook_pre_suffix: a callable taking suff_path as parameter"},{"line_number":3255,"context_line":"    :hook_post_suffix: a callable taking suff_path as parameter"},{"line_number":3256,"context_line":"    :hook_pre_hash: a callable taking hash_path as parameter"},{"line_number":3257,"context_line":"    :hook_post_hash: a callable taking hash_path as parameter"},{"line_number":3258,"context_line":"    \"\"\""},{"line_number":3259,"context_line":"    device_dir \u003d listdir(devices)"},{"line_number":3260,"context_line":"    # randomize devices in case of process restart before sweep completed"}],"source_content_type":"text/x-python","patch_set":4,"id":"cacfa9b3_6d74759e","line":3257,"in_reply_to":"3d7d13d7_f538d8b5","updated":"2021-02-11 18:52:03.000000000","message":"Done","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":3270,"context_line":"                logger.warning("},{"line_number":3271,"context_line":"                    _(\u0027Skipping %s as it is not mounted\u0027), device)"},{"line_number":3272,"context_line":"            continue"},{"line_number":3273,"context_line":"        if hook_pre_device:"},{"line_number":3274,"context_line":"            hook_pre_device(os.path.join(devices, device))"},{"line_number":3275,"context_line":"        datadir_path \u003d os.path.join(devices, device, datadir)"},{"line_number":3276,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"3fec860a_13517899","line":3273,"updated":"2021-02-11 15:03:09.000000000","message":"ok. only the relinker uses the hooks so safe to switch the order w.r.t. mount_check","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":false,"context_lines":[{"line_number":3270,"context_line":"                logger.warning("},{"line_number":3271,"context_line":"                    _(\u0027Skipping %s as it is not mounted\u0027), device)"},{"line_number":3272,"context_line":"            continue"},{"line_number":3273,"context_line":"        if hook_pre_device:"},{"line_number":3274,"context_line":"            hook_pre_device(os.path.join(devices, device))"},{"line_number":3275,"context_line":"        datadir_path \u003d os.path.join(devices, device, datadir)"},{"line_number":3276,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":4,"id":"78c3f82d_27a8d0ed","line":3273,"in_reply_to":"3fec860a_13517899","updated":"2021-02-11 18:52:03.000000000","message":"Ack","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"a05f99aa8923dfb7a4ac7165c35d6c786567b72e","unresolved":true,"context_lines":[{"line_number":3276,"context_line":"        try:"},{"line_number":3277,"context_line":"            partitions \u003d listdir(datadir_path)"},{"line_number":3278,"context_line":"        except OSError as e:"},{"line_number":3279,"context_line":"            if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":3280,"context_line":"                # Not all disks participate in all rings; not even worth"},{"line_number":3281,"context_line":"                # warning about it"},{"line_number":3282,"context_line":"                continue"},{"line_number":3283,"context_line":"            if error_counter is not None:"},{"line_number":3284,"context_line":"                error_counter.setdefault(\u0027listdir_error\u0027, 0)"},{"line_number":3285,"context_line":"                error_counter[\u0027listdir_error\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"5874b4bc_fa28c813","line":3282,"range":{"start_line":3279,"start_character":12,"end_line":3282,"end_character":24},"updated":"2021-02-11 15:03:09.000000000","message":"not needed: listdir (as opposed to os.listdir) won\u0027t raise ENOENT","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":15343,"name":"Tim Burke","email":"tburke@nvidia.com","username":"tburke"},"change_message_id":"546468f6cd42f74e5e73c7d101f5424ea474f614","unresolved":false,"context_lines":[{"line_number":3276,"context_line":"        try:"},{"line_number":3277,"context_line":"            partitions \u003d listdir(datadir_path)"},{"line_number":3278,"context_line":"        except OSError as e:"},{"line_number":3279,"context_line":"            if e.errno \u003d\u003d errno.ENOENT:"},{"line_number":3280,"context_line":"                # Not all disks participate in all rings; not even worth"},{"line_number":3281,"context_line":"                # warning about it"},{"line_number":3282,"context_line":"                continue"},{"line_number":3283,"context_line":"            if error_counter is not None:"},{"line_number":3284,"context_line":"                error_counter.setdefault(\u0027listdir_error\u0027, 0)"},{"line_number":3285,"context_line":"                error_counter[\u0027listdir_error\u0027] +\u003d 1"}],"source_content_type":"text/x-python","patch_set":4,"id":"e0dea244_f42315b4","line":3282,"range":{"start_line":3279,"start_character":12,"end_line":3282,"end_character":24},"in_reply_to":"5874b4bc_fa28c813","updated":"2021-02-11 18:52:03.000000000","message":"Done","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7233,"name":"Matthew Oliver","email":"matt@oliver.net.au","username":"mattoliverau"},"change_message_id":"4c09394b7ef49d40e56caee572fcb8c6db3de425","unresolved":true,"context_lines":[{"line_number":3282,"context_line":"                continue"},{"line_number":3283,"context_line":"            if error_counter is not None:"},{"line_number":3284,"context_line":"                error_counter.setdefault(\u0027listdir_error\u0027, 0)"},{"line_number":3285,"context_line":"                error_counter[\u0027listdir_error\u0027] +\u003d 1"},{"line_number":3286,"context_line":"            if logger:"},{"line_number":3287,"context_line":"                logger.warning(_(\u0027Skipping %(datadir)s because %(err)s\u0027),"},{"line_number":3288,"context_line":"                               {\u0027datadir\u0027: datadir_path, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":4,"id":"5ff40b44_338a4d39","line":3285,"updated":"2021-02-11 05:44:04.000000000","message":"unmounted (makes sense) but listdir_error seems to be a little long. I mean it\u0027s in an error counter so obviously whatever key is related to an error.\n\nWe could just name it from the method error, ie. error_counter[\u0027ismount\u0027] +\u003d 1 and error_counter[\u0027listdir\u0027] +\u003d 1?\n\nI mean I really like unmount as a name, but can\u0027t really have unlistdir :P","commit_id":"16a45186c1a43d862606fbf7fd1471b8762e327f"},{"author":{"_account_id":7847,"name":"Alistair Coles","email":"alistairncoles@gmail.com","username":"acoles"},"change_message_id":"4f6b4e23dc20a54bde1a327f76a6a7696094d6b4","unresolved":true,"context_lines":[{"line_number":3281,"context_line":"            # NB: listdir ignores non-existent datadir_path"},{"line_number":3282,"context_line":"            if error_counter is not None:"},{"line_number":3283,"context_line":"                error_counter.setdefault(\u0027unlistable_partitions\u0027, 0)"},{"line_number":3284,"context_line":"                error_counter[\u0027unlistable_partitions\u0027] +\u003d 1"},{"line_number":3285,"context_line":"            if logger:"},{"line_number":3286,"context_line":"                logger.warning(_(\u0027Skipping %(datadir)s because %(err)s\u0027),"},{"line_number":3287,"context_line":"                               {\u0027datadir\u0027: datadir_path, \u0027err\u0027: e})"}],"source_content_type":"text/x-python","patch_set":6,"id":"70f17519_faa4bb1a","line":3284,"range":{"start_line":3284,"start_character":31,"end_line":3284,"end_character":52},"updated":"2021-02-12 09:55:21.000000000","message":"+1 it is what it says","commit_id":"a90515bbbe2db6914229e03da8937e35114e0adb"}]}
