)]}'
{"gate/post_test_hook.sh":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e1007d5e089452cc4602b2d15229487ef69b8b18","unresolved":false,"context_lines":[{"line_number":22,"context_line":"    $MANAGE db purge --all"},{"line_number":23,"context_line":"    RET\u003d$?"},{"line_number":24,"context_line":"    if [[ $RET -eq 0 ]]; then"},{"line_number":25,"context_line":"\techo Purge successful"},{"line_number":26,"context_line":"    else"},{"line_number":27,"context_line":"\techo Purge failed with result $RET"},{"line_number":28,"context_line":"\treturn $RET"}],"source_content_type":"text/x-sh","patch_set":2,"id":"ff6b8bd7_4a4a9f55","line":25,"updated":"2018-03-06 18:11:01.000000000","message":"tabs!","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"}],"nova/cmd/manage.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e1007d5e089452cc4602b2d15229487ef69b8b18","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sys"},{"line_number":30,"context_line":"import traceback"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from dateutil import parser as dateutil_parser"},{"line_number":33,"context_line":"import decorator"},{"line_number":34,"context_line":"import netaddr"},{"line_number":35,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_2aa08bf4","line":32,"updated":"2018-03-06 18:11:01.000000000","message":"Not sure about this; we have a pretty standard way of using oslo timeutils to parse isotime in CLIs for doing timestamp-based filtering, e.g.:\n\nhttps://github.com/openstack/python-novaclient/blob/5af4a8edd88187e0a21c665a6e91fcdcd8ced06c/novaclient/v2/shell.py#L4946","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f8fafece440c9b43497ceb589a01d2cfb9c904a1","unresolved":false,"context_lines":[{"line_number":29,"context_line":"import sys"},{"line_number":30,"context_line":"import traceback"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"from dateutil import parser as dateutil_parser"},{"line_number":33,"context_line":"import decorator"},{"line_number":34,"context_line":"import netaddr"},{"line_number":35,"context_line":"from oslo_config import cfg"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_eaa3734e","line":32,"in_reply_to":"ff6b8bd7_2aa08bf4","updated":"2018-03-06 18:16:32.000000000","message":"I don\u0027t want to parse isotime, I want dateutils\u0027 fuzzy parser specifically. This is already in g-r so I assume it\u0027s cool to use it.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"db32842d77cb3c1fe9978fd527f8fb796179926a","unresolved":false,"context_lines":[{"line_number":565,"context_line":"        else:"},{"line_number":566,"context_line":"            before_date \u003d None"},{"line_number":567,"context_line":""},{"line_number":568,"context_line":"        def status(msg):"},{"line_number":569,"context_line":"            print(msg)"},{"line_number":570,"context_line":""},{"line_number":571,"context_line":"        deleted \u003d sa_db.purge_shadow_tables(before_date, status_fn\u003dstatus)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff6b8bd7_a06cb708","line":568,"updated":"2018-03-06 21:44:10.000000000","message":"Similar to archive_deleted_rows and discover_hosts, a --verbose option could be nice here so the user opts into getting the details from the DB API code that\u0027s going to use this. Then your patch on top can also pass through the verbose flag from archive_deleted_rows which is a nice tie-in.","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e1007d5e089452cc4602b2d15229487ef69b8b18","unresolved":false,"context_lines":[{"line_number":5962,"context_line":"        if col is not None:"},{"line_number":5963,"context_line":"            delete \u003d table.delete().where(col \u003c before_date)"},{"line_number":5964,"context_line":"        else:"},{"line_number":5965,"context_line":"            delete \u003d table.delete()"},{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_6ad763ef","line":5965,"range":{"start_line":5965,"start_character":21,"end_line":5965,"end_character":35},"updated":"2018-03-06 18:11:01.000000000","message":"This looks a bit funny at first glance, like we\u0027re deleting the table, but we\u0027re not, that would be table.drop() I believe.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f8fafece440c9b43497ceb589a01d2cfb9c904a1","unresolved":false,"context_lines":[{"line_number":5962,"context_line":"        if col is not None:"},{"line_number":5963,"context_line":"            delete \u003d table.delete().where(col \u003c before_date)"},{"line_number":5964,"context_line":"        else:"},{"line_number":5965,"context_line":"            delete \u003d table.delete()"},{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_cab78f86","line":5965,"range":{"start_line":5965,"start_character":21,"end_line":5965,"end_character":35},"in_reply_to":"ff6b8bd7_6ad763ef","updated":"2018-03-06 18:16:32.000000000","message":"Yup. This is a DELETE sql statement.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e1007d5e089452cc4602b2d15229487ef69b8b18","unresolved":false,"context_lines":[{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"},{"line_number":5969,"context_line":"            LOG.info(\u0027Deleted %(rows)i rows from %(table)s based on \u0027"},{"line_number":5970,"context_line":"                     \u0027timestamp column %(col)s\u0027,"},{"line_number":5971,"context_line":"                     {\u0027rows\u0027: deleted.rowcount,"},{"line_number":5972,"context_line":"                      \u0027table\u0027: table.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_caff8f65","line":5969,"range":{"start_line":5969,"start_character":12,"end_line":5969,"end_character":20},"updated":"2018-03-06 18:11:01.000000000","message":"Is this getting dumped to the CLI output?\n\nIf not, wondering if we\u0027d want a --verbose option where a callback function is passed in to print stuff out, like the discover_hosts command.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"08a7301fa8bebae2029a7c49ef1c5f10735d7f88","unresolved":false,"context_lines":[{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"},{"line_number":5969,"context_line":"            LOG.info(\u0027Deleted %(rows)i rows from %(table)s based on \u0027"},{"line_number":5970,"context_line":"                     \u0027timestamp column %(col)s\u0027,"},{"line_number":5971,"context_line":"                     {\u0027rows\u0027: deleted.rowcount,"},{"line_number":5972,"context_line":"                      \u0027table\u0027: table.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_2092e7f7","line":5969,"range":{"start_line":5969,"start_character":12,"end_line":5969,"end_character":20},"in_reply_to":"ff6b8bd7_8512e857","updated":"2018-03-06 21:39:52.000000000","message":"I wasn\u0027t suggesting using print() in here, I meant to use the callback form you did in discover_hosts.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"bb76177217a0b0e34b4e24c0c4fd51f3672d431e","unresolved":false,"context_lines":[{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"},{"line_number":5969,"context_line":"            LOG.info(\u0027Deleted %(rows)i rows from %(table)s based on \u0027"},{"line_number":5970,"context_line":"                     \u0027timestamp column %(col)s\u0027,"},{"line_number":5971,"context_line":"                     {\u0027rows\u0027: deleted.rowcount,"},{"line_number":5972,"context_line":"                      \u0027table\u0027: table.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_8512e857","line":5969,"range":{"start_line":5969,"start_character":12,"end_line":5969,"end_character":20},"in_reply_to":"ff6b8bd7_8a2437c8","updated":"2018-03-06 18:22:35.000000000","message":"Well, it uses the callback function, which is different than print()ing from here. But sure, I\u0027ll do that.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"f8fafece440c9b43497ceb589a01d2cfb9c904a1","unresolved":false,"context_lines":[{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"},{"line_number":5969,"context_line":"            LOG.info(\u0027Deleted %(rows)i rows from %(table)s based on \u0027"},{"line_number":5970,"context_line":"                     \u0027timestamp column %(col)s\u0027,"},{"line_number":5971,"context_line":"                     {\u0027rows\u0027: deleted.rowcount,"},{"line_number":5972,"context_line":"                      \u0027table\u0027: table.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_ea7133e2","line":5969,"range":{"start_line":5969,"start_character":12,"end_line":5969,"end_character":20},"in_reply_to":"ff6b8bd7_caff8f65","updated":"2018-03-06 18:16:32.000000000","message":"I think it\u0027s there if configured. We get other logging information from nova-manage like when you run db sync, so I figured this was appropriate. Running print() from something deep in the tree like this seems wrong to me.","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"9efb931185294cd15e49e55e29c3bb153323573e","unresolved":false,"context_lines":[{"line_number":5966,"context_line":""},{"line_number":5967,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5968,"context_line":"        if deleted.rowcount \u003e 0:"},{"line_number":5969,"context_line":"            LOG.info(\u0027Deleted %(rows)i rows from %(table)s based on \u0027"},{"line_number":5970,"context_line":"                     \u0027timestamp column %(col)s\u0027,"},{"line_number":5971,"context_line":"                     {\u0027rows\u0027: deleted.rowcount,"},{"line_number":5972,"context_line":"                      \u0027table\u0027: table.name,"}],"source_content_type":"text/x-python","patch_set":2,"id":"ff6b8bd7_8a2437c8","line":5969,"range":{"start_line":5969,"start_character":12,"end_line":5969,"end_character":20},"in_reply_to":"ff6b8bd7_ea7133e2","updated":"2018-03-06 18:19:57.000000000","message":"\u003e Running print() from something deep in the tree like this seems wrong to me.\n\nExcept we do it for discover_hosts. How is that different?","commit_id":"cea8253b90b09e66d28c3b5aedc202563acfb1a4"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9c8e3517f45275126385dc483c6a13afc73c7d60","unresolved":false,"context_lines":[{"line_number":5923,"context_line":"def _purgeable_tables(metadata):"},{"line_number":5924,"context_line":"    return [t for t in metadata.sorted_tables"},{"line_number":5925,"context_line":"            if (t.name.startswith(_SHADOW_TABLE_PREFIX) and not"},{"line_number":5926,"context_line":"                t.name.endswith(\u0027migrate_version\u0027))]"},{"line_number":5927,"context_line":""},{"line_number":5928,"context_line":""},{"line_number":5929,"context_line":"def purge_shadow_tables(before_date, status_fn\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff6b8bd7_60121f5b","line":5926,"range":{"start_line":5926,"start_character":16,"end_line":5926,"end_character":49},"updated":"2018-03-06 21:06:49.000000000","message":"pretty sure we don\u0027t have a \"shadow_migrate_version\" table, but ok :)","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"10d07da676399b34da2ed6b0ebc683a84835f6a3","unresolved":false,"context_lines":[{"line_number":5923,"context_line":"def _purgeable_tables(metadata):"},{"line_number":5924,"context_line":"    return [t for t in metadata.sorted_tables"},{"line_number":5925,"context_line":"            if (t.name.startswith(_SHADOW_TABLE_PREFIX) and not"},{"line_number":5926,"context_line":"                t.name.endswith(\u0027migrate_version\u0027))]"},{"line_number":5927,"context_line":""},{"line_number":5928,"context_line":""},{"line_number":5929,"context_line":"def purge_shadow_tables(before_date, status_fn\u003dNone):"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_8a04497d","line":5926,"range":{"start_line":5926,"start_character":16,"end_line":5926,"end_character":49},"in_reply_to":"ff6b8bd7_60121f5b","updated":"2018-03-07 14:42:39.000000000","message":"Take this out and run the tests.. :)\n\nI think it\u0027s probably just because of our fixture and isn\u0027t present in reality, but alas.","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9c8e3517f45275126385dc483c6a13afc73c7d60","unresolved":false,"context_lines":[{"line_number":5962,"context_line":"                            \u0027table\u0027: table.name})"},{"line_number":5963,"context_line":"            continue"},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"        if col is not None:"},{"line_number":5966,"context_line":"            delete \u003d table.delete().where(col \u003c before_date)"},{"line_number":5967,"context_line":"        else:"},{"line_number":5968,"context_line":"            delete \u003d table.delete()"},{"line_number":5969,"context_line":""},{"line_number":5970,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5971,"context_line":"        if deleted.rowcount \u003e 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff6b8bd7_204ae754","line":5968,"range":{"start_line":5965,"start_character":0,"end_line":5968,"end_character":35},"updated":"2018-03-06 21:06:49.000000000","message":"just a note for reviewers... this will lock the full table being deleted for the duration of the DELETE operation. For large tables, this *could* be a significant amount of time (maybe a second or so per 200K records). During this time, of course, no archive operations will be able to complete against the table being DELETEd from.\n\nPretty sure this isn\u0027t something to worry about unless some automation is doing a nova-manage db archive_deleted_rows and a nova-manage db purge at the same time, but you never know... :)\n\nFor the case of --all, it would be quite a bit faster to issue a TRUNCATE \u003ctable\u003e than a DELETE FROM \u003ctable\u003e. This is an optimization to consider for a future patch, though, if the performance of nova-manage db purge --all becomes an issue.","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"},{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"10d07da676399b34da2ed6b0ebc683a84835f6a3","unresolved":false,"context_lines":[{"line_number":5962,"context_line":"                            \u0027table\u0027: table.name})"},{"line_number":5963,"context_line":"            continue"},{"line_number":5964,"context_line":""},{"line_number":5965,"context_line":"        if col is not None:"},{"line_number":5966,"context_line":"            delete \u003d table.delete().where(col \u003c before_date)"},{"line_number":5967,"context_line":"        else:"},{"line_number":5968,"context_line":"            delete \u003d table.delete()"},{"line_number":5969,"context_line":""},{"line_number":5970,"context_line":"        deleted \u003d conn.execute(delete)"},{"line_number":5971,"context_line":"        if deleted.rowcount \u003e 0:"}],"source_content_type":"text/x-python","patch_set":4,"id":"df7087c5_ca2fa1f4","line":5968,"range":{"start_line":5965,"start_character":0,"end_line":5968,"end_character":35},"in_reply_to":"ff6b8bd7_204ae754","updated":"2018-03-07 14:42:39.000000000","message":"Yeah this is all against the shadow table, so should be not a problem, but good to note.","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"}],"nova/tests/functional/db/test_archive.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"9c8e3517f45275126385dc483c6a13afc73c7d60","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        self.assertEqual([server_id], deleted_ids)"},{"line_number":230,"context_line":"        date \u003d dateutil_parser.parse(\u0027oct 21 2015\u0027, fuzzy\u003dTrue)"},{"line_number":231,"context_line":"        deleted \u003d sqlalchemy_api.purge_shadow_tables(date)"},{"line_number":232,"context_line":"        self.assertEqual(0, deleted)"}],"source_content_type":"text/x-python","patch_set":4,"id":"ff6b8bd7_806653ed","line":232,"updated":"2018-03-06 21:06:49.000000000","message":"nice tests, Dan ++","commit_id":"17377d2d9a34dfcb4b6b18e28d711652e2cb577b"}]}
