Commit Graph

847 Commits

Author SHA1 Message Date
Andreas Jaeger e291fc297b Retire repo
This repo was created by accident, use deb-python-oslo.db
instead.

Needed-By: I1ac1a06931c8b6dd7c2e73620a0302c29e605f03
Change-Id: I81894aea69b9d09b0977039623c26781093a397a
2017-04-17 19:36:32 +02:00
Jenkins e9a0e9d568 Merge "Display full reason for backend not available" 2016-08-11 12:52:34 +00:00
Jenkins 4ea972553c Merge "Fix parameters of assertEqual are misplaced" 2016-08-11 09:19:15 +00:00
Jenkins 8b20916310 Merge "Add test helpers to enginefacade" 2016-08-11 02:37:55 +00:00
Jenkins 3ac4966303 Merge "Updated from global requirements" 2016-08-10 18:28:30 +00:00
Jenkins 0cbe82748c Merge "release notes: mention changes in wrap_db_retry()" 2016-08-10 18:28:23 +00:00
Jenkins 18d26125d0 Merge "Deprecate argument sqlite_db in method set_defaults" 2016-08-10 18:27:44 +00:00
Jenkins 6f615b4bd5 Merge "Add logging_name to enginefacade config" 2016-08-10 18:21:03 +00:00
Mike Bayer af27831a9e Display full reason for backend not available
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
2016-08-08 14:25:58 -04:00
OpenStack Proposal Bot 89bc44d2c4 Updated from global requirements
Change-Id: Ida04673890285af9c0b876c61a88693e6851932d
2016-08-08 10:47:00 +00:00
ChangBo Guo(gcb) 93a04675d3 Deprecate argument sqlite_db in method set_defaults
This is follow up of commit 0a1bae9859.
Log warning when pass keyword argument sqlite_db.

Related-Bug: #1329086
Change-Id: Ibed55dc9f28b7813bd96fb5e6f5138de0667591f
2016-08-04 17:12:02 +08:00
OpenStack Proposal Bot f3d123a34d Updated from global requirements
Change-Id: I32efc2a5a5810f915193ab9a49b5ccad74772f0d
2016-08-04 02:40:40 +00:00
Mike Bayer 73b435f1b5 Add test helpers to enginefacade
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
2016-08-03 13:22:17 -04:00
Mike Bayer 8e2e97cd1e Add logging_name to enginefacade config
Propagates logging_name through enginefacade.configure()
to create_engine(), as will be used in the enginefacade-based
test suite.

Change-Id: Iabc03adbef9792e0be4d86c98851890846638efc
2016-08-03 11:44:55 -04:00
Jenkins 428dbe1eec Merge "Add a hook to process newly created engines" 2016-08-03 12:35:27 +00:00
Kevin Benton 3277ef33f2 Capture DatabaseError for deadlock check
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
2016-08-02 10:39:52 +00:00
Ann Kamyshnikova 9376e01be5 Add a hook to process newly created engines
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
2016-07-31 19:11:51 +03:00
Jenkins c5999fb2fa Merge "Updated from global requirements" 2016-07-29 11:14:52 +00:00
Jenkins 6b3633c29c Merge "Consolidate pifpaf commands into variables" 2016-07-29 04:03:45 +00:00
OpenStack Proposal Bot 6bdb99f723 Updated from global requirements
Change-Id: I2ec090174889a9539229cfa3775621b39432db6c
2016-07-29 02:33:49 +00:00
Jenkins 8bab4a337f Merge "Memoize sys.exc_info() before attempting a savepoint rollback" 2016-07-29 01:58:30 +00:00
Mike Bayer 60b5b14988 Memoize sys.exc_info() before attempting a savepoint rollback
This presents a system of reporting the ultimate "cause" in the
case that a MySQL failed SAVEPOINT rollback occurs.

