)]}'
{"blazar/db/sqlalchemy/api.py":[{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"10ce9772aebf4fe281cf03cb07136a9174fd89be","unresolved":true,"context_lines":[{"line_number":57,"context_line":"def setup_db():"},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        engine \u003d db_session.EngineFacade(cfg.CONF.database.connection,"},{"line_number":60,"context_line":"                                         sqlite_fk\u003dTrue).get_engine()"},{"line_number":61,"context_line":"        models.Lease.metadata.create_all(engine)"},{"line_number":62,"context_line":"    except sa.exc.OperationalError as e:"},{"line_number":63,"context_line":"        LOG.error(\"Database registration exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":3,"id":"e1219f6e_4006ff9f","side":"PARENT","line":60,"updated":"2024-03-04 11:50:02.000000000","message":"``sqlite_fk\u003dTrue`` dropping this resolved the failing unit tests, but I need to investigate this further to understand the implications fully.","commit_id":"9aa976ae13384da92f28d3812a50d39e0a8a3798"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"95c97727baf045544c40bad8e9a32875708f6bef","unresolved":true,"context_lines":[{"line_number":57,"context_line":"def setup_db():"},{"line_number":58,"context_line":"    try:"},{"line_number":59,"context_line":"        engine \u003d db_session.EngineFacade(cfg.CONF.database.connection,"},{"line_number":60,"context_line":"                                         sqlite_fk\u003dTrue).get_engine()"},{"line_number":61,"context_line":"        models.Lease.metadata.create_all(engine)"},{"line_number":62,"context_line":"    except sa.exc.OperationalError as e:"},{"line_number":63,"context_line":"        LOG.error(\"Database registration exception: %s\", e)"}],"source_content_type":"text/x-python","patch_set":3,"id":"2e52afd3_51a70f1c","side":"PARENT","line":60,"in_reply_to":"e1219f6e_4006ff9f","updated":"2024-03-04 16:14:21.000000000","message":"It seems that in the current state, we only set ``sqlite_fk\u003dTrue`` on engine creation during ``setup_db`` and ``drop_db``. It is not specified in session creation. I\u0027ve updated this patch to reflect this behaviour.\n\nI\u0027m not sure we actually want to keep doing this going forward, as enforcing foreign key constraints seems preferable, but imo changing this behaviour should be split into a follow-up patch as it is not related to the SQLAlchemy 2.x version bump.","commit_id":"9aa976ae13384da92f28d3812a50d39e0a8a3798"}]}
