Glance compatibility with SQLAlchemy 2.x

Bug #1939716 reported by Abhishek Kekane
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
New
High
Unassigned

Bug Description

Oslo.db has started putting efforts to support SQLAlchemy 2.x [1]. Our oslo-tips job, 'glance-tox-functional-py36-oslo-tips' and 'glance-tox-functional-py38-oslo-tips' started to fail as we also need to make similar changes to support SQLAlchemy 2.x. This bug will track efforts for the same.

[1] https://review.opendev.org/q/topic:%22sqlalchemy-20%22+(status:open%20OR%20status:merged)

Changed in glance:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/804406
Committed: https://opendev.org/openstack/glance/commit/f374022359793dbcd7346743e4345ab4ab9fcb79
Submitter: "Zuul (22348)"
Branch: master

commit f374022359793dbcd7346743e4345ab4ab9fcb79
Author: Stephen Finucane <email address hidden>
Date: Thu Aug 12 15:59:32 2021 +0100

    Resolve compatibility with oslo.db future

    Change I468048c01455d9dfe12004736c181806dc218e37 in oslo.db means that
    the table returned from 'oslo_db.utils.get_table' is no longer bound to
    a 'Connection' or 'Engine'. Get out ahead of this breaking change by
    creating out own 'Connection' as part of the test. Note that we use
    'Connection.execute' instead of 'Engine.execute' as the latter is
    deprecated in SQLAlchemy 1.4 for removal in 2.0.

    Related-Bug: #1939716

    Change-Id: I957d2a9d7c875120bed0022ce1e953b2ec9f97cd
    Signed-off-by: Stephen Finucane <email address hidden>

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.opendev.org/c/openstack/glance/+/804407
Committed: https://opendev.org/openstack/glance/commit/870f13098948783341d51e097882759d788d20a3
Submitter: "Zuul (22348)"
Branch: master

commit 870f13098948783341d51e097882759d788d20a3
Author: Stephen Finucane <email address hidden>
Date: Thu Aug 12 16:04:02 2021 +0100

    setup.cfg: Fix errant key

    The author of change I08c014e10c3fc54046930ea8be2b13775428e51b fat
    fingered the replacement of 'python-requires' with 'python_requires'
    resulting in the following warning:

      UserWarning: Usage of dash-separated 'python-r_quires' will not be
      supported in future versions. Please use the underscore name
      'python_r_quires' instead

    Not sure how setuptools was still identifying but resolve it
    nonetheless.

    Related-Bug: #1939716

    Change-Id: I293919d6dc93bf221eae9109fd4a658d332bdca8
    Signed-off-by: Stephen Finucane <email address hidden>

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Now glance-tox-functional-py36-oslo-tips and glance-tox-functional-py38-oslo-tips job is failing with another error,

sqlalchemy.exc.UnboundExecutionError: This Select is not directly bound to a Connection or Engine. Use the .execute() method of a Connection or Engine to execute this construct.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to glance (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/glance/+/804699

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to glance (master)

Reviewed: https://review.opendev.org/c/openstack/glance/+/804699
Committed: https://opendev.org/openstack/glance/commit/9e002a77f2131d3594a2a4029a147beaf37f5b17
Submitter: "Zuul (22348)"
Branch: master

commit 9e002a77f2131d3594a2a4029a147beaf37f5b17
Author: Stephen Finucane <email address hidden>
Date: Mon Aug 16 11:44:30 2021 +0100

    Resolve compatibility with oslo.db future (redux)

    Build on change I957d2a9d7c875120bed0022ce1e953b2ec9f97cd by addressing
    additional issues introduced by future breaking changes in oslo.db. As
    with this change, the changes stem from the table returned from
    'oslo_db.utils.get_table' being no longer bound to a 'Connection' or
    'Engine'.

    Change-Id: Ic28bef6ad4e47a86e423a10e8479b60134cbb0a5
    Signed-off-by: Stephen Finucane <email address hidden>
    Related-Bug: #1939716

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.