)]}'
{"nova/db/sqlalchemy/migrate_repo/versions/296_rename_weight_offset_to_weight_multiplier.py":[{"author":{"_account_id":16366,"name":"Randall Nortman","email":"openstack@nortman.net","username":"rnortman"},"change_message_id":"99783698eb848057180e093799cea9df34c6b137","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        UniqueConstraint(\u0027name\u0027, \u0027deleted\u0027,"},{"line_number":32,"context_line":"                         table\u003dtable,"},{"line_number":33,"context_line":"                         name\u003d\u0027uniq_cells0name0deleted\u0027).create()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_40a78e4f","line":33,"updated":"2015-06-28 22:53:26.000000000","message":"I think you want to outdent this one level, otherwise you\u0027re creating the constraint twice.  I think it won\u0027t harm anything, but still.\n\nI am curious about why this is necessary, though.  Is it sqlalchemy or mysql that\u0027s dropping the constraint when you modify the table, so that you have to re-create it?  Seems odd to me.","commit_id":"71299ce835239fb014e40d9ebdeebe0df2391718"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"7f370b778c7eec1fdafdda1afb1d485ae174aec1","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        UniqueConstraint(\u0027name\u0027, \u0027deleted\u0027,"},{"line_number":32,"context_line":"                         table\u003dtable,"},{"line_number":33,"context_line":"                         name\u003d\u0027uniq_cells0name0deleted\u0027).create()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_facf69b1","line":33,"in_reply_to":"ba3cc151_40a78e4f","updated":"2015-06-29 04:35:17.000000000","message":"Yeah, not sure. I could use a bit of help with this. Also, should it not be created for the table and the shadow_ table? Not really sure how that works.","commit_id":"71299ce835239fb014e40d9ebdeebe0df2391718"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"493ca3141da27249ab39602be0bf9a74d56ba4d2","unresolved":false,"context_lines":[{"line_number":30,"context_line":""},{"line_number":31,"context_line":"        UniqueConstraint(\u0027name\u0027, \u0027deleted\u0027,"},{"line_number":32,"context_line":"                         table\u003dtable,"},{"line_number":33,"context_line":"                         name\u003d\u0027uniq_cells0name0deleted\u0027).create()"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"def downgrade(migrate_engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"ba3cc151_b192159e","line":33,"in_reply_to":"ba3cc151_facf69b1","updated":"2015-06-30 16:56:12.000000000","message":"I think it might have been my environment. I removed the UniqueConstraint entirely and added a test to verify the constraint is present.","commit_id":"71299ce835239fb014e40d9ebdeebe0df2391718"}],"nova/tests/unit/cells/test_cells_scheduler.py":[{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"4db10df11610affce97e75a728c350d00e7f0b02","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            with pycallgraph.PyCallGraph(output\u003dgraphviz):"},{"line_number":281,"context_line":"                do_run(num_runs)"},{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            do_run(num_runs)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_build_instances_selects_child_cell(self):"},{"line_number":286,"context_line":"        # NOTE (johngarbutt) Make sure there\u0027s no capacity info so"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_9ceb2b13","line":283,"updated":"2015-07-01 17:04:12.000000000","message":"Hey John, what do you think about replacing the above test with:\n\n    def test_ordered_selection_burst_build(self):\n        cells \u003d self.state_manager.get_child_cells()\n        weighted_cells \u003d [weights.WeightedCell(cells[0], 0.0),\n                          weights.WeightedCell(cells[1], 0.0),\n                          weights.WeightedCell(cells[2], 0.0),\n                          weights.WeightedCell(cells[3], 0.0),\n                          ]\n        counts \u003d {cells[0].name: 0.0,\n                  cells[1].name: 0.0,\n                  cells[2].name: 0.0,\n                  cells[3].name: 0.0,\n                  }\n        runs \u003d 1000\n        for i in range(runs):\n            weighted_cells[0].weight \u003d 100.0\n            weighted_cells[1].weight \u003d 200.0\n            weighted_cells[2].weight \u003d 300.0\n            weighted_cells[3].weight \u003d 400.0\n            result \u003d self.scheduler._ordered_selection(weighted_cells)\n            result \u003d [cell for cell in result]\n            self.assertEqual(len(result), 4)\n            counts[result[0].name] \u003d counts[result[0].name] + 1\n        self.assertGreater(counts[weighted_cells[0].obj.name] / runs, .050)\n        self.assertGreater(counts[weighted_cells[1].obj.name] / runs, .150)\n        self.assertGreater(counts[weighted_cells[2].obj.name] / runs, .225)\n        self.assertGreater(counts[weighted_cells[3].obj.name] / runs, .300)\n        self.assertLess(counts[weighted_cells[0].obj.name] / runs, .150)\n        self.assertLess(counts[weighted_cells[1].obj.name] / runs, .250)\n        self.assertLess(counts[weighted_cells[2].obj.name] / runs, .375)\n        self.assertLess(counts[weighted_cells[3].obj.name] / runs, .500)\n\nDo you think the larger, higher level test is warranted?","commit_id":"e9c4817aaa589bccae938ad68abad3dab0073533"},{"author":{"_account_id":11642,"name":"Jesse J. Cook","email":"jesse.cook@rackspace.com","username":"crashenx"},"change_message_id":"33f8cb1074340623170e2a43463195d366c2c79c","unresolved":false,"context_lines":[{"line_number":280,"context_line":"            with pycallgraph.PyCallGraph(output\u003dgraphviz):"},{"line_number":281,"context_line":"                do_run(num_runs)"},{"line_number":282,"context_line":"        else:"},{"line_number":283,"context_line":"            do_run(num_runs)"},{"line_number":284,"context_line":""},{"line_number":285,"context_line":"    def test_build_instances_selects_child_cell(self):"},{"line_number":286,"context_line":"        # NOTE (johngarbutt) Make sure there\u0027s no capacity info so"}],"source_content_type":"text/x-python","patch_set":8,"id":"ba3cc151_1762660a","line":283,"in_reply_to":"ba3cc151_9ceb2b13","updated":"2015-07-02 14:20:44.000000000","message":"I have a much better test, but it fails too frequently without slot decrementing. Going to clean up slot decrementing patch [0] and run better tests there.","commit_id":"e9c4817aaa589bccae938ad68abad3dab0073533"}]}
