| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ife14a6acd01a16c4b1092b43fb94942db0e03036
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tests using DbFixture[1] are currently skipped if the database is
unavailable (no db service, no permissions, etc.) which is fine when
tests are runned by developers but not when runned by the gate jobs.
This change defines the attribute DbFixture.SKIP_ON_UNAVAILABLE_DB: when
the database is unvailable, tests are:
* skipped when SKIP_ON_UNAVAILABLE_DB=True (default, legacy behaviour),
* failed when SKIP_ON_UNAVAILABLE_DB=False.
[1] oslo.db.sqlalchemy.test_base
Change-Id: I067f46417fefe252c650e1e5e590e83547b11b6a
Closes-Bug: #1404093
|
|
|
|
| |
Change-Id: I1565e7fcbf64c4e317135d560c2cdc6b9c933c34
|
|
|
|
|
|
|
| |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I80c789ac29d7ffbf74c6c0ee9b92518f3fabd914
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
handle_connect_error() open and return a test connection, but nobody
uses it in create_engine(), so (depending on Python interpreter) this
connection can stay opened in the pool for some time.
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Change-Id: Ibef07f0fa1fec61aa10963c07c410a731d7758ef
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Now that requirements.txt is at SQLAlchemy 0.9.7 at the minimum,
we can remove the engine_connect compatibility module as well
as part of the handle_error compatibility module.
In particular, this gives us the ability to add and remove
engine_connect events using the event API directly which
can be handy in test fixtures.
Change-Id: I48450ad9d472d4377913ad391a0f5e3ba0f1471f
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
With this additional method, it now possible to write directly
dict(obj), instead of dict(obj.iteritems()), to cast an object to a
dictionary.
Modify also ModelIterator: it doesn't inherit from ModelBase anymore.
Change-Id: I702be362a58155a28482e733e60539d36c039509
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: Ia4993cd36fa1573c3ac28abe08ea7c665a8332c0
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
While inspect(mapping).all_orm_descriptors is a good
way to get at attributes that are known to be mapped or
otherwise described by SQLAlchemy, it does not produce a
SQL expression in the case of a hybrid descriptor, where it
produces the descriptor, not the result of calling it.
This fix ensures that the descriptor is evaulated, while
still retaining the fact that we check the attribute
as coming from an ORM-level descriptor.
Change-Id: I04a03be713348158b8cdfda683624fea01fe34ea
Closes-Bug: #1451880
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| |/ / /
| | | |
| | | |
| | | |
| | | |
| | | | |
This script is part of the oslotest package now.
Change-Id: Ic8c2fbaf5b34d2f254a9091a1b4390b7c8e751fe
|
|/ / /
| | |
| | |
| | | |
Change-Id: Iee9a84f36c33cb5d873ae71d59896e52d6ebbd98
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | | |
Change-Id: I618ce086bbc0942233e386f147f912e6bfc9c321
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I226b4993533c4ce4a9278075dbf50707429b9178
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Update to the version of hacking used in kilo and fix class declarations
that cause the new version to report errors.
Change-Id: I69c4976a2d611a19675cd5919d498abda7856a88
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add Python 3, 3.3 and 3.4 classifiers. The "Python :: 3" classifier is
needed by the caniusepython3 tool to check if dependencies of a project
are Python 3 compatible:
https://caniusepython3.com/
Information on the Python 3 port of OpenStack:
https://wiki.openstack.org/wiki/Python3
Change-Id: I2a0c8d7c3ab3c97a945a49b64a56341c35ec5536
|
| |/ /
|/| |
| | |
| | |
| | | |
Change-Id: Ic2a02e5b054fec76265576e1f4f23b20f5728125
Depends-On: Ib948b756b8e6ca47a4c9c44c48031e54b7386a06
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Also makes the docs look more like the other
oslo libraries so that the content is easily readable
across projects.
Change-Id: Idb17dd30403daa130176643f4609fdd7c61c076e
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Added a sanity_check call after the migration, so if a table in the
migration scripts is created not correctly the exception arise
before to go in production.
Closes-Bug: #1428065
Change-Id: Ib91f2471fa389a6072e8c2aa302504a6c068aa0a
|
|\ \ \ \
| |/ / /
|/| | | |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The current code only supports this type of constraint on INSERT, this
adds support for DELETE.
Change-Id: I981eb5f7b71bd37a35a93bbd3fada01d74aba12d
Closes-Bug: #1439358
|
|\ \ \ |
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In Gnocchi we use binary primary keys, and one a duplicate entry is
inserted the error is not catched. This patches fixes that.
Change-Id: I488628df1a3b91d842eb9fa76bc1878f12d37acd
Closes-Bug: #1368297
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | | |
Rather than repeating the library name, have the summary use proper
names instead.
Change-Id: Icf76c338c2420cb08fdebe291be131dc5383964a
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previous realization generates query string like:
`INSERT INTO tbl1 SELECT tbl2.ID, tbl2.name,
tbl2.currdate FROM tbl2;`. It doesn't specify
columns in INSERT clause. If tbl1 columns differs
from tbl2, execution of insert fails, or silently insert
data in incorrect columns. To fix this implementation of
class changed to default SQLAlchemy insert from select.
added extra parameter 'columns', which allows to determine
column order in INSERT clause.
Closes-Bug:#1430884
Change-Id: Ica5cdea10d9aa253f395ec553559dba54e062028
|
|\ \ \ \
| |_|/ /
|/| | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Such exception indicates of error condition only if
retries are exceeded. In other cases error-level logs
pollute the log file and complicate log analysis.
Change-Id: I318867043a68a6499851631593859a0fffac6038
Closes-Bug: #1433001
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This feature provides the query.update_on_match()
and query.update_returning_pk() methods, as well
as the manufacture_persistent_object(),
manufacture_entity_criteria(), and manufacture_criteria()
utility functions.
query.update_on_match() is used to UPDATE a row based on a variety
of criteria, and to then return a fully persistent object
state representing the row that was matched. It
essentially intends to provide an UPDATE that is guaranteed
to have matched a specific row in the presence of potential
race conditions without using any locking, and to then
return a record of that row as if it had been SELECTed.
query.update_returning_pk() is a public method that
also serves as part of the implementation of
query.update_on_match(); this method delivers an UPDATE
statement such that the primary key of the single row
matched is returned; if zero or multiple rows are matched,
and error is raised. To handle this, several backend-specific
strategies are provided, which are automatically selected
based on the best available. The lowest strategy
performs a re-SELECT, but still assumes there's
a simple unique column to be queried on, as is currently the
use case in Nova (uuid is present). On Postgresql, MySQL
and other databases besides SQLite and possibly DB2, more
atomic strategies are used.
Change-Id: I059f4ae6e72cfa6681a179314144214639f283ef
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: Ie760385d750d52490b4e05225abecc17ff3210c7
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: Ia882bd0eba82f558737d84830b70215da173cd3f
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I7fdc702a07699e3fad9332a5ef8bfb6c704c37bd
|
| |/ / /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Repairs the parsing within test_utils tests
to use the alphabetic-supporting version
parser inside of compat/utils. Necessary in
order to work with beta / dev versions of SQLAlchemy
such as the current 1.0.0b1 release.
Change-Id: Ic1ae9fa18171b687b1bb9cfac7411fac14e29a0f
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
It's not safe for a database TCP connection to be
shared to a child process, as this is a file descriptor
which will maintain its state on both sides. Applications
such as Cinder which spin up multiprocessing subprocesses
at startup time are subject to race conditions as a result.
Instead of requiring that engines be explicitly prepared
within a child process, we can detect and accommodate
this situation in the connection pool itself, by tracking
the originating pid of a connection, and if it changes
on checkout, by invalidating.
Change-Id: If116f7b7140b3eba064d8147e5f637a05beb1cd8
|
| |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Looks like we missed one!
Closes-Bug: #1431268
Change-Id: I125c7fb66967b83e786c2f697d7bda68d361cb30
|