summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Updated from global requirementskilo-eolstable/kiloOpenStack Proposal Bot2016-04-291-1/+1
| | | | Change-Id: I2681b495f43e95562cd624e295cd8ec38857ee6c
* Merge "Updated from global requirements" into stable/kiloJenkins2016-04-210-0/+0
|\
| * Updated from global requirementsOpenStack Proposal Bot2016-04-201-1/+1
| | | | | | | | Change-Id: I51b210e304318a1dbd5c6456e735f1a04642e5c2
* | Manual g-r sync1.7.5Tony Breeds2016-04-201-1/+1
|/ | | | | | Related-Bug: 1572417 Depends-on: I984c53e30f4794738c38154273f12efbbcb549b3 Change-Id: I9d8ce19bac0a62404b53cb099a17f7b71a3c3ad2
* Updated from global requirementsOpenStack Proposal Bot2016-03-191-1/+1
| | | | Change-Id: I9d58f5d25857c88798b7a8b2180dde44db56b5fc
* Merge "Add testtools to requirements.txt" into stable/kilo1.7.4Jenkins2016-03-124-2/+4
|\
| * Add testtools to requirements.txtMatt Riedemann2016-03-104-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testscenarios has an uncapped dependency on testtools. testtools 2.0.0 requires fixtures>=1.3.0. fixtures 1.2.1 requires testtools<2.0.0. kilo g-r caps fixtures<1.3.0 and testtools<2.0.0. We have to add testtools to oslo.db's requirements.txt to use the cap from kilo g-r before testscenarios installs uncapped testtools, which will break since we cap fixtures, which caps testtools. Yay! Also, add defaultbranch to .gitreview. Change-Id: Ib95b8070cee6e6ff47d9c302c89577a75a28d83d Closes-Bug: #1555721
* | Fix tests to work under both pymsysql 0.6.2 and 0.7.xDavanum Srinivas2016-03-112-6/+16
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | In 0.6.2, the exc.statement and exc.params were as follows: exc.statement = {unicode} u'INSERT INTO resource_entity (id, foo_id) VALUES (%s, %s)' exc.params = {tuple} (1, 2) In 0.7.1, the exc.statement and exc.params are as follows: exc.statement = {unicode} u'INSERT INTO resource_entity (id, foo_id) VALUES (%(id)s, %(foo_id)s)' exc.params = {dict} {'id': 1, 'foo_id': 2} So the easiest thing to support both is to use string interpolation and then check if they are equal. This approach works for both py34 and py27 as well. Note that we still have to test the old way for sqlite which has (?, ?) in the SQL statement. NOTE(tonyb): We need to make the same change in .../old_import_api/.../test_exc_filters.py in the stable/kilo branch. This was removed in the liberty timeframe in If3036e03a68c2e865b5f0495c74fe8303de93d21 Closes-Bug: #1533861 Change-Id: Iab9f0e4b4dd337363dd7e705c1155f3f6517b404 (cherry picked from commit 543d577613a5ccc12f4482d9e2f9ce1f29db21b4) (cherry picked from commit 40004ebbca6c345da09cec4e91f85fc73ab18e70)
* Updated from global requirements1.7.3OpenStack Proposal Bot2015-09-171-1/+1
| | | | Change-Id: I64ecf19fa0097ff1939e99b26cd8eb414b550a22
* Updated from global requirementsOpenStack Proposal Bot2015-09-011-1/+1
| | | | Change-Id: I6240c01f0e344965e1e0664c7de9d4d015f91c4f
* Updated from global requirementsOpenStack Proposal Bot2015-08-281-1/+1
| | | | Change-Id: Idab1d9edc5ba8dcca65f688957acd7c6e294e6b0
* Updated from global requirementsOpenStack Proposal Bot2015-08-111-1/+1
| | | | Change-Id: Ib854799c9042cd6442a0e17f67671f8532f26370
* Merge "Add mock to test-requirements.txt" into stable/kiloJenkins2015-07-241-0/+1
|\
| * Add mock to test-requirements.txtRoman Podoliaka2015-07-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | Mention mock explicitly rather than relying on it to be installed as a transitive dependency, so that we have control on the mock versions allowed. Closes-Bug: #1476665 (cherry-picked from a21111d97151ca8d84c3bf4dd779374bfb0c83ed) Change-Id: Id734c3d7b7ef1ab8d97a13edb1de006c029c22a0
* | Updated from global requirementsOpenStack Proposal Bot2015-07-234-24/+23
|/ | | | Change-Id: Icaf116a2eafad4ce34a26879d4f19b66cac62506
* Merge "Avoid excessing logging of RetryRequest exception" into stable/kilo1.7.2Jenkins2015-05-151-1/+5
|\
| * Avoid excessing logging of RetryRequest exceptionEugene Nikanorov2015-03-301-1/+5
| | | | | | | | | | | | | | | | | | | | 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 (cherry picked from commit 02aeda28cf8b69f39f934a3e80cb7cae04c5fc20)
* | Updated from global requirementsOpenStack Proposal Bot2015-04-153-10/+10
|/ | | | Change-Id: I82eda050e801cf84b7438c79f59079a096429c17
* Add process guards + invalidate to the connection pool1.7.1Mike Bayer2015-03-162-0/+61
| | | | | | | | | | | | | | | | | 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 (cherry picked from commit ebbf23d6490159f0c8f4f35a08fb4b80371cd080)
* Switch to non-namespaced module import - oslo_i18n1.7.0Davanum Srinivas2015-03-121-2/+2
| | | | | | | Looks like we missed one! Closes-Bug: #1431268 Change-Id: I125c7fb66967b83e786c2f697d7bda68d361cb30
* Merge "Fix documented env variable for test connection"Jenkins2015-03-101-1/+1
|\
| * Fix documented env variable for test connectionAngus Salkeld2015-03-101-1/+1
| | | | | | | | | | | | | | I had to go digging into how this worked to figure out the missing "_ADMIN_". Change-Id: Id9a48cf413eacd04473f3413421681b32cbf5f29
* | Updated from global requirementsOpenStack Proposal Bot2015-03-072-2/+2
|/ | | | Change-Id: I577fec9512ca2a94418f37ea955cf590aea1c6d5
* Updated from global requirements1.6.0OpenStack Proposal Bot2015-03-051-2/+2
| | | | Change-Id: I9f799c931804d0695fd64b238ad0a6c5dbbb6cf1
* Merge "Use PyMySQL as DB driver in py3 environment"Jenkins2015-03-042-3/+7
|\
| * Use PyMySQL as DB driver in py3 environmentVictor Sergeyev2015-02-122-3/+7
| | | | | | | | | | | | | | | | | | MySQLDb driver works only with python2.x, so we should use an another connector for work with python3. Used OS_TEST_DBAPI_ADMIN_CONNECTION env variable to set connection strings. Change-Id: I27fbe8f87c713b53a0b1831543a23f7c06fe454b
* | Make DBAPI class work with mocks correctly1.5.0Roman Podoliaka2015-02-252-7/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, DBAPI __getattr__() implementation will *always* implicitly wrap all mocked methods of a target class/module using wrap_db_retry(), as retry_on_* attributes will always exist and be true for mock instances. Not only this leads to a situation, when we would retry methods, we were not going to retry, but this also fails with AttributeError on functools.wraps() call, breaking valid unit tests in projects. DBAPI is changed in a way, so that it does dict look ups instead of fetching instance attributes to ensure mocked methods are handled correctly and aren't wrapped when they shouldn't be wrapped. Related issue: http://stackoverflow.com/questions/22204660/python-mock-wrapsf-problems Change-Id: I36550ffa88056c53a431d64e61e84fbb44bbf68d
* | Updated from global requirementsOpenStack Proposal Bot2015-02-201-1/+1
| | | | | | | | Change-Id: Ie0a3c19e005fab985b1d6abaf1ac785471fffd8e
* | Imported Translations from TransifexOpenStack Proposal Bot2015-02-181-9/+9
| | | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: If2388281d6e9cf3c76cee2293636aab8873818f6
* | Fix PyMySQL reference error detectionGregory Haynes2015-02-121-1/+1
|/ | | | | | | | When PyMySQL experiences a constraing error a unicode string prefix is prepended part way through the inner_exception string. As a result, we raise a DBError when we should be raising a DBReferenceError. Change-Id: I5de1333d933bd28ca535852f4643df2ebbc7f964
* Merge "Organize provisioning to use testresources"Jenkins2015-02-1212-155/+491
|\
| * Organize provisioning to use testresourcesMike Bayer2015-02-0412-155/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces the use of the testresources package, such that the provisioning system uses TestResourceManager objects in order to create and drop databases, schemas, and manage transactional testing. A new series of objects to support transparent transaction containers within tests is added as well. partially implement bp: long-lived-transactionalized-db-fixtures Partial-Bug: #1339206 Change-Id: I16bfa3af0e1ad6a9231ea38dea7cd76092347f55
* | Updated from global requirementsOpenStack Proposal Bot2015-02-093-3/+3
| | | | | | | | Change-Id: I5430adda717798e4ec31edbeab4e9aa72e5f80fa
* | Merge "Fix PatchStacktraceTest for pypy"Jenkins2015-02-051-1/+3
|\ \
| * | Fix PatchStacktraceTest for pypyOleksii Chuprykov2015-01-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | test_trace test cannot pass with mocked do_execute on pypy environment. Allow test to call do_execute with correct sql query. Change-Id: I165fc4de9f4a7f10cb45e92301652224e63f113b
* | | Merge "Refactor database migration manager to use given engine"Jenkins2015-02-045-31/+92
|\ \ \ | |_|/ |/| |
| * | Refactor database migration manager to use given engineVictor Sergeyev2015-01-275-31/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removing global engine object introduces some changes to migration api. Basically we need to move engine creation to outer scope. In order to address these issues we need to refactor alembic api. Co-Authored-By: Dmitry Shulyak <dshulyak@mirantis.com> Adopted from Ia2f9586c4e9c31339dd7dcd9f45a58e8a8409921 Change-Id: Ic7dcf1d2f38388bd1e5a517ce60190bff499686a
* | | Merge "Implement backend-specific drop_all_objects for provisioning."Jenkins2015-02-035-26/+169
|\ \ \
| * | | Implement backend-specific drop_all_objects for provisioning.Mike Bayer2015-01-295-26/+169
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch implements the drop_all_objects() portion of the testresources series of changes, so that this utility is usable right now. In particular, as SQLAlchemy 1.0 will support reflection of foreign key names in SQLite, it's necessary that we don't emit a DROP CONSTRAINT for these against SQLite as SQLite does not support this command. The drop_all_objects() is added as a first class element here and is also added to the _cleanup() method of the test_migrations base. Tests are added which exercise the case of mutually-dependent foreign keys on Postgresql and MySQL as well. partially implement bp: long-lived-transactionalized-db-fixtures Partial-Bug: #1339206 Change-Id: I56777834187651f5ba2e43482546c2981524b11c
* | | Merge "Add retry decorator allowing to retry DB operations on request"Jenkins2015-01-304-4/+75
|\ \ \
| * | | Add retry decorator allowing to retry DB operations on requestEugene Nikanorov2015-01-304-4/+75
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Imported Translations from TransifexOpenStack Proposal Bot2015-01-303-38/+38
|/ / | | | | | | | | | | | | For more information about this automatic import see: https://wiki.openstack.org/wiki/Translations/Infrastructure Change-Id: I7e41fa70f5ec315f477e72beac2a705f04c1f710
* | Merge "Retry query if db deadlock error is received"Jenkins2015-01-273-42/+168
|\ \
| * | Retry query if db deadlock error is receivedrossella2015-01-143-42/+168
| |/ | | | | | | | | | | | | | | | | Add a decorator retry_on_deadlock(). All db.api functions marked with this decorator will be retried if a DBDeadlock exception is received. Change-Id: I3488bfec67ec1c563292f1b61a7a9697f118809c Closes-bug: 1348588
* | Merge "Updated from global requirements"Jenkins2015-01-263-3/+3
|\ \
| * | Updated from global requirementsOpenStack Proposal Bot2015-01-243-3/+3
| | | | | | | | | | | | Change-Id: I797f4532e39a700e70a2834ac299663118c608cc
* | | Merge "Fix 0 version handling in migration_cli manager"Jenkins2015-01-262-1/+6
|\ \ \ | |/ / |/| |
| * | Fix 0 version handling in migration_cli managerBoris Bobrov2015-01-262-1/+6
| |/ | | | | | | | | Change-Id: Ieabcf541bd5f2e6706159efe9d6ac54c7376004c Closes-Bug: 1413277
* | Update Oslo imports to remove namespace packageDoug Hellmann2015-01-2110-12/+12
|/ | | | | Change-Id: I4ec9b2a310471e4e07867073e9577731ac34027d Blueprint: drop-namespace-packages
* Merge "Ensure DBConnectionError is raised on failed revalidate"Jenkins2015-01-135-135/+379
|\