)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"17802a80256a40f5ccc1ddf1804f3d193b3a04b8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"50f07c08_d98d72bd","updated":"2022-02-11 17:15:58.000000000","message":"-W because there are randomly failing tests here that don\u0027t fail if run individually...\n\n@Mike If you have any time next week, could you take a look at this. I\u0027m seeing randomly failing tests because the database is in a different state to what I expect it to be. It seems something is deleting my database. It\u0027s weird though, because I\u0027m using the oslo.db fixtures which should be monkey patching my global enginefacade instance with a local replacement. Tough to debug because I can\u0027t reproduce locally without running all the tests (which is slow)","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"aa061331610dd498ee11d289317dfab30f2d798a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"551992ad_5aedc258","updated":"2022-02-11 17:42:13.000000000","message":"there\u0027s a lot here and I\u0027m not really familiar with what we\u0027re doing here (like what\u0027s a \"Banned operation\"?)  I guess this is mostly deriving from neutrons methodology?","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"f1eec86f3e3b4992c69ccf744c2782a9b71103cb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"639b2799_86a2501a","in_reply_to":"50f07c08_d98d72bd","updated":"2022-02-11 17:37:51.000000000","message":"OK....do you get failures if you run all migration tests for MySQL ?   like the whole TestKeystoneExpandSchemaMigrationsMySQL suite","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59c81878b2ea359e4b21b8dc699d596378a121cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"1a756f24_1c782628","in_reply_to":"551992ad_5aedc258","updated":"2022-02-11 17:58:21.000000000","message":"Mostly from neutron, yeah. The banned operation is a hangover from keystone though. You could drop that entirely (it wasn\u0027t in the previous revision but things were still failing).","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59c81878b2ea359e4b21b8dc699d596378a121cd","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"b097bde9_45f970a9","in_reply_to":"639b2799_86a2501a","updated":"2022-02-11 17:58:21.000000000","message":"Nope. The tests I\u0027m seeing failing are from the test modules modified here, \u0027keystone/tests/unit/test_sql_upgrade.py\u0027, \u0027keystone/tests/unit/test_sql_banned_operations.py\u0027, and \u0027keystone/tests/unit/common/sql/test_upgrades.py\u0027\n\nIf I run all tests with MySQL in the name (e.g. \u0027tox -e py38 -- MySQL\u0027, which resolves to \u0027stestr run MySQL\u0027 and finds tests using test discovery) then all 64 tests run (62 pass, 2 skip).","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"b53e35f524b8b8ecec7caa35bf51fb2e8a3776c0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"fbeea52f_15703c05","in_reply_to":"b097bde9_45f970a9","updated":"2022-02-11 18:40:18.000000000","message":"Blacklisting the \u0027keystone.tests.unit.common.sql.test_upgrades\u0027 (which is mostly new tests) doesn\u0027t help, unfortunately. Still seeing 6 failures locally\n\n  $ tox -e py38 -- --exclude-regex keystone.tests.unit.common.sql.test_upgrades\n\nneither does blacklisting \u0027test_sql_banned_operations\u0027:\n\n  $ tox -e py38 -- --exclude-regex keystone.tests.unit.test_sql_banned_operations","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"92cc6acb545c5ef1e857d341201d17071a5c30c3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"062730ae_991fee1a","updated":"2022-07-18 09:41:21.000000000","message":"I think this is good to go now?","commit_id":"f174b4fa7c4fb010bbacc8c5a5f3625a8fcb41f3"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"0ffaa5d5dace659254b9748f5a41f3db3263e779","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"ca225841_d7c1bcc3","in_reply_to":"062730ae_991fee1a","updated":"2022-07-18 09:53:42.000000000","message":"+1","commit_id":"f174b4fa7c4fb010bbacc8c5a5f3625a8fcb41f3"}],"keystone/common/sql/migrations/env.py":[{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"aa061331610dd498ee11d289317dfab30f2d798a","unresolved":true,"context_lines":[{"line_number":76,"context_line":"        context.configure("},{"line_number":77,"context_line":"            connection\u003dconnection,"},{"line_number":78,"context_line":"            target_metadata\u003dtarget_metadata,"},{"line_number":79,"context_line":"            render_as_batch\u003dTrue,"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        with context.begin_transaction():"}],"source_content_type":"text/x-python","patch_set":5,"id":"2aaa3d54_f05678dc","line":79,"updated":"2022-02-11 17:42:13.000000000","message":"how come render as batch?  this changes things a lot","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"99de7d55818f3048a69abf116531b9c44ff44835","unresolved":true,"context_lines":[{"line_number":76,"context_line":"        context.configure("},{"line_number":77,"context_line":"            connection\u003dconnection,"},{"line_number":78,"context_line":"            target_metadata\u003dtarget_metadata,"},{"line_number":79,"context_line":"            render_as_batch\u003dTrue,"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        with context.begin_transaction():"}],"source_content_type":"text/x-python","patch_set":5,"id":"7aad8e23_2a871cbf","line":79,"in_reply_to":"0a4df7ae_592dc8be","updated":"2022-06-28 15:53:35.000000000","message":"OK so render as batch applies to the \"alembic autogenerate\" function, which is a code generation function.  When this runs, it\u0027s comparing the current ORM model in this case to what\u0027s present in a live database and generating Python code that it puts into a .py file.   \n\nThe thing that the directive does is it causes operations that alter tables to be rendered inside of a \"batch_op\" code block.   So the immediate effect is that it changes the structure of the generated Python code.   The code is rendered that way regardless of what database backend is in use because render_as_batch\u003dTrue means to do it.\n\nSo, what happens then ?  The \"batch_op\" code block itself is essentially a no-op for PostgreSQL and MySQL, assuming its arguments are left at their defaults.\n\nSo basically, render_as_batch should not have any effect on MySQL and PostgreSQL, but it instead determines how the generated .py files look.\n\nIf we are indeed migrating from sqlalchemy-migrate to SQlite, then yes it seems likely this needs to be present.  where I dont know as much what\u0027s happening here is that keystone already has alembic code going on within it, so I dont really understand the pre-existing combination of sqlalchemy-migrate and alembic that was here previously.","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59c81878b2ea359e4b21b8dc699d596378a121cd","unresolved":true,"context_lines":[{"line_number":76,"context_line":"        context.configure("},{"line_number":77,"context_line":"            connection\u003dconnection,"},{"line_number":78,"context_line":"            target_metadata\u003dtarget_metadata,"},{"line_number":79,"context_line":"            render_as_batch\u003dTrue,"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        with context.begin_transaction():"}],"source_content_type":"text/x-python","patch_set":5,"id":"ce8ab7b9_ffb373ed","line":79,"in_reply_to":"2aaa3d54_f05678dc","updated":"2022-02-11 17:58:21.000000000","message":"I needed this in nova to allow the auto-generated migrations to work with SQLite, which is used for most of the tests. afaict, it should have no effect for MySQL or PostgreSQL (i.e. production) backends, right?","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"0ffaa5d5dace659254b9748f5a41f3db3263e779","unresolved":false,"context_lines":[{"line_number":76,"context_line":"        context.configure("},{"line_number":77,"context_line":"            connection\u003dconnection,"},{"line_number":78,"context_line":"            target_metadata\u003dtarget_metadata,"},{"line_number":79,"context_line":"            render_as_batch\u003dTrue,"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        with context.begin_transaction():"}],"source_content_type":"text/x-python","patch_set":5,"id":"d412de81_c1229480","line":79,"in_reply_to":"7aad8e23_2a871cbf","updated":"2022-07-18 09:53:42.000000000","message":"That makes sense, thanks for the detailed analysis!","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":14250,"name":"Grzegorz Grasza","email":"xek@redhat.com","username":"xek"},"change_message_id":"cf40c93511f3533cd3b4aa21399ab4f1310e9c48","unresolved":true,"context_lines":[{"line_number":76,"context_line":"        context.configure("},{"line_number":77,"context_line":"            connection\u003dconnection,"},{"line_number":78,"context_line":"            target_metadata\u003dtarget_metadata,"},{"line_number":79,"context_line":"            render_as_batch\u003dTrue,"},{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        with context.begin_transaction():"}],"source_content_type":"text/x-python","patch_set":5,"id":"0a4df7ae_592dc8be","line":79,"in_reply_to":"ce8ab7b9_ffb373ed","updated":"2022-06-28 09:43:02.000000000","message":"As this is marked as unresolved, Mike and/or Stephen, can you confirm that this parameter is ignored in MySQL and PostrgreSQL connections? The documentation points out this was implemented for SQLite, but it doesn\u0027t say you can\u0027t use it with other drivers... I would have to test it out to know the real behavior.","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"}],"keystone/common/sql/upgrades.py":[{"author":{"_account_id":11816,"name":"mike_mp@zzzcomputing.com","display_name":"Mike Bayer","email":"mike_mp@zzzcomputing.com","username":"zzzeek","status":"Red Hat"},"change_message_id":"aa061331610dd498ee11d289317dfab30f2d798a","unresolved":true,"context_lines":[{"line_number":207,"context_line":"    # \"%\" is the special python interpolation character! Avoid this"},{"line_number":208,"context_line":"    # mismatch by quoting all %\u0027s for the set below."},{"line_number":209,"context_line":"    engine_url \u003d str(engine.url).replace(\u0027%\u0027, \u0027%%\u0027)"},{"line_number":210,"context_line":"    config.set_main_option(\u0027sqlalchemy.url\u0027, str(engine_url))"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    migrate_version \u003d None"},{"line_number":213,"context_line":"    if _is_database_under_migrate_control(engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"e9c14954_77fdc74e","line":210,"updated":"2022-02-11 17:42:13.000000000","message":"this is from somewhere else right?  i forget the background on this","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59c81878b2ea359e4b21b8dc699d596378a121cd","unresolved":true,"context_lines":[{"line_number":207,"context_line":"    # \"%\" is the special python interpolation character! Avoid this"},{"line_number":208,"context_line":"    # mismatch by quoting all %\u0027s for the set below."},{"line_number":209,"context_line":"    engine_url \u003d str(engine.url).replace(\u0027%\u0027, \u0027%%\u0027)"},{"line_number":210,"context_line":"    config.set_main_option(\u0027sqlalchemy.url\u0027, str(engine_url))"},{"line_number":211,"context_line":""},{"line_number":212,"context_line":"    migrate_version \u003d None"},{"line_number":213,"context_line":"    if _is_database_under_migrate_control(engine):"}],"source_content_type":"text/x-python","patch_set":5,"id":"3c13b086_4a79950b","line":210,"in_reply_to":"e9c14954_77fdc74e","updated":"2022-02-11 17:58:21.000000000","message":"Yup, nova [1]. I know neutron does this slightly differently, though I can\u0027t recall off the top of my head how.\n\n[1] https://github.com/openstack/nova/blob/232f8275ec00767d1f100cacae4823e6f77e04ef/nova/db/migration.py#L131-L139","commit_id":"7df6b705f91ed1b524b3fa61ac1475b5f114e0d5"}]}
