)]}'
{"bin/nova-manage":[{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"a53ddcf42c26fce0092c8eb111224d3a6a725239","unresolved":false,"context_lines":[{"line_number":798,"context_line":"            print \"Must supply non-negative value for max_rows\""},{"line_number":799,"context_line":"            sys.exit(1)"},{"line_number":800,"context_line":"        elif max_rows is not None:"},{"line_number":801,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"},{"line_number":804,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"AAAAN3%2F%2F9VM%3D","line":801,"updated":"2013-03-05 08:39:51.000000000","message":"Why not:\n\n  if max_rows is not None:\n      max_rows \u003d int(max_rows)\n      if max_rows \u003c 0):\n          print ...\n          sys.exit(1)\n\nAnother option is to pass type\u003dint to @args\n\nYet another option is to pass e.g. type\u003dpositive_int ala http://stackoverflow.com/questions/14117415/using-argparse-allow-only-positive-integers\n\n def positive_int(value):\n     ret \u003d int(value)\n     if ret \u003c 0:\n          raise argparse.ArgumentTypeError(\"%s is an invalid positive int value\" % value)\n     return ret","commit_id":"2683acd77003edb0525254e1c38ea1c0ecb09f4a"},{"author":{"_account_id":4419,"name":"Matthew Sherborne","email":"msherborne+openstack@gmail.com","username":"msherborne+openstack"},"change_message_id":"714c471d7238bef7a0b9bcbca1b34de2a18aac38","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        if max_rows is not None:"},{"line_number":798,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":799,"context_line":"            if max_rows \u003c 0:"},{"line_number":800,"context_line":"                print \"Must supply non-negative value for max_rows\""},{"line_number":801,"context_line":"                sys.exit(1)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAN3%2F%2F5mI%3D","line":800,"updated":"2013-03-07 03:58:01.000000000","message":"This string should go through the translation system:\n\n_(\"some string\")\n\nso it\u0027s picked up by gettext","commit_id":"66e2ec8a7bd8a43ba40f1b9823fe9021e754caf9"},{"author":{"_account_id":5638,"name":"Davanum Srinivas","email":"davanum@gmail.com","username":"dims-v"},"change_message_id":"f536d6d5d3a8ab302f926799489e9d353a031735","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        if max_rows is not None:"},{"line_number":798,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":799,"context_line":"            if max_rows \u003c 0:"},{"line_number":800,"context_line":"                print \"Must supply non-negative value for max_rows\""},{"line_number":801,"context_line":"                sys.exit(1)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAN3%2F%2F5xA%3D","line":800,"updated":"2013-03-07 01:05:11.000000000","message":"non-negative \u003d\u003d positive? :) how about \"max_rows must be greater than or equal to zero\"...Brings up another question, can they specify zero? what would we archive if it is zero?","commit_id":"66e2ec8a7bd8a43ba40f1b9823fe9021e754caf9"},{"author":{"_account_id":2889,"name":"Aeva Black","email":"aeva.online@gmail.com","username":"tenbrae"},"change_message_id":"0fcea12276418f5a31f45ff9b7f17172c93bdb7d","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        if max_rows is not None:"},{"line_number":798,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":799,"context_line":"            if max_rows \u003c 0:"},{"line_number":800,"context_line":"                print \"Must supply non-negative value for max_rows\""},{"line_number":801,"context_line":"                sys.exit(1)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"AAAAN3%2F%2F5rc%3D","line":800,"in_reply_to":"AAAAN3%2F%2F5xA%3D","updated":"2013-03-07 02:54:47.000000000","message":"I agree, any value \u003c\u003d 0 does not make sense here.\n\nAlso, I dislike that db.archive_deleted_rows has an inline constant default of 5000 rows when max_rows \u003d None, which doesn\u0027t appear to be listed in the nova-manage CLI. That\u0027s really a separate issue, though. /me files another bug...","commit_id":"66e2ec8a7bd8a43ba40f1b9823fe9021e754caf9"},{"author":{"_account_id":1247,"name":"Mark McLoughlin","email":"markmc@redhat.com","username":"markmc"},"change_message_id":"fd39d3c507d1978177b347a120bd37359ef62d38","unresolved":false,"context_lines":[{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":792,"context_line":"            help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":793,"context_line":"    def archive_deleted_rows(self, max_rows):"},{"line_number":794,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":795,"context_line":"        tables."},{"line_number":796,"context_line":"        \"\"\""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAN3%2F%2F3SM%3D","line":793,"updated":"2013-03-08 11:36:04.000000000","message":"This can break existing scripts\n\nWhat\u0027s the rationale for that being ok?","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04337911da303956d8651a903e1df912a3a18e9f","unresolved":false,"context_lines":[{"line_number":790,"context_line":""},{"line_number":791,"context_line":"    @args(\u0027--max_rows\u0027, dest\u003d\u0027max_rows\u0027, metavar\u003d\u0027\u003cnumber\u003e\u0027,"},{"line_number":792,"context_line":"            help\u003d\u0027Maximum number of deleted rows to archive\u0027)"},{"line_number":793,"context_line":"    def archive_deleted_rows(self, max_rows):"},{"line_number":794,"context_line":"        \"\"\"Move up to max_rows deleted rows from production tables to shadow"},{"line_number":795,"context_line":"        tables."},{"line_number":796,"context_line":"        \"\"\""}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAN3%2F%2F28A%3D","line":793,"in_reply_to":"AAAAN3%2F%2F3SM%3D","updated":"2013-03-08 17:18:07.000000000","message":"The rational is that this is for a new feature for Grizzly that hasn\u0027t been released yet (https://blueprints.launchpad.net/nova/+spec/db-archiving).   So there aren\u0027t any existing scripts","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"},{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7db03e5c5dfaee4b26e799115ac173b1ba97fcac","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        if max_rows is not None:"},{"line_number":798,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":799,"context_line":"            if max_rows \u003c 0:"},{"line_number":800,"context_line":"                print _(\"Must supply a positive value for max_rows\")"},{"line_number":801,"context_line":"                sys.exit(1)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAN3%2F%2F3y8%3D","line":800,"updated":"2013-03-08 02:21:17.000000000","message":"It is a small thing, but doing\nprint(_(\"....\"))\n\nwill take us towards Python3 compat.","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04337911da303956d8651a903e1df912a3a18e9f","unresolved":false,"context_lines":[{"line_number":797,"context_line":"        if max_rows is not None:"},{"line_number":798,"context_line":"            max_rows \u003d int(max_rows)"},{"line_number":799,"context_line":"            if max_rows \u003c 0:"},{"line_number":800,"context_line":"                print _(\"Must supply a positive value for max_rows\")"},{"line_number":801,"context_line":"                sys.exit(1)"},{"line_number":802,"context_line":"        admin_context \u003d context.get_admin_context()"},{"line_number":803,"context_line":"        db.archive_deleted_rows(admin_context, max_rows)"}],"source_content_type":"application/octet-stream","patch_set":4,"id":"AAAAN3%2F%2F27c%3D","line":800,"in_reply_to":"AAAAN3%2F%2F3y8%3D","updated":"2013-03-08 17:18:07.000000000","message":"If I make another rev of this patch I will update this","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"}],"nova/db/sqlalchemy/api.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7db03e5c5dfaee4b26e799115ac173b1ba97fcac","unresolved":false,"context_lines":[{"line_number":4716,"context_line":"    \"\"\""},{"line_number":4717,"context_line":"    # The context argument is only used for the decorator."},{"line_number":4718,"context_line":"    if max_rows is None:"},{"line_number":4719,"context_line":"        max_rows \u003d 5000"},{"line_number":4720,"context_line":"    engine \u003d get_engine()"},{"line_number":4721,"context_line":"    conn \u003d engine.connect()"},{"line_number":4722,"context_line":"    metadata \u003d MetaData()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F3yw%3D","side":"PARENT","line":4719,"updated":"2013-03-08 02:21:17.000000000","message":"Perhaps it would be nice, particularly as this is post-freeze, to deprecate (and issue a warning) rather than just changing the behaviour silently.","commit_id":"e2d956ccaab96c7035fdda2c825ecc1e7bb5423a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04337911da303956d8651a903e1df912a3a18e9f","unresolved":false,"context_lines":[{"line_number":4716,"context_line":"    \"\"\""},{"line_number":4717,"context_line":"    # The context argument is only used for the decorator."},{"line_number":4718,"context_line":"    if max_rows is None:"},{"line_number":4719,"context_line":"        max_rows \u003d 5000"},{"line_number":4720,"context_line":"    engine \u003d get_engine()"},{"line_number":4721,"context_line":"    conn \u003d engine.connect()"},{"line_number":4722,"context_line":"    metadata \u003d MetaData()"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F274%3D","side":"PARENT","line":4719,"in_reply_to":"AAAAN3%2F%2F3yw%3D","updated":"2013-03-08 17:18:07.000000000","message":"as this code is New in Grizzly, the user won\u0027t see a behavior change","commit_id":"e2d956ccaab96c7035fdda2c825ecc1e7bb5423a"}],"nova/tests/test_nova_manage.py":[{"author":{"_account_id":4190,"name":"lifeless","email":"robertc@robertcollins.net","username":"lifeless"},"change_message_id":"7db03e5c5dfaee4b26e799115ac173b1ba97fcac","unresolved":false,"context_lines":[{"line_number":377,"context_line":"class DBCommandsTestCase(test.TestCase):"},{"line_number":378,"context_line":"    def setUp(self):"},{"line_number":379,"context_line":"        super(DBCommandsTestCase, self).setUp()"},{"line_number":380,"context_line":"        self.commands \u003d nova_manage.DbCommands()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_archive_deleted_rows_negative(self):"},{"line_number":383,"context_line":"        self.assertRaises(SystemExit,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F3yk%3D","line":380,"updated":"2013-03-08 02:21:17.000000000","message":"As there is only one test, I wouldn\u0027t do such a trivial setUp - just do\n\nclass DBCommandsTestCase(test.TestCase):\n\n    def test_archive_deleted_rows_negative(self):\n        commands \u003d nova_manage.DbCommands()\n        self.assertRaises(SystemExit, commands.archive_deleted_rows, -1)","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"04337911da303956d8651a903e1df912a3a18e9f","unresolved":false,"context_lines":[{"line_number":377,"context_line":"class DBCommandsTestCase(test.TestCase):"},{"line_number":378,"context_line":"    def setUp(self):"},{"line_number":379,"context_line":"        super(DBCommandsTestCase, self).setUp()"},{"line_number":380,"context_line":"        self.commands \u003d nova_manage.DbCommands()"},{"line_number":381,"context_line":""},{"line_number":382,"context_line":"    def test_archive_deleted_rows_negative(self):"},{"line_number":383,"context_line":"        self.assertRaises(SystemExit,"}],"source_content_type":"text/x-python","patch_set":4,"id":"AAAAN3%2F%2F270%3D","line":380,"in_reply_to":"AAAAN3%2F%2F3yk%3D","updated":"2013-03-08 17:18:07.000000000","message":"There is one test now, but hopefully there will be more in the future.  So having the SetUp now, will prevent the need for a refactor later","commit_id":"abc0c9479127671adf8fcd81197ab993356cbc6a"}]}
