)]}'
{"nova/db/sqlalchemy/migrate_repo/versions/231_add_ephemeral_key_uuid.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    shadow_instances.create_column(ephemeral_key_uuid.copy())"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    migrate_engine.execute(instances.update()."},{"line_number":32,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"},{"line_number":33,"context_line":"    migrate_engine.execute(shadow_instances.update()."},{"line_number":34,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"}],"source_content_type":"text/x-python","patch_set":4,"id":"b44416a6_b00ec4e8","side":"PARENT","line":32,"updated":"2021-01-19 13:25:18.000000000","message":"I don\u0027t see where you nullify all the records for this column in https://review.opendev.org/c/openstack/nova/+/758394/4/nova/db/sqlalchemy/migrate_repo/versions/234_icehouse.py","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d2195fd94178c02e5825d0a172f5e082f0f895c8","unresolved":false,"context_lines":[{"line_number":29,"context_line":"    shadow_instances.create_column(ephemeral_key_uuid.copy())"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    migrate_engine.execute(instances.update()."},{"line_number":32,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"},{"line_number":33,"context_line":"    migrate_engine.execute(shadow_instances.update()."},{"line_number":34,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"}],"source_content_type":"text/x-python","patch_set":4,"id":"4ebf2607_3b1d15e1","side":"PARENT","line":32,"in_reply_to":"087e95b8_3856a858","updated":"2021-01-19 14:33:08.000000000","message":"Remember, we\u0027re moving this into the base migration, which means it will only ever run now when setting up a new deployment. For a new database set-up the answer is no, this is not possible. There couldn\u0027t be any non-null records as there aren\u0027t *any* records in the database at that point. The database doesn\u0027t even exist yet (we\u0027re setting it up)","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"7de01d88ebfe5a5588618c3c9ed9a05466ff5f71","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    shadow_instances.create_column(ephemeral_key_uuid.copy())"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    migrate_engine.execute(instances.update()."},{"line_number":32,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"},{"line_number":33,"context_line":"    migrate_engine.execute(shadow_instances.update()."},{"line_number":34,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"}],"source_content_type":"text/x-python","patch_set":4,"id":"087e95b8_3856a858","side":"PARENT","line":32,"in_reply_to":"41c377d9_4f740dec","updated":"2021-01-19 14:27:56.000000000","message":"Well, the column is nullable *by default*, so I agree with you, any records should get a NULL value for this field. I was just wondering whether this could be possible to *not* have a NULL value for the record, but maybe it\u0027s just a bikeshed.","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"aa415ceb9bd995ba88eefbe1e929f2c10a4e0f63","unresolved":true,"context_lines":[{"line_number":29,"context_line":"    shadow_instances.create_column(ephemeral_key_uuid.copy())"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"    migrate_engine.execute(instances.update()."},{"line_number":32,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"},{"line_number":33,"context_line":"    migrate_engine.execute(shadow_instances.update()."},{"line_number":34,"context_line":"                           values(ephemeral_key_uuid\u003dNone))"}],"source_content_type":"text/x-python","patch_set":4,"id":"41c377d9_4f740dec","side":"PARENT","line":32,"in_reply_to":"b44416a6_b00ec4e8","updated":"2021-01-19 14:22:25.000000000","message":"I don\u0027t think this was ever necessary and it\u0027s almost certainly not required here. This sets the default value of this to column to null for all rows, however, this column is nullable which means the column is _already_ populated with null values. My Google-fu isn\u0027t sufficient to find definitive docs from sqla stating that \u0027String\u0027 defaults to nullable, but I proved so with the below script:\n\n  $ cat test.py\n  from sqlalchemy import create_engine\n  from sqlalchemy.ext.declarative import declarative_base\n  from sqlalchemy import Column, Integer, String\n\n  Base \u003d declarative_base()\n\n  class Message(Base):\n      __tablename__ \u003d \u0027messages\u0027\n\n      id \u003d Column(Integer, primary_key\u003dTrue)\n      message \u003d Column(String)\n\n  engine \u003d create_engine(\u0027sqlite:///test.db\u0027)\n  Base.metadata.create_all(engine)\n\nYou can run this to generate a sample DB, and then inspect the schema of that DB to ensure the field has no \"NOT NULL\" constraint in effect, like so:\n\n  $ ./test.py\n  $ sqlite3 test.db\n  sqlite\u003e .output test.sql\n  sqlite\u003e .dump\n  sqlite\u003e .quit\n  $ cat test.sql\n  PRAGMA foreign_keys\u003dOFF;\n  BEGIN TRANSACTION;\n  CREATE TABLE messages (\n          id INTEGER NOT NULL, \n          message VARCHAR, \n          PRIMARY KEY (id)\n  );\n  COMMIT\n\nAs a general point, this pattern _might_ make sense if we wanted to populate the field with a non-null value (though I\u0027d be careful with that since it can take forever, as seen when we\u0027ve tried to use \u0027default\u0027 in the past [1]) but it wouldn\u0027t be necessary for the initial schema configuration since there would be no rows to populate.\n\n[1] Iace3f653b42c20887b40ee0105c8e9a4edeff1f7","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"}],"nova/db/sqlalchemy/migrate_repo/versions/234_icehouse.py":[{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c7233c2ca1942e5171985e96f726401db5c799b8","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"2cc96a9b_b6ae5eac","side":"PARENT","line":114,"updated":"2021-01-19 14:33:39.000000000","message":"mig 232","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":4,"id":"5b6e4041_fa87cbd4","side":"PARENT","line":273,"updated":"2021-01-19 13:25:18.000000000","message":"mig 233","commit_id":"4701d28da39f2fe843f90ce02084132de9170c52"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":80,"context_line":"        )"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        try:"},{"line_number":83,"context_line":"            shadow_table.create()"},{"line_number":84,"context_line":"        except Exception:"},{"line_number":85,"context_line":"            LOG.info(repr(shadow_table))"},{"line_number":86,"context_line":"            LOG.exception(\u0027Exception while creating table.\u0027)"}],"source_content_type":"text/x-python","patch_set":4,"id":"e88cbbea_64956c05","line":83,"updated":"2021-01-19 13:25:18.000000000","message":"note : for shadow tables creations, we automatically create them by copying the related table so when a new DB migration wants to create both the main table and the shadow one, we don\u0027t need to create the shadow table directly.","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":256,"context_line":"        Column(\u0027host_ip\u0027, InetSmall()),"},{"line_number":257,"context_line":"        Column(\u0027supported_instances\u0027, Text),"},{"line_number":258,"context_line":"        Column(\u0027pci_stats\u0027, Text, nullable\u003dTrue),"},{"line_number":259,"context_line":"        Column(\u0027metrics\u0027, Text, nullable\u003dTrue),"},{"line_number":260,"context_line":"        Column(\u0027extra_resources\u0027, Text, nullable\u003dTrue),"},{"line_number":261,"context_line":"        Column(\u0027stats\u0027, Text, default\u003d\u0027{}\u0027),"},{"line_number":262,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"c5ded8ee_3e160ffe","line":259,"updated":"2021-01-19 13:25:18.000000000","message":"mig 228","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":257,"context_line":"        Column(\u0027supported_instances\u0027, Text),"},{"line_number":258,"context_line":"        Column(\u0027pci_stats\u0027, Text, nullable\u003dTrue),"},{"line_number":259,"context_line":"        Column(\u0027metrics\u0027, Text, nullable\u003dTrue),"},{"line_number":260,"context_line":"        Column(\u0027extra_resources\u0027, Text, nullable\u003dTrue),"},{"line_number":261,"context_line":"        Column(\u0027stats\u0027, Text, default\u003d\u0027{}\u0027),"},{"line_number":262,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":263,"context_line":"        mysql_charset\u003d\u0027utf8\u0027"}],"source_content_type":"text/x-python","patch_set":4,"id":"b2750c35_6bdc0da9","line":260,"updated":"2021-01-19 13:25:18.000000000","message":"mig 229","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":258,"context_line":"        Column(\u0027pci_stats\u0027, Text, nullable\u003dTrue),"},{"line_number":259,"context_line":"        Column(\u0027metrics\u0027, Text, nullable\u003dTrue),"},{"line_number":260,"context_line":"        Column(\u0027extra_resources\u0027, Text, nullable\u003dTrue),"},{"line_number":261,"context_line":"        Column(\u0027stats\u0027, Text, default\u003d\u0027{}\u0027),"},{"line_number":262,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":263,"context_line":"        mysql_charset\u003d\u0027utf8\u0027"},{"line_number":264,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"817229a1_07442bda","line":261,"updated":"2021-01-19 13:25:18.000000000","message":"mig 233","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":630,"context_line":"        Column(\u0027traceback\u0027, Text),"},{"line_number":631,"context_line":"        Column(\u0027deleted\u0027, Integer),"},{"line_number":632,"context_line":"        Column(\u0027host\u0027, String(255)),"},{"line_number":633,"context_line":"        Column(\u0027details\u0027, Text),"},{"line_number":634,"context_line":"        mysql_engine\u003d\u0027InnoDB\u0027,"},{"line_number":635,"context_line":"        mysql_charset\u003d\u0027utf8\u0027,"},{"line_number":636,"context_line":"    )"}],"source_content_type":"text/x-python","patch_set":4,"id":"f39a1eb0_dea42d79","line":633,"updated":"2021-01-19 13:25:18.000000000","message":"mig 230","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"81c2d2b1d449b1b14b8ccb33019eca7bd38eefa2","unresolved":true,"context_lines":[{"line_number":812,"context_line":"        Column(\u0027deleted\u0027, Integer),"},{"line_number":813,"context_line":"        Column(\u0027user_id\u0027, String(length\u003d255), nullable\u003dFalse),"},{"line_number":814,"context_line":"        Column(\u0027project_id\u0027, String(length\u003d255), nullable\u003dFalse),"},{"line_number":815,"context_line":"        Column(\u0027resource\u0027, String(length\u003d255), nullable\u003dFalse),"},{"line_number":816,"context_line":"        Column(\u0027hard_limit\u0027, Integer, nullable\u003dTrue),"},{"line_number":817,"context_line":"        UniqueConstraint("},{"line_number":818,"context_line":"            \u0027user_id\u0027, \u0027project_id\u0027, \u0027resource\u0027, \u0027deleted\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"e28e0961_1c377aca","line":815,"updated":"2021-01-19 13:25:18.000000000","message":"it\u0027s already a VARCHAR(255) so we don\u0027t need to change this for mig 227","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"},{"author":{"_account_id":7166,"name":"Sylvain Bauza","email":"sbauza@redhat.com","username":"sbauza"},"change_message_id":"c7233c2ca1942e5171985e96f726401db5c799b8","unresolved":true,"context_lines":[{"line_number":1279,"context_line":"              reservations.c.user_id, reservations.c.deleted),"},{"line_number":1280,"context_line":"        Index(\u0027reservations_uuid_idx\u0027, reservations.c.uuid),"},{"line_number":1281,"context_line":"        Index(\u0027reservations_deleted_expire_idx\u0027,"},{"line_number":1282,"context_line":"              reservations.c.deleted, reservations.c.expire),"},{"line_number":1283,"context_line":""},{"line_number":1284,"context_line":"        # security_group_instance_association"},{"line_number":1285,"context_line":"        Index(\u0027security_group_instance_association_instance_uuid_idx\u0027,"}],"source_content_type":"text/x-python","patch_set":4,"id":"c54cf4a8_56a8e201","line":1282,"updated":"2021-01-19 14:33:39.000000000","message":"mig 234","commit_id":"833b7b60dd3e6cb1763de4f11a327243fe252ea9"}]}
