From eb728e877adc9ba9a6bc362b1db7893f15f44551 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Mon, 12 Jul 2021 15:34:26 +0100 Subject: db: Final cleanups Some things that were missed in previous patches and are thrown together here: - Add alembic as an explicit dependency (we were getting it transitively from oslo.db). We also bump the sqlalchemy dependency to a 1.4.x release, which is the minimum supported by our chosen version of alembic (more on this below) - Remove tooling related to the old migrations - Fix the tox whitelisting of the flaky MySQL tests On the SQLAlchemy front, we opt for 1.4.13. Technically alembic should support anything from 1.4.0, however, with SQLAlchemy >= 1.4.0, < 1.4.13 we see errors like the following in some tests: sqlalchemy.exc.InvalidRequestError: Entity namespace for "count(instance_mappings.id)" has no property "queued_for_delete" There's nothing specific about this in the release notes for 1.4.13 [1] but it definitely fixes things. [1] https://docs.sqlalchemy.org/en/14/changelog/changelog_14.html#change-1.4.13 Change-Id: I4c8eb13f11aa7471c26a5ba326319aef245c9836 Signed-off-by: Stephen Finucane --- tox.ini | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index d11a1d69e0..2b512e3d8c 100644 --- a/tox.ini +++ b/tox.ini @@ -32,11 +32,7 @@ passenv = # there is also secret magic in subunit-trace which lets you run in a fail only # mode. To do this define the TRACE_FAILONLY environmental variable. commands = -# NOTE(gibi): The group-regex runs the matching tests in the same executor. -# These tests runs against a real mysql instance and in an IO deprived CI VM they tend to time out. -# See bug https://launchpad.net/bugs/1823251 for details. -# By running them in the same executor we can spread the IO load of these tests in time. - stestr --group-regex=nova\.tests\.unit\.db\.test_migrations\.TestNovaMigrationsMySQL run {posargs} + stestr run {posargs} env TEST_OSPROFILER=1 stestr run --combine --no-discover 'nova.tests.unit.test_profiler' stestr slowest @@ -96,13 +92,7 @@ deps = {[testenv]deps} openstack-placement>=1.0.0 commands = -# NOTE(gibi): The group-regex runs the matching tests in the same executor. -# These tests runs against a real db instance and in an IO deprived CI VM they tend to time out. -# See bug https://launchpad.net/bugs/1823251 for details. -# By running them in the same executor we can spread the IO load of these tests in time. -# NOTE(gibi): I was not able to group only the mysql tests this way as regex -# TestNovaAPIMigrations.*MySQL does not do what I expect - stestr --group-regex=nova\.tests\.functional\.db\.api\.test_migrations\.TestNovaAPIMigrations --test-path=./nova/tests/functional run {posargs} + stestr --test-path=./nova/tests/functional run {posargs} stestr slowest [testenv:functional-py36] -- cgit v1.2.1