)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ac0b31a5f488f103089cc06e44956417d17da01","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  manage its config, database and policy requirements using non-global"},{"line_number":52,"context_line":"  config. It can also accept a previously prepared config."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The Database fixtures calls \u0027reset()\u0027 in both setUp and cleanUp to be"},{"line_number":55,"context_line":"  certain we are both starting and ending in a known state that will"},{"line_number":56,"context_line":"  not disturb or be disturbed by other tests. Configuring the db is"},{"line_number":57,"context_line":"  moved into setUp where it should have been all along, but is important"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3f79a3b5_e1b15802","line":54,"range":{"start_line":54,"start_character":54,"end_line":54,"end_character":66},"updated":"2018-11-30 13:41:48.000000000","message":"not sure it\u0027s necessary to reset() in cleanUp if you\u0027re always doing it in setUp()...","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":51,"context_line":"  manage its config, database and policy requirements using non-global"},{"line_number":52,"context_line":"  config. It can also accept a previously prepared config."},{"line_number":53,"context_line":""},{"line_number":54,"context_line":"* The Database fixtures calls \u0027reset()\u0027 in both setUp and cleanUp to be"},{"line_number":55,"context_line":"  certain we are both starting and ending in a known state that will"},{"line_number":56,"context_line":"  not disturb or be disturbed by other tests. Configuring the db is"},{"line_number":57,"context_line":"  moved into setUp where it should have been all along, but is important"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3f79a3b5_8c99bb6d","line":54,"range":{"start_line":54,"start_character":54,"end_line":54,"end_character":66},"in_reply_to":"3f79a3b5_e1b15802","updated":"2018-11-30 14:31:57.000000000","message":"this is done because we don\u0027t know what nova, which is infected by eventlet, is doing, so we want to be sure there is always a clean slate. Yes, it\u0027s overkill, but the week worth of testing suggested that it is better to be safe than sorry.","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ac0b31a5f488f103089cc06e44956417d17da01","unresolved":false,"context_lines":[{"line_number":68,"context_line":"There was a lock fixture previously, provided by oslo_concurrency, but"},{"line_number":69,"context_line":"it, as far as I can tell, requires global config. We don\u0027t want that."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"This that will need to be changed as a result of these change:"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"* The goals doc at https://review.openstack.org/#/c/618811/ will"},{"line_number":74,"context_line":"  need to be change to say \"keep it this way\" rather than \"get it"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3f79a3b5_41c04c4c","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":10},"updated":"2018-11-30 13:41:48.000000000","message":"This that? :)","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":68,"context_line":"There was a lock fixture previously, provided by oslo_concurrency, but"},{"line_number":69,"context_line":"it, as far as I can tell, requires global config. We don\u0027t want that."},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"This that will need to be changed as a result of these change:"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"* The goals doc at https://review.openstack.org/#/c/618811/ will"},{"line_number":74,"context_line":"  need to be change to say \"keep it this way\" rather than \"get it"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3f79a3b5_0cafeb7f","line":71,"range":{"start_line":71,"start_character":0,"end_line":71,"end_character":10},"in_reply_to":"3f79a3b5_41c04c4c","updated":"2018-11-30 14:31:57.000000000","message":"wooo, go me, I have no idea what that means. Oh. \"things that\"...","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ac0b31a5f488f103089cc06e44956417d17da01","unresolved":false,"context_lines":[{"line_number":71,"context_line":"This that will need to be changed as a result of these change:"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"* The goals doc at https://review.openstack.org/#/c/618811/ will"},{"line_number":74,"context_line":"  need to be change to say \"keep it this way\" rather than \"get it"},{"line_number":75,"context_line":"  this way\"."},{"line_number":76,"context_line":""},{"line_number":77,"context_line":"Change-Id: Icd629d7cd6d68ca08f9f3b4f0465c3d9a1efeb22"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"3f79a3b5_61bd48d0","line":74,"range":{"start_line":74,"start_character":13,"end_line":74,"end_character":19},"updated":"2018-11-30 13:41:48.000000000","message":"changed","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"}],"placement/cmd/manage.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ac0b31a5f488f103089cc06e44956417d17da01","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def main():"},{"line_number":72,"context_line":"    config \u003d cfg.ConfigOpts()"},{"line_number":73,"context_line":"    conf.register_opts(config)"},{"line_number":74,"context_line":"    command_opts \u003d setup_commands()"},{"line_number":75,"context_line":"    config.register_cli_opts(command_opts)"},{"line_number":76,"context_line":"    config(sys.argv[1:], project\u003d\u0027placement\u0027,"},{"line_number":77,"context_line":"           version\u003dversion_info.version_string(),"},{"line_number":78,"context_line":"           default_config_files\u003dNone)"},{"line_number":79,"context_line":"    db_api.configure(config)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    try:"},{"line_number":82,"context_line":"        func \u003d config.command.func"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_4195ac3d","line":79,"range":{"start_line":72,"start_character":0,"end_line":79,"end_character":28},"updated":"2018-11-30 13:41:48.000000000","message":"suffice to say that cfg, config, conf, and configure are all used above. :) phew... not easy to understand what\u0027s going on.","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"def main():"},{"line_number":72,"context_line":"    config \u003d cfg.ConfigOpts()"},{"line_number":73,"context_line":"    conf.register_opts(config)"},{"line_number":74,"context_line":"    command_opts \u003d setup_commands()"},{"line_number":75,"context_line":"    config.register_cli_opts(command_opts)"},{"line_number":76,"context_line":"    config(sys.argv[1:], project\u003d\u0027placement\u0027,"},{"line_number":77,"context_line":"           version\u003dversion_info.version_string(),"},{"line_number":78,"context_line":"           default_config_files\u003dNone)"},{"line_number":79,"context_line":"    db_api.configure(config)"},{"line_number":80,"context_line":""},{"line_number":81,"context_line":"    try:"},{"line_number":82,"context_line":"        func \u003d config.command.func"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_acbfd7aa","line":79,"range":{"start_line":72,"start_character":0,"end_line":79,"end_character":28},"in_reply_to":"3f79a3b5_4195ac3d","updated":"2018-11-30 14:31:57.000000000","message":"Yes. I couldn\u0027t decide on good names. Suggestions welcome.","commit_id":"4b99b682dcf6573b9a430d79907477ba949b7935"}],"placement/tests/fixtures.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"04cf4967a91e1edb7aa0ea2939f43cb85e38b5a6","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"CONF \u003d cfg.CONF"},{"line_number":31,"context_line":"session_configured \u003d False"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def reset():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_a8986e66","line":31,"updated":"2018-11-27 13:32:05.000000000","message":"this is unused now","commit_id":"1ec2bdcdd1abdda8b78fdfca5da600b6e909ec4e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"389c480fcb8f1cc6d861fc350f7c9c57f40bc179","unresolved":false,"context_lines":[{"line_number":28,"context_line":""},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"CONF \u003d cfg.CONF"},{"line_number":31,"context_line":"session_configured \u003d False"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"def reset():"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_1bba0adf","line":31,"in_reply_to":"3f79a3b5_a8986e66","updated":"2018-11-27 14:09:12.000000000","message":"oops","commit_id":"1ec2bdcdd1abdda8b78fdfca5da600b6e909ec4e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"248ee6a9c7e394833ee460b70484a4b5df8e7a55","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                pass"},{"line_number":57,"context_line":"            CONF.set_override(\u0027connection\u0027, \u0027sqlite://\u0027,"},{"line_number":58,"context_line":"                              group\u003d\u0027placement_database\u0027)"},{"line_number":59,"context_line":"        placement_db.configure(CONF)"},{"line_number":60,"context_line":"        self.get_engine \u003d placement_db.get_placement_engine"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_48af5ae0","line":59,"updated":"2018-11-27 13:24:55.000000000","message":"Now we run placement_db.configure(CONF) at every __init__ call, while it was run only once per process in the past. \n\nSo a code like:\n\n  db1 \u003d Database()\n  db2 \u003d Database()\n\ncould result calling placement_db.configure(CONF) twice in the same process without a reset() call in between.\n\nI guess we don\u0027t want to have two Database object exists in the same process at the same time so it could be OK to fail if somebody try to do that.\n\nAnwyhow, I would like to get a confirmation that this behavior change is intentional.","commit_id":"1ec2bdcdd1abdda8b78fdfca5da600b6e909ec4e"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"389c480fcb8f1cc6d861fc350f7c9c57f40bc179","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                pass"},{"line_number":57,"context_line":"            CONF.set_override(\u0027connection\u0027, \u0027sqlite://\u0027,"},{"line_number":58,"context_line":"                              group\u003d\u0027placement_database\u0027)"},{"line_number":59,"context_line":"        placement_db.configure(CONF)"},{"line_number":60,"context_line":"        self.get_engine \u003d placement_db.get_placement_engine"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setUp(self):"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_9bdcda43","line":59,"in_reply_to":"3f79a3b5_48af5ae0","updated":"2018-11-27 14:09:12.000000000","message":"Because of line 71, below, reset() was being called after every cleanup, which had the same impact: configure being called again. This happened in https://review.openstack.org/#/c/614350/18/placement/tests/fixtures.py where I commented on it (line 68)","commit_id":"1ec2bdcdd1abdda8b78fdfca5da600b6e909ec4e"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fea7f8d043383b5582172de6cdbc6e21992161ce","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class ExternalLockFixture(fixtures.Fixture):"},{"line_number":72,"context_line":"    \"\"\"Provider a predictable inter-process file-based lock that doesn\u0027t"},{"line_number":73,"context_line":"    required oslo.config."},{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    # TODO(cdent): Actually write this when I\u0027m coherent."},{"line_number":76,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_8528e235","line":73,"range":{"start_line":72,"start_character":7,"end_line":73,"end_character":24},"updated":"2018-11-28 11:55:31.000000000","message":"Does oslo.lockutils depends on oslo.config?","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a7617d3620890d4d797cbc15ffdd0d13b9858e7c","unresolved":false,"context_lines":[{"line_number":69,"context_line":""},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"class ExternalLockFixture(fixtures.Fixture):"},{"line_number":72,"context_line":"    \"\"\"Provider a predictable inter-process file-based lock that doesn\u0027t"},{"line_number":73,"context_line":"    required oslo.config."},{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    # TODO(cdent): Actually write this when I\u0027m coherent."},{"line_number":76,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_0550525e","line":73,"range":{"start_line":72,"start_character":7,"end_line":73,"end_character":24},"in_reply_to":"3f79a3b5_8528e235","updated":"2018-11-28 12:01:49.000000000","message":"The fixture that is provides for locks does. Very annoying.","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fea7f8d043383b5582172de6cdbc6e21992161ce","unresolved":false,"context_lines":[{"line_number":72,"context_line":"    \"\"\"Provider a predictable inter-process file-based lock that doesn\u0027t"},{"line_number":73,"context_line":"    required oslo.config."},{"line_number":74,"context_line":"    \"\"\""},{"line_number":75,"context_line":"    # TODO(cdent): Actually write this when I\u0027m coherent."},{"line_number":76,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e5f3d6e3","line":75,"range":{"start_line":75,"start_character":19,"end_line":75,"end_character":57},"updated":"2018-11-28 11:55:31.000000000","message":":)","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9add61d302f869ccb972de76b3dbed8c821eea5c","unresolved":false,"context_lines":[{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    def setUp(self):"},{"line_number":62,"context_line":"        super(Database, self).setUp()"},{"line_number":63,"context_line":"        reset()"},{"line_number":64,"context_line":"        placement_db.configure(self.conf_fixture.conf)"},{"line_number":65,"context_line":"        migration.create_schema()"},{"line_number":66,"context_line":"        resource_provider._TRAITS_SYNCED \u003d False"},{"line_number":67,"context_line":"        resource_provider._RC_CACHE \u003d None"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f4692d8e","line":64,"range":{"start_line":63,"start_character":0,"end_line":64,"end_character":54},"updated":"2018-11-29 13:10:13.000000000","message":"So this was the key to avoid the race. Nice.","commit_id":"83c64b4594ce2afc7d52afc3d6b0ff6a92b179ab"}],"placement/tests/functional/base.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"4ac0b31a5f488f103089cc06e44956417d17da01","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        conf_fixture.config("},{"line_number":41,"context_line":"            group\u003d\u0027placement_database\u0027,"},{"line_number":42,"context_line":"            connection\u003d\u0027sqlite://\u0027,"},{"line_number":43,"context_line":"            sqlite_synchronous\u003dFalse)"},{"line_number":44,"context_line":"        CONF([], default_config_files\u003d[])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.useFixture(policy_fixture.PolicyFixture())"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_816d0404","side":"PARENT","line":43,"range":{"start_line":43,"start_character":12,"end_line":43,"end_character":37},"updated":"2018-11-30 13:41:48.000000000","message":"technically, you removed this in the DatabaseFixture.__init__() code. And the default is True in oslo.db:\n\nhttps://github.com/openstack/oslo.db/blob/c49c96ff74190b9f1b1504eaa8a7ef66b8ae333f/oslo_db/options.py#L19","commit_id":"324e4f44da372925b3fa44cbc6bd57f4deee6ba2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        conf_fixture.config("},{"line_number":41,"context_line":"            group\u003d\u0027placement_database\u0027,"},{"line_number":42,"context_line":"            connection\u003d\u0027sqlite://\u0027,"},{"line_number":43,"context_line":"            sqlite_synchronous\u003dFalse)"},{"line_number":44,"context_line":"        CONF([], default_config_files\u003d[])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.useFixture(policy_fixture.PolicyFixture())"}],"source_content_type":"text/x-python","patch_set":6,"id":"3f79a3b5_8cc77b3f","side":"PARENT","line":43,"range":{"start_line":43,"start_character":12,"end_line":43,"end_character":37},"in_reply_to":"3f79a3b5_816d0404","updated":"2018-11-30 14:31:57.000000000","message":"It\u0027s not relevant for in memory sqlite dbs, which we always use in the tests. There\u0027s some discussion of that further up in the review (back when this was just db cleanups, not removal of global config).","commit_id":"324e4f44da372925b3fa44cbc6bd57f4deee6ba2"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ecc0c19df3e2d4b182c9564b26a8ccfc173b3ec","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        conf_fixture.config("},{"line_number":41,"context_line":"            group\u003d\u0027placement_database\u0027,"},{"line_number":42,"context_line":"            connection\u003d\u0027sqlite://\u0027,"},{"line_number":43,"context_line":"            sqlite_synchronous\u003dFalse)"},{"line_number":44,"context_line":"        CONF([], default_config_files\u003d[])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.useFixture(policy_fixture.PolicyFixture())"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_e10f1836","side":"PARENT","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":37},"updated":"2018-11-30 13:52:57.000000000","message":"as mentioned in a previous revision, you removed the setting of this config option, and the default in oslo.db is True:\n\nhttps://github.com/openstack/oslo.db/blob/c49c96ff74190b9f1b1504eaa8a7ef66b8ae333f/oslo_db/options.py#L19\n\nCould you verify that you meant to do that?","commit_id":"324e4f44da372925b3fa44cbc6bd57f4deee6ba2"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":40,"context_line":"        conf_fixture.config("},{"line_number":41,"context_line":"            group\u003d\u0027placement_database\u0027,"},{"line_number":42,"context_line":"            connection\u003d\u0027sqlite://\u0027,"},{"line_number":43,"context_line":"            sqlite_synchronous\u003dFalse)"},{"line_number":44,"context_line":"        CONF([], default_config_files\u003d[])"},{"line_number":45,"context_line":""},{"line_number":46,"context_line":"        self.useFixture(policy_fixture.PolicyFixture())"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_acc4b73a","side":"PARENT","line":43,"range":{"start_line":43,"start_character":0,"end_line":43,"end_character":37},"in_reply_to":"3f79a3b5_e10f1836","updated":"2018-11-30 14:31:57.000000000","message":"yes","commit_id":"324e4f44da372925b3fa44cbc6bd57f4deee6ba2"}],"placement/tests/functional/db/test_allocation_candidates.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"fea7f8d043383b5582172de6cdbc6e21992161ce","unresolved":false,"context_lines":[{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Do it again, with conf set to randomize. We can\u0027t confirm the"},{"line_number":703,"context_line":"        # random-ness but we can be sure the code path doesn\u0027t explode."},{"line_number":704,"context_line":"        self.conf_fixture.config(randomize_allocation_candidates\u003dTrue,"},{"line_number":705,"context_line":"                                 group\u003d\u0027placement\u0027)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"        # Ask for two candidates."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_05785229","line":704,"range":{"start_line":704,"start_character":8,"end_line":704,"end_character":32},"updated":"2018-11-28 11:55:31.000000000","message":"to keep the original behavior this should be self.conf_fixture.config.set_override(...)","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"a7617d3620890d4d797cbc15ffdd0d13b9858e7c","unresolved":false,"context_lines":[{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Do it again, with conf set to randomize. We can\u0027t confirm the"},{"line_number":703,"context_line":"        # random-ness but we can be sure the code path doesn\u0027t explode."},{"line_number":704,"context_line":"        self.conf_fixture.config(randomize_allocation_candidates\u003dTrue,"},{"line_number":705,"context_line":"                                 group\u003d\u0027placement\u0027)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"        # Ask for two candidates."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_e567564e","line":704,"range":{"start_line":704,"start_character":8,"end_line":704,"end_character":32},"in_reply_to":"3f79a3b5_05785229","updated":"2018-11-28 12:01:49.000000000","message":"If you look behind the fixture, config() calls set_override on the fixture\u0027s config. I chose to change this so that we have consistent use of how we \"set config in tests\". Otherwise there\u0027s always a guess.","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9add61d302f869ccb972de76b3dbed8c821eea5c","unresolved":false,"context_lines":[{"line_number":701,"context_line":""},{"line_number":702,"context_line":"        # Do it again, with conf set to randomize. We can\u0027t confirm the"},{"line_number":703,"context_line":"        # random-ness but we can be sure the code path doesn\u0027t explode."},{"line_number":704,"context_line":"        self.conf_fixture.config(randomize_allocation_candidates\u003dTrue,"},{"line_number":705,"context_line":"                                 group\u003d\u0027placement\u0027)"},{"line_number":706,"context_line":""},{"line_number":707,"context_line":"        # Ask for two candidates."}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_b4b5f51c","line":704,"range":{"start_line":704,"start_character":8,"end_line":704,"end_character":32},"in_reply_to":"3f79a3b5_e567564e","updated":"2018-11-29 13:10:13.000000000","message":"Thanks, I see now.","commit_id":"35e59f9948718f62342d301255ce2bfb4cf63ecf"}],"placement/tests/functional/fixtures/gabbits.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"9add61d302f869ccb972de76b3dbed8c821eea5c","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from placement.tests.unit import policy_fixture"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"CONF \u003d None"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def setup_app():"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_b4bf35ca","line":40,"updated":"2018-11-29 13:10:13.000000000","message":"I tried to find a way to avoid this but I soon hit the gabbi runner code so I gave up.","commit_id":"83c64b4594ce2afc7d52afc3d6b0ff6a92b179ab"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"0325bc5ca518078be3be0f06816e460ceb501f44","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from placement.tests.unit import policy_fixture"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"CONF \u003d None"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def setup_app():"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_cf125e57","line":40,"in_reply_to":"3f79a3b5_b4bf35ca","updated":"2018-11-29 13:40:21.000000000","message":"Yeah, it gets quickly messy in there, because of the way the suites are ordered and fixtures are per suite and try to work with post unittest and pytest models.\n\nBasically the loading of the wsgi app is one of several nested context manager to which there is no easy way (at this point) to pass things like this conf.\n\nSince it\u0027s usually not a problem, I\u0027ve haven\u0027t investigated fixing it. It\u0027s probably fixable.","commit_id":"83c64b4594ce2afc7d52afc3d6b0ff6a92b179ab"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"30cf243b639f77ce92ae15311cfe2f508288c206","unresolved":false,"context_lines":[{"line_number":37,"context_line":"from placement.tests.unit import policy_fixture"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":""},{"line_number":40,"context_line":"CONF \u003d None"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"def setup_app():"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_f7da7de5","line":40,"in_reply_to":"3f79a3b5_cf125e57","updated":"2018-11-30 08:27:22.000000000","message":"I think it is totally fine to keep this as is until we hit a situation where this global conf is the root of a problem. Thanks for the explanation anyhow.","commit_id":"83c64b4594ce2afc7d52afc3d6b0ff6a92b179ab"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ecc0c19df3e2d4b182c9564b26a8ccfc173b3ec","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Setup the required backend fixtures for a basic placement service.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def start_fixture(self):"},{"line_number":52,"context_line":"        global CONF"},{"line_number":53,"context_line":"        # Set up stderr and stdout captures by directly driving the"},{"line_number":54,"context_line":"        # existing nova fixtures that do that. This captures the"},{"line_number":55,"context_line":"        # output that happens outside individual tests (for"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_4c13a35b","line":52,"updated":"2018-11-30 13:52:57.000000000","message":"I re-read the commit message a few times, but I actually don\u0027t see why this is still required. With this patch, global CONF isn\u0027t used at all any more, right? So, why not change the setup_app() function above to accept a cfg.ConfigOpts object and then have the test class base instantiate a WSGI application by using the conf fixture\u0027s conf field?\n\nWhat is actually using the setup_app() method any more?","commit_id":"9e7ff6d503a5a3d08a78621540b15d63c2e1f47b"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"f5f7ea70562e5e4e5d5f461d13caab129ddb290a","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Setup the required backend fixtures for a basic placement service.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def start_fixture(self):"},{"line_number":52,"context_line":"        global CONF"},{"line_number":53,"context_line":"        # Set up stderr and stdout captures by directly driving the"},{"line_number":54,"context_line":"        # existing nova fixtures that do that. This captures the"},{"line_number":55,"context_line":"        # output that happens outside individual tests (for"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_e7fba877","line":52,"in_reply_to":"3f79a3b5_2c274720","updated":"2018-11-30 15:17:56.000000000","message":"ah, I see. ok, thanks for adding the note.","commit_id":"9e7ff6d503a5a3d08a78621540b15d63c2e1f47b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":49,"context_line":"    \"\"\"Setup the required backend fixtures for a basic placement service.\"\"\""},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    def start_fixture(self):"},{"line_number":52,"context_line":"        global CONF"},{"line_number":53,"context_line":"        # Set up stderr and stdout captures by directly driving the"},{"line_number":54,"context_line":"        # existing nova fixtures that do that. This captures the"},{"line_number":55,"context_line":"        # output that happens outside individual tests (for"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_2c274720","line":52,"in_reply_to":"3f79a3b5_4c13a35b","updated":"2018-11-30 14:31:57.000000000","message":"I\u0027ll add something to the commit message, I probably forgot to do so because this was during one of the long runs of wtf is going on...\n\nBasically setup_app is used in test_api.py (which runs all the gabbi tests). It takes a callable (that takes no args) for the wsgi apps which is the service being tested. There\u0027s some early discussion with gibi on how this is a fault in the deepest darkest interior of gabbi that would be hard to resolve in any immediate sense.\n\nSuffice it to say that _this_ global CONF is not an oslo_config.cfg.CONF, it is a global for just this file so that we can refer to and set a CONF from a distance.\n\nI\u0027ll add a note here too.","commit_id":"9e7ff6d503a5a3d08a78621540b15d63c2e1f47b"}],"placement/tests/unit/test_deploy.py":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"1ecc0c19df3e2d4b182c9564b26a8ccfc173b3ec","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        conf_fixture \u003d self.useFixture(config_fixture.Config(config))"},{"line_number":35,"context_line":"        conf.register_opts(conf_fixture.conf)"},{"line_number":36,"context_line":"        # TODO(cdent): how do I get a simple list?"},{"line_number":37,"context_line":"        conf_fixture.register_opts(auth_token.AUTH_TOKEN_OPTS[0][1],"},{"line_number":38,"context_line":"                                   group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":39,"context_line":"        www_authenticate_uri \u003d \u0027http://example.com/identity\u0027"},{"line_number":40,"context_line":"        conf_fixture.config(www_authenticate_uri\u003dwww_authenticate_uri,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_0c44cb4d","line":37,"range":{"start_line":37,"start_character":35,"end_line":37,"end_character":67},"updated":"2018-11-30 13:52:57.000000000","message":"erm, what is this doing? :)\n\nAt a minimum, maybe create a variable with a value of auth_token.AUTH_TOKEN_OPTS[0][1] and name the variable something relevant so we\u0027ll know what\u0027s going on here.","commit_id":"9e7ff6d503a5a3d08a78621540b15d63c2e1f47b"},{"author":{"_account_id":11564,"name":"Chris Dent","email":"cdent@anticdent.org","username":"chdent"},"change_message_id":"7e1647301b71d72d85a6f8774eaf6945fb6ea9cb","unresolved":false,"context_lines":[{"line_number":34,"context_line":"        conf_fixture \u003d self.useFixture(config_fixture.Config(config))"},{"line_number":35,"context_line":"        conf.register_opts(conf_fixture.conf)"},{"line_number":36,"context_line":"        # TODO(cdent): how do I get a simple list?"},{"line_number":37,"context_line":"        conf_fixture.register_opts(auth_token.AUTH_TOKEN_OPTS[0][1],"},{"line_number":38,"context_line":"                                   group\u003d\u0027keystone_authtoken\u0027)"},{"line_number":39,"context_line":"        www_authenticate_uri \u003d \u0027http://example.com/identity\u0027"},{"line_number":40,"context_line":"        conf_fixture.config(www_authenticate_uri\u003dwww_authenticate_uri,"}],"source_content_type":"text/x-python","patch_set":7,"id":"3f79a3b5_ec094f83","line":37,"range":{"start_line":37,"start_character":35,"end_line":37,"end_character":67},"in_reply_to":"3f79a3b5_0c44cb4d","updated":"2018-11-30 14:31:57.000000000","message":"Yeah, this is also from the wtf is going on phase. Basically it was very hard to find a clean way to non-globally register the middlware opts.\n\nI\u0027ll add some explanation.","commit_id":"9e7ff6d503a5a3d08a78621540b15d63c2e1f47b"}]}
