diff --git a/lower-constraints.txt b/lower-constraints.txt index 81fdb0fb0b..7a3b7e0eca 100644 --- a/lower-constraints.txt +++ b/lower-constraints.txt @@ -113,7 +113,7 @@ Routes==2.4.1 simplejson==3.13.2 six==1.15.0 snowballstemmer==1.2.1 -SQLAlchemy==1.3.1 +SQLAlchemy==1.3.17 sqlalchemy-migrate==0.11.0 sqlparse==0.2.4 statsd==3.2.2 diff --git a/manila/db/sqlalchemy/models.py b/manila/db/sqlalchemy/models.py index 81a388d149..245185ca98 100644 --- a/manila/db/sqlalchemy/models.py +++ b/manila/db/sqlalchemy/models.py @@ -805,6 +805,7 @@ class ShareSnapshotInstance(BASE, ManilaBase): ), viewonly=True, join_depth=2, + sync_backref=False, ) share_group_snapshot = orm.relationship( "ShareGroupSnapshot", @@ -815,6 +816,7 @@ class ShareSnapshotInstance(BASE, ManilaBase): 'ShareSnapshotInstance.share_group_snapshot_id'), viewonly=True, join_depth=2, + sync_backref=False, ) diff --git a/releasenotes/notes/bug-1924806-sqlalchemy-view-only-relationships-807d406cf8fac06c.yaml b/releasenotes/notes/bug-1924806-sqlalchemy-view-only-relationships-807d406cf8fac06c.yaml new file mode 100644 index 0000000000..1449ab2f02 --- /dev/null +++ b/releasenotes/notes/bug-1924806-sqlalchemy-view-only-relationships-807d406cf8fac06c.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + View-only relationships in database objects have been appropriately + tagged to avoid sqlalchemy deprecation messages flooding the log files. diff --git a/requirements.txt b/requirements.txt index 2c4b275cca..662bf42372 100644 --- a/requirements.txt +++ b/requirements.txt @@ -37,7 +37,7 @@ requests>=2.23.0 # Apache-2.0 retrying!=1.3.0,>=1.2.3 # Apache-2.0 Routes>=2.4.1 # MIT six>=1.15.0 # MIT -SQLAlchemy>=1.3.1 # MIT +SQLAlchemy>=1.3.17 # MIT stevedore>=3.2.2 # Apache-2.0 tooz>=2.7.1 # Apache-2.0 python-cinderclient!=4.0.0,>=3.3.0 # Apache-2.0