← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1926399] Re: UT failing with sqlalchemy 1.4

 

Reviewed:  https://review.opendev.org/c/openstack/manila/+/792303
Committed: https://opendev.org/openstack/manila/commit/6ace54c2601770a0e06418ce5b98c756c86f6a51
Submitter: "Zuul (22348)"
Branch:    master

commit 6ace54c2601770a0e06418ce5b98c756c86f6a51
Author: Goutham Pacha Ravi <gouthampravi@xxxxxxxxx>
Date:   Wed May 19 17:14:24 2021 -0700

    Fix with_entities usage in db queries
    
    In order to retrieve shares with filters
    pertaining to separate tables (shares, instances, metadata,
    etc), we need to perform joined loads of those
    respective database tables as necessary. After the
    join, the query cannot select entities due to
    Github issue #6253 - The following is an error when
    the pattern is used:
    
    sqlalchemy.exc.ArgumentError: Query has only expression-based entities - can't find property named "share_metadata".
    
    sqlalchemy 1.4 has a performance improvement that
    delays query processing [2] and disallows this
    pattern of usage; we can use a query.count() instead.
    
    In another instance, we can perform joins selectively
    only if asked for.
    
    [1] https://github.com/sqlalchemy/sqlalchemy/issues/625
    [2] https://docs.sqlalchemy.org/en/14/changelog/migration_14.html#many-core-and-orm-statement-objects-now-perform-much-of-their-construction-and-validation-in-the-compile-phase
    
    Change-Id: I8aa196c171bbc224cec06f517ea22c4e91cbc06a
    Closes-Bug: #1926399
    Signed-off-by: Goutham Pacha Ravi <gouthampravi@xxxxxxxxx>


** Changed in: manila
       Status: In Progress => Fix Released

** Bug watch added: github.com/sqlalchemy/sqlalchemy/issues #625
   https://github.com/sqlalchemy/sqlalchemy/issues/625

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1926399

Title:
  UT failing with sqlalchemy 1.4

Status in Cinder:
  Fix Released
Status in OpenStack Shared File Systems Service (Manila):
  Fix Released
Status in masakari:
  Fix Released
Status in neutron:
  Fix Released
Status in OpenStack Compute (nova):
  In Progress
Status in oslo.db:
  Fix Released

Bug description:
  See job cross-neutron-py36 in test patch
  https://review.opendev.org/c/openstack/requirements/+/788339/

  https://storage.bhs.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_ac7/788339/1/check
  /cross-neutron-py36/ac77335/testr_results.html

To manage notifications about this bug go to:
https://bugs.launchpad.net/cinder/+bug/1926399/+subscriptions


References