| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
The fixtures have been available for a very long time now. We can drop
these.
Change-Id: I1e71150ba6daeba464b6ed8d46163f1f34959db3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|
|
|
|
|
|
| |
No need for this in a Python 3-only world.
Change-Id: I8923f2b87c1bd114b8c55210100c7485a0de8f28
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|
|
|
| |
Change-Id: Icb2c88dc18843cbf2f5be08d635d5ba10f36f360
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Raising warnings from an exception module can result in a rather
confusing message:
Running command: '/usr/bin/nova-scheduler '
/.../sqlalchemy/enginefacade.py:332: NotSupportedWarning: Configuration option(s) ['use_tpool'] not supported
exception.NotSupportedWarning
For someone not used to Python's 'warning' infrastructure, this can look
worse than it is, as seen at [1].
While this particular warning was resolved in change I4a5f8958c3e, it's
possible that a similar warning could be raised for other options. Best
to move this out of the 'exception' module and into something more
sensible.
[1] https://bugzilla.redhat.com/show_bug.cgi?id=1639423
Change-Id: I8e0480fb11123067a111ed6aeda6b47614615645
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|
|
|
|
| |
Change-Id: Idace3cbe1ac3c454443d1c786054dc8ff0b0e8b5
Closes-Bug: #1714842
|
|
|
|
|
|
|
|
| |
Enables new functionality for selecting InnoDB or MySQL Cluster
as a DB storage backend in OpenStack services.
Closes-Bug: 1564110
Change-Id: I9f1fd2a87fdf75332de2339d3ff4f08ce9220dcf
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add an exception filter to distinguish 'unknown database' errors from
other DBAPIError's. This effectively means we no longer
unconditionally print a traceback to logs, when someone tries to
connect to a database, that does not exist, but just raise a specific
exception instead and let the caller handle it.
Closes-Bug: #1631033
Change-Id: Iebc1ec1e8153917fbcde116d04bc171272993bbd
|
|
|
|
|
|
|
| |
This presents a system of reporting the ultimate "cause" in the
case that a MySQL failed SAVEPOINT rollback occurs.
Change-Id: Iea834429a0b8398f076b10426525a5c17dbf3c85
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| | |
This patches add a new exception type that is raised when an operation on a non
existing table is executed.
Change-Id: I931664987e359e7755b912ec25cb36f087ffcfa3
|
|/
|
|
|
|
|
| |
This patches add a new exception type that is raised when an operation on a non
existing constraint is executed.
Change-Id: Ib55a83b568bdb1c9139af27bd2fbf204508e15e4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In two recent commits we fixed the way .message class attribute was
used by passing it as an argument to __init__() of the base Exception
class instead.
Unfortunately, this currently breaks Heat unit tests on Py3K as
exception instances no longer provide .message attribute there.
Re-introduce .message properties only for exception classes that used
to have them to ensure the new oslo.db release do not change the
interface of exceptions.
Closes-Bug: #1542961
Change-Id: I5cae408555956d77e6cbb4e5e513c1c6c375d29d
|
|
|
|
|
|
|
|
| |
Just supply a default value None, to avoid breaking projects
who currently use this exception.
Closes-Bug: #1542671
Change-Id: Ia397cab309aa22a2a86964f2ff90a796c878b2e7
|
|
|
|
| |
Change-Id: I1455f55929aa3a6037138770d407d247397c062b
|
|
|
|
| |
Change-Id: I6bb1b567cf962fd1c694d112a15e830367af2889
|
|
|
|
| |
Change-Id: I0e11ee6ffc56ee0399ad930fc9da49c7f16ca67b
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check explicitly for the cases where no "sql_connection"
attribute was set when running _start(), so that the
lack of this parameter is documented by the
exception rather than failing into create_engine()
with an unclear failure mode.
If _start() fails as it will here, make sure _started
stays False so that repeated calls to _start() continue
to raise the same exception, rather than raising
attribute errors. When accessing the "session" or
"connection" attributes of the context when these
attributes were not requested by the decorator or
context manager, raise explicit exceptions
for each, rather than returning None which leads to
hard-to-debug NoneType errors.
Change-Id: Iadfbf4707daed4140285a3a472009f6863b18275
Closes-bug: 1477080
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This module presents a replacement for the EngineFacade
system. At the center is the oslo.db.sqlalchemy.enginefacade
module, which when imported, provides decorators and context
managers which perform all database and ORM connectivity
functions transparently. The docstrings as well
as the blueprint provide an introduction.
The patch includes a refactoring of sqlalchemy/session.py
into three dependent modules engines.py, orm.py and
enginefacade.py. This is to maintain a non-cyclical import
structure as well as to maintain the import behavior of
oslo.db overall, as some projects such as glance currently
have dependencies on this structure.
There is also a slimming down and attempt at modernizing
some very old documentation in session.py. The enginefacade
system should be preferred moving forward.
Implements: blueprint make-enginefacade-a-facade
Change-Id: I9a3d0c26bb727eb2c0bd823b9a12fde57cc7c9c3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
PostgreSQL offers CHECK constraints integrity which are currently raised
as generic error. This patch add a filter so they can have their own
exception type.
Change-Id: I7e36ef4385b227d1e62e18277d470047a369a238
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We currently don't distinguish DB errors, that are due to problems
with the processed data (like division by zero, numeric value out
of range, incorrect data type passed, etc)
This actually led to a problem when MySQL threw two different errors
depending on the randomly generated UUID value and we wrapped only
one of those cases properly, which caused the test case to fail time
to time in the gate.
Closes-Bug: #1442178
Change-Id: I02891f3b1ede6f33834e5637be43496499cc88e7
|
|
|
|
|
|
|
|
|
| |
Improve retrying decorator such that wrapped code could request
retry attempt in the arbitrary conditions by raising RetryRequest
exception. Wrapped code should provide inner exception that is
raised when amount of retries are exceeded.
Change-Id: I596fea8dc798a11fcdfdd69208af3313f41d755b
|
|
Move the public API out of oslo.db to oslo_db. Retain the ability to
import from the old namespace package for backwards compatibility for
this release cycle.
Blueprint: drop-namespace-packages
Change-Id: Ie96b482b9fbcb1d85203ad35bb65c1f43e912a44
|