Test failure with SQLAlchemy master branch using TableClause.insert()

Bug #2030903 reported by Miro Tomaska
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Miro Tomaska

Bug Description

neutron-functional-with-sqlalchemy-master job[0] has failing tests with following traceback

"/home/zuul/src/opendev.org/openstack/neutron/neutron/db/migration/alembic_migrations/versions/2023.2/expand/c33da356b165_security_group_default_rules.py", line 125, in upgrade
    standardattr.insert({

    TypeError: TableClause.insert() takes 1 positional argument but 2 were given

This is due to SQLAlchemy 2.0 changing the insert function to return Insert construct[1] instead of TableClause construct [2]

[0] https://zuul.openstack.org/build/89f5e465495a4f0ab4674dced711fe15
[1] https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.TableClause.insert
[2] https://docs.sqlalchemy.org/en/14/core/selectable.html#sqlalchemy.sql.expression.TableClause.insert

Miro Tomaska (mtomaska)
Changed in neutron:
importance: Undecided → High
assignee: nobody → Miro Tomaska (mtomaska)
description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/neutron/+/890939

Changed in neutron:
status: New → In Progress
yatin (yatinkarel)
tags: added: functional-tests
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.opendev.org/c/openstack/neutron/+/890939
Committed: https://opendev.org/openstack/neutron/commit/43b4c9ebc52da5b1699cab919ad9db76ec275db9
Submitter: "Zuul (22348)"
Branch: master

commit 43b4c9ebc52da5b1699cab919ad9db76ec275db9
Author: Miro Tomaska <email address hidden>
Date: Thu Aug 10 12:08:38 2023 -0400

    [sqlalchemy-20] TableClause.insert constructs Insert object

    Replace with the sqalchemy insert [1] function which is
    compatible across versions

    [1] https://docs.sqlalchemy.org/en/20/core/dml.html#sqlalchemy.sql.expression.insert

    Closes-Bug: #2030903
    Change-Id: I0abc9c0dfc65e3e031246f514ff6e1e3593a00f4

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 23.0.0.0b3

This issue was fixed in the openstack/neutron 23.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.