Commit Graph

9 Commits

Author SHA1 Message Date
Stephen Finucane ce5056ad3a db: Replace dict-style access of Row attributes
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>
2023-07-24 21:34:11 +00:00
Cyril Roelandt 0ca2f92161 Fix typos
Change-Id: I5e7776324c01e467799b1296c35b84dc0c10cce2
2021-10-13 03:02:52 +02:00
Zuul f094b7d2b2 Merge "tests: Remove use of 'oslo_db.sqlalchemy.test_base'" 2021-08-25 11:30:09 +00:00
Stephen Finucane 9e002a77f2 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 <sfinucan@redhat.com>
Related-Bug: #1939716
2021-08-16 11:57:29 +01:00
Stephen Finucane 815922fbee tests: Remove use of 'oslo_db.sqlalchemy.test_base'
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>
2021-07-28 16:40:17 +01:00
Brian Rosmaita 9363e0b0a1 Skip one functional test
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
2018-01-28 19:50:21 -05:00
Brian Rosmaita 5517049c0f Skip one functional test
Skip this test until Bug #1745003 is fixed.

Change-Id: I725c228b82efd408b283854c1be2d1bdab33a834
Related-bug: #1745003
2018-01-23 14:31:50 -05:00
Alexander Bashmakov 15817166ab Fix experimental E-M-C migrations
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
2017-03-06 21:45:56 +00:00
Hemanth Makkapati 9859df2d1f Add expand/migrate/contract migrations for CI
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
2017-02-02 00:16:04 +00:00