Change-Id: Iea834429a0b8398f076b10426525a5c17dbf3c85
2016-07-27 08:39:20 +00:00
OpenStack Proposal Bot 1dc55b8eaa Updated from global requirements
Change-Id: Ie2e9b0b9507a85e899f68419d0686e03411be2e7
2016-07-25 13:04:48 +00:00
yan.haifeng c1735c503f Fix parameters of assertEqual are misplaced
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
2016-07-20 18:11:34 +08:00
Mike Bayer a9ec13d949 Consolidate pifpaf commands into variables
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
2016-07-19 20:18:07 +03:00
OpenStack Proposal Bot a794790880 Updated from global requirements
Change-Id: Id85521335990acb47f65181724d6bdbf89d11c8b
2016-07-19 15:19:52 +00:00
Jenkins b791ed51a2 Merge "tox: add py35 envs for convenience" 2016-07-19 10:02:11 +00:00
Jenkins cc529f3829 Merge "Set max pool size default to 5" 2016-07-18 22:14:29 +00:00
OpenStack Proposal Bot 5da12af683 Updated from global requirements
Change-Id: I465a02f70301d9927ed8e875b410b22ee3b3d144
2016-07-17 23:58:41 +00:00
Jenkins 2d8bea6f66 Merge "Remove discover from setup.cfg" 2016-07-15 20:46:02 +00:00
Alexandru Coman abebffc95e Fixed unit tests running on Windows
Replaced all slashes in the paths with os.path.join,
so that they are compatible with Windows and Linux.

Change-Id: I65665a0f109d60b7a3e4187dd3c9409151d04ec7
2016-07-14 23:52:00 +03:00
Thomas Bechtold 20613c3c70 Remove discover from setup.cfg
It's only needed for python < 2.7 which is not supported

Change-Id: If364adc5d266557c68c85b5dcfde4c6439a773f7
2016-07-14 08:06:12 +02:00
Jenkins 673f27b0e8 Merge "Add dispose_pool() method to enginefacade context, factory" 2016-07-13 18:19:15 +00:00
Jenkins 6e814373c7 Merge "Set a min and max on the connection_debug option" 2016-07-12 13:33:23 +00:00
Mike Bayer 7b76cdf420 Add dispose_pool() method to enginefacade context, factory
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
2016-07-11 19:47:43 +00:00
OpenStack Proposal Bot fc3c23a722 Updated from global requirements
Change-Id: I3fa7441ceeecbb0af2f7b13046cdb1b339c6dc48
2016-07-09 19:25:48 +00:00
Eric Brown e0cc306c0a Set a min and max on the connection_debug option
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
2016-07-09 01:56:35 +03:00
Eric Brown d594f62fd9 Set max pool size default to 5
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
2016-07-08 15:09:09 -07:00
Jenkins 58d60ca5b2 Merge "exception: make message mandatory in DbMigrationError and deprecates it" 2016-07-08 03:57:48 +00:00
David Edery 462296b66e Add support for LONGTEXT, MEDIUMTEXT to JsonEncodedType
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
2016-07-07 22:04:32 +03:00
Roman Podoliaka 72bab42e00 tox: add py35 envs for convenience
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
2016-07-07 08:02:11 +03:00
Jenkins 3e3db134c0 Merge "Deprecate config option sqlite_db for removal" 2016-07-06 15:57:09 +00:00
ChangBo Guo(gcb) 0a1bae9859 Deprecate config option sqlite_db for removal
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
2016-07-06 16:34:35 +03:00
Jenkins 24b8812a74 Merge "Catch empty value DBDuplicate errors" 2016-07-06 13:21:34 +00:00
Jenkins 17ca580dbc Merge "exc_filters: catch and translate non existent table on drop" 2016-07-06 10:29:21 +00:00
Jenkins e41461a6e9 Merge "exc_filters: catch and translate non existent constraint on drop" 2016-07-06 10:15:06 +00:00
Kevin Benton 16886e55bd Catch empty value DBDuplicate errors
We can have integrity constraint violations when the
value is an empty string. The previous regex for converting
these into DBDuplicate exceptions was not considering this
case.

This adjusts the regex to a 0 or many instead of a 1 or many
match for the value and adds a case to a test.

Change-Id: Ibf4686f92fcffb8e70ec2735ab878e8849ed37b1
Closes-Bug: #1599086
2016-07-05 23:53:37 -07:00
Roman Podoliaka 4e4ec2d8bd release notes: mention changes in wrap_db_retry()
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
2016-07-04 13:38:25 +03:00
OpenStack Proposal Bot 1d7e7e453b Updated from global requirements
Change-Id: I7b4bc4f920f5e0fb7e26314267542d036942412c
2016-06-30 18:48:18 +00:00
Jenkins 581e1d13dc Merge "Make it possible to use enginefacade decorators with class methods" 2016-06-29 22:04:56 +00:00