)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e66792121b69bd1deb9f6e806b2c52cb3f15920d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Clean up docstrings for archive_deleted_rows"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The docstrings were missing descriptions of the parameters"},{"line_number":10,"context_line":"(it\u0027s weird that max_rows is a kwarg defaulting to None but"},{"line_number":11,"context_line":"it\u0027s clearly required so I\u0027ve marked it as such) and the"},{"line_number":12,"context_line":"returns was missing the 2nd item of the typle which is the"},{"line_number":13,"context_line":"list of deleted instance UUIDs."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_d072d8ad","line":11,"range":{"start_line":10,"start_character":0,"end_line":11,"end_character":48},"updated":"2019-08-08 15:47:37.000000000","message":"couldn\u0027t we un-kwarg-ify it?","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6d405533a59562b0584cbe1e7bc478719bf3f38","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Clean up docstrings for archive_deleted_rows"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The docstrings were missing descriptions of the parameters"},{"line_number":10,"context_line":"(it\u0027s weird that max_rows is a kwarg defaulting to None but"},{"line_number":11,"context_line":"it\u0027s clearly required so I\u0027ve marked it as such) and the"},{"line_number":12,"context_line":"returns was missing the 2nd item of the typle which is the"},{"line_number":13,"context_line":"list of deleted instance UUIDs."},{"line_number":14,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_ea335812","line":11,"range":{"start_line":10,"start_character":0,"end_line":11,"end_character":48},"in_reply_to":"7faddb67_d072d8ad","updated":"2019-08-09 02:44:47.000000000","message":"Yeah, follow up maybe.","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":14070,"name":"Eric Fried","email":"openstack@fried.cc","username":"efried"},"change_message_id":"e66792121b69bd1deb9f6e806b2c52cb3f15920d","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The docstrings were missing descriptions of the parameters"},{"line_number":10,"context_line":"(it\u0027s weird that max_rows is a kwarg defaulting to None but"},{"line_number":11,"context_line":"it\u0027s clearly required so I\u0027ve marked it as such) and the"},{"line_number":12,"context_line":"returns was missing the 2nd item of the typle which is the"},{"line_number":13,"context_line":"list of deleted instance UUIDs."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I511b4bb7f8f4823a45365723ee10247925fd8b12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_706764ec","line":12,"range":{"start_line":12,"start_character":40,"end_line":12,"end_character":45},"updated":"2019-08-08 15:47:37.000000000","message":"tuple","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"e6d405533a59562b0584cbe1e7bc478719bf3f38","unresolved":false,"context_lines":[{"line_number":9,"context_line":"The docstrings were missing descriptions of the parameters"},{"line_number":10,"context_line":"(it\u0027s weird that max_rows is a kwarg defaulting to None but"},{"line_number":11,"context_line":"it\u0027s clearly required so I\u0027ve marked it as such) and the"},{"line_number":12,"context_line":"returns was missing the 2nd item of the typle which is the"},{"line_number":13,"context_line":"list of deleted instance UUIDs."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I511b4bb7f8f4823a45365723ee10247925fd8b12"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"7faddb67_8a38a4ee","line":12,"range":{"start_line":12,"start_character":40,"end_line":12,"end_character":45},"in_reply_to":"7faddb67_706764ec","updated":"2019-08-09 02:44:47.000000000","message":"Yikes.","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"11608ce2be8173a409fee7dafb43ec708e7b7351","unresolved":false,"context_lines":[{"line_number":5476,"context_line":"    if before:"},{"line_number":5477,"context_line":"        select \u003d select.where(table.c.deleted_at \u003c before)"},{"line_number":5478,"context_line":""},{"line_number":5479,"context_line":"    select \u003d select.order_by(column).limit(max_rows)"},{"line_number":5480,"context_line":"    rows \u003d conn.execute(select).fetchall()"},{"line_number":5481,"context_line":"    records \u003d [r[0] for r in rows]"},{"line_number":5482,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_d78e6078","line":5479,"range":{"start_line":5479,"start_character":43,"end_line":5479,"end_character":51},"updated":"2019-08-07 21:57:13.000000000","message":"And here I assume that max_rows can be None, else there\u0027s a potential bug. I don\u0027t find that the docs say anything about what counts as valid https://docs.sqlalchemy.org/en/13/orm/query.html#sqlalchemy.orm.query.Query.limit","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"11608ce2be8173a409fee7dafb43ec708e7b7351","unresolved":false,"context_lines":[{"line_number":5510,"context_line":""},{"line_number":5511,"context_line":"    # NOTE(jake): instance_actions_events doesn\u0027t have a instance_uuid column"},{"line_number":5512,"context_line":"    # but still needs to be archived as it is a FK constraint"},{"line_number":5513,"context_line":"    if ((max_rows is None or rows_archived \u003c max_rows) and"},{"line_number":5514,"context_line":"            (\u0027instance_uuid\u0027 in columns or"},{"line_number":5515,"context_line":"             tablename \u003d\u003d \u0027instance_actions_events\u0027)):"},{"line_number":5516,"context_line":"        instances \u003d models.BASE.metadata.tables[\u0027instances\u0027]"},{"line_number":5517,"context_line":"        limit \u003d max_rows - rows_archived if max_rows is not None else None"},{"line_number":5518,"context_line":"        extra \u003d _archive_if_instance_deleted(table, shadow_table, instances,"},{"line_number":5519,"context_line":"                                             conn, limit, before)"},{"line_number":5520,"context_line":"        rows_archived +\u003d extra"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_57a270fe","line":5517,"range":{"start_line":5513,"start_character":4,"end_line":5517,"end_character":74},"updated":"2019-08-07 21:57:13.000000000","message":"max_rows of None is handled here","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"1e304ba3b44f529daa6930d805191c42ac0232c7","unresolved":false,"context_lines":[{"line_number":5558,"context_line":"        rows_archived, _deleted_instance_uuids \u003d ("},{"line_number":5559,"context_line":"            _archive_deleted_rows_for_table("},{"line_number":5560,"context_line":"                tablename,"},{"line_number":5561,"context_line":"                max_rows\u003dmax_rows - total_rows_archived,"},{"line_number":5562,"context_line":"                before\u003dbefore))"},{"line_number":5563,"context_line":"        total_rows_archived +\u003d rows_archived"},{"line_number":5564,"context_line":"        if tablename \u003d\u003d \u0027instances\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e51e37ba","line":5561,"range":{"start_line":5561,"start_character":25,"end_line":5561,"end_character":55},"updated":"2019-08-08 13:38:53.000000000","message":"If max_rows is None this is going to blow up:\n\n\u003e\u003e\u003e None - 0\nTraceback (most recent call last):\n  File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\nTypeError: unsupported operand type(s) for -: \u0027NoneType\u0027 and \u0027int\u0027","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"0630ea1dcbb8e634a6b568b21b4077d6fbc37bf4","unresolved":false,"context_lines":[{"line_number":5558,"context_line":"        rows_archived, _deleted_instance_uuids \u003d ("},{"line_number":5559,"context_line":"            _archive_deleted_rows_for_table("},{"line_number":5560,"context_line":"                tablename,"},{"line_number":5561,"context_line":"                max_rows\u003dmax_rows - total_rows_archived,"},{"line_number":5562,"context_line":"                before\u003dbefore))"},{"line_number":5563,"context_line":"        total_rows_archived +\u003d rows_archived"},{"line_number":5564,"context_line":"        if tablename \u003d\u003d \u0027instances\u0027:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_0dca9919","line":5561,"range":{"start_line":5561,"start_character":25,"end_line":5561,"end_character":55},"in_reply_to":"7faddb67_e51e37ba","updated":"2019-08-08 15:34:02.000000000","message":"Thanks, didn\u0027t see this. :\\ Originally intended to be able to be None and somehow evolved.","commit_id":"4551a187e7e399568f2de648394ffcada9d80d3e"}]}
