Fix database migrations and disable the non-standalone job
The pattern of adding a column and then reading a table with it
no longer works in SQLAlchemy 1.3.20. This has been reported
upstream [1] and apparently we're doing the wrong thing by reusing
a column object twice.
We need to disable the non-standalone job since it's really broken
now, and this fix is blocking bifrost.
[1] https://github.com/sqlalchemy/sqlalchemy/issues/5669
Change-Id: I2fb07413e8f421f39b24acf1272771ee2097b195
(cherry picked from commit 5678f219cd
)
This commit is contained in:
parent
2c85396dd8
commit
77a3bd9159
|
@ -63,7 +63,8 @@ def upgrade():
|
|||
node_uuid_column = sa.Column(NODE_UUID, sa.String(36))
|
||||
op.add_column(ATTRIBUTES, node_uuid_column)
|
||||
|
||||
attributes = sa.table(ATTRIBUTES, node_uuid_column,
|
||||
attributes = sa.table(ATTRIBUTES,
|
||||
sa.Column(NODE_UUID, sa.String(36)),
|
||||
sa.Column(UUID, sa.String(36)))
|
||||
|
||||
with op.batch_alter_table(ATTRIBUTES,
|
||||
|
|
|
@ -32,17 +32,22 @@ depends_on = None
|
|||
|
||||
|
||||
def upgrade():
|
||||
started_at = sa.Column('started_at', sa.types.Float, nullable=True)
|
||||
finished_at = sa.Column('finished_at', sa.types.Float, nullable=True)
|
||||
temp_started_at = sa.Column("temp_started_at", sa.types.DateTime,
|
||||
nullable=True)
|
||||
temp_finished_at = sa.Column("temp_finished_at", sa.types.DateTime,
|
||||
nullable=True)
|
||||
uuid = sa.Column("uuid", sa.String(36), primary_key=True)
|
||||
|
||||
op.add_column("nodes", temp_started_at)
|
||||
op.add_column("nodes", temp_finished_at)
|
||||
|
||||
uuid = sa.Column("uuid", sa.String(36), primary_key=True)
|
||||
started_at = sa.Column('started_at', sa.types.Float, nullable=True)
|
||||
finished_at = sa.Column('finished_at', sa.types.Float, nullable=True)
|
||||
# NOTE(dtantsur): do not reuse the column objects from add_column
|
||||
temp_started_at = sa.Column("temp_started_at", sa.types.DateTime,
|
||||
nullable=True)
|
||||
temp_finished_at = sa.Column("temp_finished_at", sa.types.DateTime,
|
||||
nullable=True)
|
||||
t = sa.table('nodes', started_at, finished_at,
|
||||
temp_started_at, temp_finished_at, uuid)
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes database migrations with SQLAlchemy 1.3.20.
|
|
@ -13,7 +13,8 @@
|
|||
- ironic-inspector-tempest
|
||||
- ironic-inspector-tempest-discovery
|
||||
- ironic-inspector-tempest-python3
|
||||
- ironic-inspector-non-standalone-tempest-python3
|
||||
- ironic-inspector-non-standalone-tempest-python3:
|
||||
voting: false
|
||||
- openstack-tox-functional
|
||||
- openstack-tox-functional-py36
|
||||
- bifrost-integration-tinyipa-ubuntu-xenial
|
||||
|
@ -26,7 +27,6 @@
|
|||
- ironic-inspector-tempest
|
||||
- ironic-inspector-tempest-discovery
|
||||
- ironic-inspector-tempest-python3
|
||||
- ironic-inspector-non-standalone-tempest-python3
|
||||
- openstack-tox-functional
|
||||
- openstack-tox-functional-py36
|
||||
- bifrost-integration-tinyipa-ubuntu-xenial
|
||||
|
|
Loading…
Reference in New Issue