Resolve the following RemovedIn20Warning:
Using non-integer/slice indices on Row is deprecated and will be
removed in version 2.0; please use row._mapping[<key>], or the
mappings() accessor on the Result object.
Change-Id: Ife8bdf766eb6d6fe9748565c9c61aa971d1af6f8
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
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 <sfinucan@redhat.com>
Related-Bug: #1939716
The various test cases and mixins in 'oslo_db.sqlalchemy.test_base' have
been deprecated since oslo.db 4.34.0 (March 2018). Remove use of these.
Change-Id: I6618366e6464d569a86fb027919be2e1825e438c
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Skip this test until Bug #1745003 is fixed. It's not a normal
skip; the skipping is done by commenting out the offending
assertions. That's because I725c228b82efd408b283854c1be2d1bdab33a834
appears to be completely ineffective, probably because of the
mixins used in the db functional tests.
Change-Id: I01bc954fc524d64cfeae67f8d03fe15f998893e6
Related-bug: #1745003
Two closely related issues were discovered in the code which prevent
the experimental E-M-C (rolling upgrade) migration feature introduced
in Ocata from working: a malformed select statement in the ocata
community images data migration (missing function parentheses)
and an incorrect revision dependency in the DB migration (should be
'ocata_expand01' instead of 'expand'. Also added a test for the case
where the Glance database is new/empty which illuminated this bug.
Closes-Bug: 1670409
Change-Id: I40ffaaa3fa2bae7a555a86d9f31422d79fb9bb19
This patch adds equivalent expand/migrate/contract migration scripts for
Community Images. The expand migration
'ocata_expand01_add_visibility.py' creates a new migration branch 'expand'
from the last known migration i.e., 'mitaka02'. Similarly, the contract
migration 'ocata_contract01_drop_is_public.py' creates another new
migration branch called 'contract' from the last known migration.
The data migration 'ocata_migrate01_community_images.py' migrates
all rows in the database at once. There is possibility of performance
degradation while the data migrations are running.
Change-Id: I34f5623d6804e9fe594e6b5b196ea4a162578196
Partially-Implements: blueprint database-strategy-for-rolling-upgrades
Co-Authored-By: Hemanth Makkapati <hemanth.makkapati@rackspace.com>
Depends-On: Ie839e0f240436dce7b151de5b464373516ff5a64