| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the function expects that sort_keys will contain 'id',
otherwise a warning is triggered. This assumption is wrong in multiple
ways. First, models may not have an 'id' attribute. Second, even if the
attribute is present, it may be non-unique irrespective of the name
chosen for it.
The right way of determining sorting keys that would not guarantee
stable sorting order for paginated results is to extract sets of unique
keys from the model itself, and compare sorting keys to those extracted
sets. If at least one of those unique key sets is a subset of passed
sorting keys, then no warning should be issued.
The patch also add _get_unique_keys function but, in contrast to its
Ocata version, does *not* expose it as part of library public API, and
makes it explicit it's not part of it, by using the leading underscore
in its name. The rationale behind that is that we don't want to expose
new features in Newton if possible. The function is a modified version
of a function with a similar name (get_unique_keys) currently maintained
in Neutron tree for similar needs.
To avoid calculating the same result over and over on each call to the
new function, we cache it in info dict of the relevant Table.
Change-Id: I46d9d53ee5f6fa2863b31027fa81997571d6568a
Closes-Bug: #1617996
(cherry picked from commit dea700d13e4c152bf1a484b62cc2bce329ef6fa9)
|
|
|
|
|
|
|
|
|
|
| |
PyMySQL 0.7.7 changed the string format of the error raised, making
oslo.db unable to catch the error:
(pymysql.err.IntegrityError) (1452, u'23000Cannot add or update a child row: a foreign key constraint fails (`vaceciqnzs`.`resource_entity`, CONSTRAINT `foo_fkey` FOREIGN KEY (`foo_id`) REFERENCES `resource_foo` (`id`))') [SQL: u'INSERT INTO resource_entity (id, foo_id) VALUES (%(id)s, %(foo_id)s)'] [parameters: {'foo_id': 2, 'id': 1}]
Change-Id: Ice7d7767842225951eaf48b71cedb2aabe5a84e4
(cherry picked from commit 1f3d509cab8c5d31f2ecd11561e1117d8c58316e)
|
|
|
|
| |
Change-Id: I6b366e0918baf7b0ef79ffa1d7bfcbf7b74a2b4a
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is part of a series which allows enginefacade
to be at the base of database provisioning.
Test fixtures are not impacted here, however
the global "enginefacade" is used to generate
database connections in provision.py
Change-Id: I94753ca103851e3fd79c1c6c9773f57e311a0273
|
|/
|
|
| |
Change-Id: I785f9994e616c0402370400e8a073a7f1a87161e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This adds to the provisioning system the ability
to preserve and re-display the full reason for a
particular DB backend not available, and propagates
this all the way through the skip() emitted
by the OpportunisticTestCase and DbFixture.
As part of the change, the database type requested
is added to the messages themselves, which
also appears in the messages emitted by the
consuming is_backend_avail() function, which
has tests that check for these explicit messages.
New tests specific to the Backend object are
added which are not dependent on is_backend_avail();
as this function is deprecated, we will be
able to remove its tests at the same time
as the function itself with no loss in coverage.
Change-Id: I7c00e0770b02aa751e184edfecdec4306de6340c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Many assertEqual sentences don't follow assertEqual(expected, actual),
These misplaces have 2 impacts:
1, giving confusing messages when some tests failed.
2, mislead other developers, new test modules may follow these wrong pattern.
This patch fix all of them.
Change-Id: Ia5155114c60f5e27cb00b8aba6de5cf32e046dd7
Closes-Bug: #1604213
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds new methods make_new_manager(), patch_factory(),
patch_engine(), to provide support to test fixtures that
wish to generate new managers from an existing one, and to
cross-patch managers, factories and engines into other managers.
Change-Id: I83c6296d992f08117fff1438bc079bbf71db787b
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ida04673890285af9c0b876c61a88693e6851932d
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Just in case mention the changes done in CR #318135, so that people
are aware of those (although, we've double checked everyone passes
the argument value explicitly now and that's the only reason the
decorator actually performs any retries in downstreams).
Change-Id: I263b2078535a3f06461e8905003b484a38d05f08
|
|\ \ \ \ \ |
|
| | |_|/ /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is follow up of commit 0a1bae9859079fb21a03716be947c5f1da6db0a2.
Log warning when pass keyword argument sqlite_db.
Related-Bug: #1329086
Change-Id: Ibed55dc9f28b7813bd96fb5e6f5138de0667591f
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Propagates logging_name through enginefacade.configure()
to create_engine(), as will be used in the enginefacade-based
test suite.
Change-Id: Iabc03adbef9792e0be4d86c98851890846638efc
|
|/ / /
| | |
| | |
| | | |
Change-Id: I32efc2a5a5810f915193ab9a49b5ccad74772f0d
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add on_engine_create argument to transaction_context to enable users
to take some actions with newly created engines. Main intended usage
is providing oslo.db and osprofiler users with a way to hook them
together without making them depend on each other.
Closes-bug: #1600739
Change-Id: I78bef4979c2000d05658ce17d0348cd0a10c24d9
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Pymysql can raise 'lock wait timeout exceeded' errors
as InternalErrors. The previous filter was only catching
OperationalError exceptions. This patch changes it to
catch all DatabaseErrors, which both of the aforementioned
exceptions inherit.
Change-Id: If7bd1ceef6e5d64f0766b780616388c62862ce82
Closes-Bug: #1608691
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I2ec090174889a9539229cfa3775621b39432db6c
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Removes the separate per-Python-interpreter
setup for the pifpaf run and consolidates necessary
variables in one place to be passed into a single command
line.
Change-Id: I2f34642f16d6dba5b01500fcdc89e88b93642cd3
|
|\ \ \ \ \ |
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This presents a system of reporting the ultimate "cause" in the
case that a MySQL failed SAVEPOINT rollback occurs.
Change-Id: Iea834429a0b8398f076b10426525a5c17dbf3c85
|
|/ / / /
| | | |
| | | |
| | | | |
Change-Id: Ie2e9b0b9507a85e899f68419d0686e03411be2e7
|
|/ / /
| | |
| | |
| | | |
Change-Id: Id85521335990acb47f65181724d6bdbf89d11c8b
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
py35 jobs are going to be run in the gate soon. Add py35 to the list
of defaut envs and add corresponding pifpaf environments for running
tests locally.
All py35 tests currently pass - we can effectively declare py35
compatibility via a new classifier in setup.cfg.
Change-Id: Iea7e286062f95d5c61b9ec1e7f6af4138fe3ce99
|
|\ \ \ \ |
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
The max_pool_size defaults to 5 instead of None. Setting this
option to 0 effective disables an upper limit to the pool.
Change-Id: I9a6918e1a808e9e70105d5b21d901bbe3d298f34
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I465a02f70301d9927ed8e875b410b22ee3b3d144
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's only needed for python < 2.7 which is not supported
Change-Id: If364adc5d266557c68c85b5dcfde4c6439a773f7
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Replaced all slashes in the paths with os.path.join,
so that they are compatible with Windows and Linux.
Change-Id: I65665a0f109d60b7a3e4187dd3c9409151d04ec7
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Openstack applications such as Neutron will refer to
the engine.pool.dispose() method in order to remove
any remaining connections, typically as part of
a test suite. Add a public-facing method to the context
and its underlying factory so this can be called without
underscore access.
Change-Id: I18b16e002a8507eb2eaa3a7f168e853b0ca17aa5
|
|\ \ \ \ \
| |/ / / /
|/| | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
There is a set allowable minimum and maximum to the connection_debug
option of 0 and 100. The config option should enforce this.
Change-Id: Ica610ad8fc0875a8be1042f7daba5d0a0c1aad03
|
|/ / /
| | |
| | |
| | | |
Change-Id: I3fa7441ceeecbb0af2f7b13046cdb1b339c6dc48
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
An exception message with None as an error message is not really useful. Since
DbMigrationError is also wrongly written with a lower case b whereas everything
else has a major B, let's create a new correct class and use it.
debtcollector is used to deprecate the old one, and inheritance makes sure the
current code works.
Change-Id: Id9a477aff38afd5b664b75a549ad561f4c24b6f0
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These types has the capacity of 2^32 and 2^24 bytes respectively
in mysql and are needed in various use-cases.
Change-Id: I498803eb0f294c0402666ee3911374a5d0399b82
Closes-Bug: #1599800
Related-Bug: https://bugs.launchpad.net/mistral/+bug/1438101
Related-Bug: https://bugs.launchpad.net/ironic/+bug/1596421
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We should use config option connection or slave_connection to connect
to the database. We can remove it when all consuming projects don't use
it anymore.
Related-Bug: #1329086
Change-Id: I1960e47b27b5f98f19a07f9899079269bac025cc
|