summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Add local bindep.txt" into stable/ocataocata-eolstable/ocataZuul2019-07-082-0/+20
|\
| * Add local bindep.txtElod Illes2019-07-032-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As it was announced [1] global bindep-fallback.txt was removed and now projects need to have a local bindep.txt to be able to install binary dependencies for testing. In test jobs the script tools/test-setup.sh is called which requires mysql and postgres servers and clients to be installed. [1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html Change-Id: I6b237ecf55ff440b5f5c956ee849a1927bb15441 (cherry picked from commit f34e53ebf7670f51f16d5d96412a42fa7f3a8232) (cherry picked from commit 67904312ab7fff2939f5115125994fc3753be334) (cherry picked from commit d37a0eb3d5b20234592a6a514f5a4d7c75b5c763) (cherry picked from commit 4ae0a7732ea9317d17ac2f0066000c68e46f17b4) (cherry picked from commit 688141ae159d31632d87e28947f75fcef0598d4a)
* | OpenDev Migration PatchOpenDev Sysadmins2019-04-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit was bulk generated and pushed by the OpenDev sysadmins as a part of the Git hosting and code review systems migration detailed in these mailing list posts: http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004920.html Attempts have been made to correct repository namespaces and hostnames based on simple pattern matching, but it's possible some were updated incorrectly or missed entirely. Please reach out to us via the contact information listed at https://opendev.org/ with any questions you may have.
* | Reverse role of synchronous_readerMike Bayer2018-10-093-11/+21
| | | | | | | | | | | | | | | | | | | | | | Repaired the "synchronous_reader" modifier of enginefacade so that it refers to the "writer" engine when set to True, thereby allowing "synchronous" behavior with the writer. When set to False, this is "asynchronous", so this should be associated with the async engines. The flag had the reverse behavior previously. Change-Id: Id7fea7562ba90eb710176d497af103303f230531 Closes-bug: #1746116
* | import zuul job settings from project-configDoug Hellmann2018-08-031-0/+9
|/ | | | | | | | | | | | | | | This is a mechanically generated patch to complete step 1 of moving the zuul job settings out of project-config and into each project repository. Because there will be a separate patch on each branch, the branch specifiers for branch-specific jobs have been removed. See the python3-first goal document for details: https://governance.openstack.org/tc/goals/stein/python3-first.html Change-Id: I0c5db3dc5fd87083a3e3962500cf0a749b71f5a9 Story: #2003250
* Fix sphinx-docs job for stable brancheeldill2018-05-031-0/+5
| | | | | | | | | build-openstack-sphinx-docs jobs fail on stable branches due to the new pip version 10 introduces some previously Warning as Error: in case of calling "pip install" without any package name, the command fails. tox_install.sh is called during docs job without any package passed to pip. Change-Id: Idf418fb327475ddf167db8a85d6eff6456ca8c9b
* Use the new PTI for document buildChangBo Guo(gcb)2018-01-153-5/+16
| | | | | | | | | | | | | | For compliance with the Project Testing Interface as described in: https://governance.openstack.org/tc/reference/project-testing-interface.html For more detials information, please refer to: http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html Change-Id: Iba311cc69ec5272d8beb433e3589c53f371d5d0a (cherry picked from commit 4f81c419947e2793e3eda4ce8f3664058b5a5d2c) (cherry picked from commit 9da74057dc97b8d707f8d3009d02d78a6bf3ec59)
* Updated from global requirementsocata-em4.17.1OpenStack Proposal Bot2017-05-151-1/+1
| | | | Change-Id: I9c66ca5239188303753d903be90f63019040844f
* Updated from global requirementsOpenStack Proposal Bot2017-03-091-1/+1
| | | | Change-Id: I5c3a829098c60e7fc5ef25495915c9a372e729fd
* Updated from global requirementsOpenStack Proposal Bot2017-02-091-1/+1
| | | | Change-Id: Ic6d21e63477b32ea818ab778134a4ec30fc91942
* Merge "Prepare for using standard python tests" into stable/ocataJenkins2017-02-072-0/+61
|\
| * Prepare for using standard python testsAndreas Jaeger2017-02-062-0/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add simple script to setup mysql and postgresql databases, this script can be run by users during testing and will be run by CI systems for specific setup before running unit tests. This is exactly what is currently done by OpenStack CI in project-config. This allows to change in project-config the python-db jobs to python-jobs since python-jobs will call this script initially. See also http://lists.openstack.org/pipermail/openstack-dev/2016-November/107784.html Update CONTRIBUTING.rst for this. Needed-By: Ia298e25f9b15a2dcfc4553ea058fc2c0f3705a8b Change-Id: I825b72e3f645d02f7efdb3315a12825a8c937759 (cherry picked from commit 353ab3904749987841e72846098433fb957936fc)
* | Update UPPER_CONSTRAINTS_FILE for stable/ocataOpenStack Release Bot2017-01-201-1/+1
|/ | | | Change-Id: I0021024ac8685a8ec8b794ee974bd9d798fe91df
* Update .gitreview for stable/ocataOpenStack Release Bot2017-01-201-0/+1
| | | | Change-Id: I06d57dc929c7b51c739cf61b6beed11ab50c64cc
* Merge "docs: mention that it's possible to use Connection directly"4.17.0Jenkins2017-01-041-0/+15
|\
| * docs: mention that it's possible to use Connection directlyRoman Podoliaka2016-12-121-0/+15
| | | | | | | | | | | | | | | | Sometimes people just do not need the ORM part and a Session at all. Mention the fact, that it's possible to ask for a Connection in enginefacade. Change-Id: I7a135be7149cd3fa140e0268fea5a17f23f402b2
* | Modify word "whetever" to "whether"ahdj0072016-12-291-1/+1
| | | | | | | | Change-Id: I627b1fd01d01d79ed4a4fe131f5edec733703635
* | Updated from global requirementsOpenStack Proposal Bot2016-12-221-1/+1
| | | | | | | | Change-Id: I30a9d74d90479d8d335dd2e1f097b1fcefd53cf8
* | Merge "Add Constraints support"Jenkins2016-12-212-1/+34
|\ \
| * | Add Constraints supportTony Breeds2016-12-202-1/+34
| |/ | | | | | | | | | | | | | | | | | | | | | | Adding constraints support to libraries is slightly more complex than services as the libraries themselves are listed in upper-constraints.txt which leads to errors that you can't install a specific version and a constrained version. This change adds constraints support by also adding a helper script to edit the constraints to remove oslo.db. Change-Id: I31febfe00698e36f4c2e0e41c3f7bf64acf47adf
* | Support packet sequence wrong errorMike Bayer2016-12-142-0/+9
|/ | | | | | | | | | | | | | | | In I484237c28a83783689bb8484152476de33f20e3a, we observed MariaDB-specific error code 1927 as a new kind of disconnect situation. In some failure-mode testing we are also observing with PyMySQL that a stale connection, when it is attempted to be used for the initial ping, does not return any error code but instead trips up PyMySQL with packets sequence numbers (this is an internal value used by the MySQL client/server protocol to track messages). The connection is definitely not recoverable in this state so this also needs to be a disconnect situation so that the ping listener refreshes the connection pool. Change-Id: Iee1c4533e2457acc30e2046b63145c2502012c5f References: https://bugs.launchpad.net/tripleo/+bug/1642944
* Merge "Replaces uuid.uuid4 with uuidutils.generate_uuid()"Jenkins2016-12-091-5/+4
|\
| * Replaces uuid.uuid4 with uuidutils.generate_uuid()zhangguoqing2016-12-071-5/+4
| | | | | | | | | | | | | | | | Openstack common has a wrapper for generating uuids. We should use that function when generating uuids for consistency. Change-Id: I927609f06e5921e189487160ef46be830e422add Closes-Bug: #1082248
* | exc_filters: fix deadlock detection for percona xtradb clusterRoman Podoliaka2016-12-092-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | percona xtradb cluster server produces an error like: (1213, u'WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction') which is currently not detected properly and, thus, not retried. Closes-Bug: #1648818 Change-Id: Ic43cb0e0946506a4b7ce9f94ee9eba5e025ed3d5
* | Merge "Strip prefix `migrate_` in parameter `migrate_engine`"Jenkins2016-12-071-63/+60
|\ \
| * | Strip prefix `migrate_` in parameter `migrate_engine`int32bit2016-12-051-63/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | This code was initially taken from Nova migrate_repo, the prefix of 'migrate_' in argument 'migrate_engine' makes no sense in this place, but a little misleading. So we should strip the prefix and use 'engine' instead. Change-Id: I6460eca03eb135c98d22d066b57b17907df7237c
* | | Fix marker checking when value is Nonetengqm2016-12-062-14/+52
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are cases where users sort a table using compound-values sort_key and one of the key has nullable set to True. For example, sorting a table using ['id', 'updated_at'] where 'updated_at' can be None. When marker_value is None, we cannot do value comparison using '<' or '>' operators. This patch adds a check if the value from the marker corresponding to the nullable-key has None value. If that is the case, we skip the comparison. Back to the example above, instead of always getting the following criteria (which doesn't work): (id > MARKER_ID) or (id == MARKER_ID && updated_at > None) <-- failure we will get the following criteria when 'updated_at' is None: (id > MARKER_ID) This is not hurting in any way to existing / legal use cases where callers are expected to include a unique key in sort keys. If there are such cases, this patch is not making things worse because the sorting is already unpredictable. Closes-Bug: #1615938 Change-Id: Iea2cd0bb2556b0b15a0baaa76ef522a3097f9928
* | migration: don't assume the mixin use provision4.16.0Mehdi Abaakouk2016-12-051-5/+4
|/ | | | | | | | | | | | | | | | | | In 2ad571c8d7a7e1d8d18f7c5e97c564509fd34816 we have changed the backend used to cleanup the ModelsMigrationsSync by the one from oslo_db.sqlalchemy.provision. But in ModelsMigrationsSync, nothing uses the provisioning system. The engine can be created outside oslo.db. And oslo.db must must not assume it have been created by the oslo_db.sqlalchemy.provision module. For example, 2ad571c8d7a7e1d8d18f7c5e97c564509fd34816 have broken the Gnocchi models migration test that creates the engine itself. This change builds a new backend to cleanup all database objects. Change-Id: Ie8c454528ce3aa816c04fbb4beb69f4b5ec57e9c Closes-bug: #1647280
* Merge "Check if an index on given columns exists"Jenkins2016-12-022-12/+48
|\
| * Check if an index on given columns existsint32bit2016-12-012-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | We have many cases to check if an index exists on a given columns. Like: "https://github.com/openstack/nova/blob/master/nova/db/sqlalchemy/ migrate_repo/versions/347_add_updated_at_index.py#L30-L37" In addition, It's very frequent to get all indexes from a table, so we need a reusable function to avoid duplicate effort. Change-Id: Iadd9b6ac7586e9b50357ca799eb605f4772e0ece
* | Merge "Show team and repo badges on README"Jenkins2016-12-011-0/+9
|\ \
| * | Show team and repo badges on READMEFlavio Percoco2016-11-251-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the team's and repository's badges to the README file. The motivation behind this is to communicate the project status and features at first glance. For more information about this effort, please read this email thread: http://lists.openstack.org/pipermail/openstack-dev/2016-October/105562.html To see an example of how this would look like check: b'https://gist.github.com/f4852cbe9049c5a5d7241af3102c88ea\n' Change-Id: I17dc5cacb22da5f37cbf92095c4144525cd5724b
* | Ensure provision_new_database is True by default4.15.0Mike Bayer2016-11-292-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In I3e238b6a97769cf0a352f11e718d5d73eebcfa8a, we restored zzzeek's overlooking the fact that legacy test suites assume new DBs are provisioned by default in the legacy test base. However, zzzeek also made this same assumption in Neutron Ie27cf174fa24c2f479af47335d9ae139fb7d159a which vendors its own version of test_base in anticipation of some of these newer features, so it will break once the provision_new_database flag becomes false. Favor setting this flag True/False explicitly and default it to True for compatibility w/ Neutron. Change-Id: I726cc20481a9bc778b75564526d9245132b43563
* | Don't run LegacyBaseClass provision test for unavailable databaseMike Bayer2016-11-291-12/+24
| | | | | | | | | | | | | | | | | | | | The test added in I3e238b6a97769cf0a352f11e718d5d73eebcfa8a will fail if the corresponding backend is not actually available, because the resources dictionary will be empty. Add a skip mechanism based on whether or not the DatabaseResource has backend available or not. Change-Id: I0ecb4a7ba6531b50c9c3abc6c9c8564b0df54f61
* | SoftDeleteMixin: allow for None valuesRoman Podoliaka2016-11-282-1/+22
| | | | | | | | | | | | | | | | | | | | | | This is a fixup for I13c6233cfeb611b1b106eedfc9b57d2af313c46b to address the remaining comments: - allow for None values to be passed (as column deleted is nullable) - document why column deleted is not of type boolean Change-Id: I04f690f7a1bb8cb14f1e3322643a8cf8bc9c549a
* | SoftDeleteMixin: coerce deleted param to be an integerRoman Podoliaka2016-11-283-3/+72
|/ | | | | | | | | | | | | | | | | PostgreSQL is very strict about types and won't perform an automatic type cast when trying to pass e.g. a boolean `false` value to be INSERT'ed or UPDATE'ed. Coerce the value of deleted bound parameter to always be an integer in the DB layer by adding a custom SQLAlchemy integer type decorator to make PostgreSQL happy, should someone pass a boolean value for deleted column (it was meant to be of boolean type, but is integer instead to allow for Nova use case of shadow tables and compound unique constraints on something + deleted). Closes-Bug: #1644513 Change-Id: I13c6233cfeb611b1b106eedfc9b57d2af313c46b
* Support MariaDB error 1927Mike Bayer2016-11-212-0/+9
| | | | | | | | | | | | We're observing a MariaDB-specific error code "1927 connection was killed", which seems to indicate the condition where the client/server connectivity is still up but the mariadb server has been restarted. This error needs to be supported as one of the "disconnect" situations so that the ping handler knows to force a reconnect. Change-Id: I484237c28a83783689bb8484152476de33f20e3a References: https://bugs.launchpad.net/tripleo/+bug/1642944
* Merge "Break optimize_db_test_loader into package and module level"Jenkins2016-11-203-39/+166
|\
| * Break optimize_db_test_loader into package and module levelMike Bayer2016-11-163-39/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This unittest-compatible load_tests function was not well organized for package-level tests and was broken for module-level usage; as in the case of module-level usage, the "pattern" parameter was being passed, which was unexpected since the Python 2.7 documentation for unittest claims it will be None. However, we are using subunit to run tests, which uses the unittest2 library that achieves compatibility with Python 3 - in Python 3, the documentation was changed here to note that "pattern" may be present (and in fact it is). Instead, break it into optimize_package_test_loader and optimize_module_test_loader. The former assumes placement inside of __init__.py only and the latter assumes placement inside of a specific module only. The issue with this function was observed when trying to get OptimisingTestSuite to work correctly with neutron; tests would be duplicated due to the double-search. In local testing it was shown that the function could cause recursion overflows. It has been observed that using this function at the module level is of great use when running subsets of tests, since the package-level load_tests function is not consulted unless the test run is package-wide. Change-Id: I267fd2fbc16504c11addef870fc8d4fc500da7d9
* | Merge "Adjust SAVEPOINT cause test for SQLA 1.1"Jenkins2016-11-202-13/+29
|\ \
| * | Adjust SAVEPOINT cause test for SQLA 1.1Mike Bayer2016-11-162-13/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SQLAlchemy 1.1 has repaired some of the failure modes for Session.rollback(), including the MySQL case where the savepoint identifier gets lost, such that the Session is in a more usable state than before. A side effect of this is that the test here in oslo.db only hits a single error handler, not two. SQLAlchemy upstream is described at: https://docs.sqlalchemy.org/en/latest/changelog/migration_11.html#improved-session-state-when-a-savepoint-is-cancelled-by-the-database Change-Id: I324f288701e9ffd241de638e0e0419dc8d9c1264
* | | Updated from global requirementsOpenStack Proposal Bot2016-11-161-1/+1
| |/ |/| | | | | Change-Id: I65eb5fad2269e81c74e2a73e8bbd50b2ed8fb539
* | Restore provisioning of DBs in legacy test baseRoman Podoliaka2016-11-152-1/+18
|/ | | | | | | | | | Apparentely I0163e637ffef6d45d2573ebe29b5438911d01fce breaks Nova tests, as we no longer provision a new DB in DatabaseResource by default. While the recommended way is to use the new fixtures, we should make sure the original behavior is preserved for the legacy test cases. Change-Id: I3e238b6a97769cf0a352f11e718d5d73eebcfa8a
* Merge "utils: deprecate InsertFromSelect properly"Jenkins2016-11-102-4/+12
|\
| * utils: deprecate InsertFromSelect properlyRoman Podoliaka2016-11-042-4/+12
| | | | | | | | | | | | | | | | | | | | This is provided out-of-box by SQLAlchemy versions >= 1.0.0. We've had this class deprecated in docs for some time now, now do it properly by the means of debtcollector and a release note. Closes-Bug: #1439092 Change-Id: I562c35c265014c6b19a81961f236a7a0ca438765
* | Updated from global requirementsOpenStack Proposal Bot2016-11-091-1/+1
| | | | | | | | Change-Id: I86d5d8f41a6b51faac74d155472379e8bd34cab1
* | Merge "Enhanced fixtures for enginefacade-based provisioning"Jenkins2016-11-0919-39/+916
|\ \
| * | Enhanced fixtures for enginefacade-based provisioningMike Bayer2016-11-0419-39/+916
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original idea of enginefacade was that applications would call upon the global _TransactionContextManager given in oslo_db.sqlalchemy.enginefacade. However, as it turns out, virtually no Openstack projects seem to be using that technique, and instead, everyone is creating their own ad-hoc _TransactionContextManager objects and usually establishing it as a module-level global. Nova has two of them. Additionally, projects add configuration to these enginefacades (which IS part of the original idea), and this configuration in some cases is necessary to be present for tests that run as well, a key example being the sqlite_fks flag. The original DbFixture integration provided no way of reusing this configuration. Finally, projects very much tend to use custom fixtures in order to define their database communication. Test classes themselves don't really make use of oslo_db's DbTestCase anymore. This patch introduces a modernized fixture system which, in conjunction with the recent provisioning patch, addresses these use cases. Applications will typically create their own subclasses of these fixtures up front to suit the various testing cases they have, including SQLite fixed, SQLite ad-hoc, and opportunistic. In order to accommodate the fixture-based flow along with the use of testresources for opportunistic database provisioning, a mixin class OpportunisticDbTestMixin is still needed when a test needs to use "opportunistic" testing in order to provide the .resources attribute. The calculation of .resources is moved into the fixture system, but because this attribute is consulted before setUp(), the "opportunistic" fixture must be created early and stored. Closes-Bug: #1548960 Change-Id: I0163e637ffef6d45d2573ebe29b5438911d01fce
* | | Updated from global requirementsOpenStack Proposal Bot2016-11-061-1/+1
|/ / | | | | | | Change-Id: If4eac84ef561183e083a24e67fb14eb793b34db2
* | Merge "Updated from global requirements"Jenkins2016-11-041-1/+1
|\ \