1135 Commits

Author SHA1 Message Date
caoyuan
9a5f153c4b tox: Keeping going with docs
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.

[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045

Change-Id: Idaca0bc97e33e0a080de612420177b5e102c628c
2019-10-24 14:28:28 +08:00
be28e3eaf7 Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I377ad03a73b88407d0e70315cbd0162bb9dc356b
Sem-Ver: feature
2019-09-20 16:32:12 +00:00
Zuul
fb40cdb7a9 Merge "Use connect, not contextual_connect" 2019-08-16 16:23:13 +00:00
Corey Bryant
db780378d2 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Ie47812bec5284d447a2f9c339a5b29d49d83ab53
Story: #2005924
Task: #34234
2019-08-09 22:48:06 +00:00
Ben Nemec
21e70f853e Add libpq-dev to bindep.txt
It seems that this is needed in order to run the py37 tests in the
gate. See the attached bug for the full error output from a failed
run.

Change-Id: Iba278fc17d0121cf6d8b48c42a18c6ccf73de6c8
Closes-Bug: 1839679
2019-08-09 22:48:06 +00:00
Mike Bayer
fce2a271c5 Use connect, not contextual_connect
Fixed one test that is using the deprecated, removed in
SQLAlchemy 1.4 contextual_connect method.

Change-Id: Ic9d23be6742bfc0aed4e032f3e1e01d5acf90131
2019-07-17 14:33:58 -04:00
Elod Illes
f34e53ebf7 Add local bindep.txt
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
2019-06-26 16:03:39 +02:00
Mike Bayer
459de14357 Rollback existing nested transacvtion before restarting
SQLAlchemy 1.4 will be adding stricter rules to Connection objects
such that a new transaction cannot be started while an old one hasn't
been cleared.   Ensure this particular test fixture clears
the "savepoint" transaction first before starting a new one.

References: https://github.com/sqlalchemy/sqlalchemy/issues/4712
Change-Id: Idcb616fd3add4d58f22b91865cec8a54fe492093
5.0.1
2019-06-07 11:53:46 -04:00
Ghanshyam Mann
2f8250f3f7 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: Iba00d9fadaf3a682f3e4bb2dea335dfc74cf030d
2019-05-30 13:39:24 +00:00
Stephen Finucane
05ddd9fc9e docs: Use sphinxcontrib.apidoc for building API docs
Gets us away from the old pbr functionality.

Some cleanup of tox.ini is included along the way.

Change-Id: Ia228f8ee49f31f88fa2a66f2aad3a3921c41a785
5.0.0
2019-05-21 08:50:29 +00:00
Zuul
b9c51e295b Merge "Support context function argument as keyword" 2019-05-15 19:49:20 +00:00
Ben Nemec
925bb81c7f Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.

Change-Id: If86c82e0f4a519baca664af79352846c4af9a01c
Reference: https://github.com/PyCQA/bandit/pull/489
2019-05-13 20:09:00 +00:00
Zuul
aef64ea8ae Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-03 20:20:47 +00:00
Zuul
0a50e18965 Merge "Removing deprecated min_pool_size" 2019-04-24 14:35:10 +00:00
jacky06
cc5c0e36cd Replace git.openstack.org URLs with opendev.org URLs
Change-Id: Iff5086fee8c94325aa16a3b5727dac66a64478ec
Closes-Bug: #1825933
2019-04-23 05:29:23 +00:00
OpenDev Sysadmins
0de3a705e8 OpenDev Migration Patch
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.
4.46.0
2019-04-19 19:34:34 +00:00
Sean McGinnis
3c50cb5cce Fix deprecation warnings under py36
This addresses two sources of deprecation warnings.

The collections package has moved ABC classes under collections.abc. Six
does not support this move yet, so this updates the code to try to
import from the newer locations, and if that fails, import from the old
location.

Py36 is also more strict about escape sequences in strings. This happens
move often with regex strings that are valid regex but not a valid
normal string escape sequence. This addresses those errors by switching
to raw strings.

Change-Id: I4c61df6b6432b135297f38c02b4538e4ba56be51
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2019-04-11 11:03:59 +00:00
Adrian Chiris
7c164cf938 Support context function argument as keyword
Today, when a user uses enginefacade reader/writer decorators
he/she is forced to pass the context argument as the
first positional argument. performing a decorated function
call with this argument passed as a keyword would lead to
an out of range exception.

This patch proposes to add support for the context argument
to be passed as a keyword argument in decorated functions.

e.g

@enginefacade.reader
def foo(context):
    ...

foo(context=ctxt)  <- will now be possible

Change-Id: Ief0b71bf9a7eb75935612431bdcc26d33bce852d
2019-04-07 19:16:59 +03:00
Erik Olof Gunnar Andersson
6cfdc11ea1 Removing deprecated min_pool_size
The database option min_pool_size is not actually
used in oslo.db.

This is a folllow up to
Ib07b7b4200b5cf3a34b8eed441e6754da7d446cf

Change-Id: I89754e9e4b42c45259729b0b0bb0a4bf464a981c
2019-04-06 12:54:28 -07:00
Ben Nemec
57333e902a Bump psycopg lower-constraint to 2.7
Earlier versions don't work with postgresql 10, which is now showing
up in distros.

Change-Id: I56589eb4ac55bec426d16f355398720f2994edcb
Closes-Bug: 1821400
2019-03-22 19:34:32 +00:00
4df865d558 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: Idedd684db42cbda300e69e628e96e4f9475f7df4
Sem-Ver: feature
2019-03-18 14:44:37 +00:00
Zuul
5895d04fd8 Merge "Resolve SAWarning in Query.soft_delete()" 4.44.0 2019-02-13 11:48:46 +00:00
Pierre-Samuel Le Stang
ae227eb3b9 exc_filters: fix deadlock detection for MariaDB/Galera cluster
MariasDB/Galera cluster server produces an error like:

(1213, u'Deadlock: wsrep aborted transaction')

which is currently not detected properly and, thus, not retried.

Change-Id: Ifb4a81d50e490e734e12986e51efd6bd3c339c31
Signed-off-by: Pierre-Samuel Le Stang <pierre-samuel.le-stang@corp.ovh.com>
2019-02-08 16:46:21 +01:00
Mike Bayer
af4b2263e4 Resolve SAWarning in Query.soft_delete()
We currently see a lot of warnings like this from
the soft_delete() method:

  sqlalchemy.exc.SAWarning: Evaluating non-mapped column expression
  'updated_at' onto ORM instances; this is a deprecated use case.
  Please make use of the actual mapped columns in ORM-evaluated
  UPDATE / DELETE expressions.

This is because the "evaluate" synchronization strategy would like
to search for objects and update them based on the UPDATE criteria
passed, however the columns given, literal_column('id'),
literal_column('updated_at'), are not mapped to anything. The
evaluator has to make a guess that the string contained in these
expressions should be matched to a mapped attribute on the given
entity and this guess was first removed in [1], then added back in
[2] with a warning (likely since oslo.db is invoking it).

This uses the actual entity-mapped column for the query rather
than the literal string column.

[1] https://docs.sqlalchemy.org/en/latest/changelog/changelog_12.html#change-b1e620dece39006ab44c47044e9a6fee
[2] https://docs.sqlalchemy.org/en/latest/changelog/changelog_12.html#change-dff3a469788c81a46440584406cb22be

Change-Id: I192e84ce757d12d33085a209dd58d8ea46fb90fb
Closes-Bug: #1814199
2019-02-01 11:57:40 -05:00
Zuul
8c60cc1135 Merge "Update hacking version" 2019-01-22 19:07:49 +00:00
Zuul
7d36be9982 Merge "Use template for lower-constraints" 2019-01-09 19:04:36 +00:00
ZhijunWei
0d75776ae5 Update hacking version
update the hacking to latest, due to [1]

[1]: https://github.com/openstack/oslo.db/blob/master/HACKING.rst

Change-Id: I04147f3cbcb9c89a9a1afc1bcb299be8bdf06718
2019-01-03 00:53:13 +08:00
Mike Bayer
a6d2cc57d4 Remove convert_unicode flag
This flag is to be deprecated in SQLAlchemy version 1.3,
as it is a leftover from the pre-Python 3 legacy days when
DBAPIs under Python 2 would crash if you passed them a
u'' object.   While still available in 1.3, it will emit a
deprecation warning, so it's time to stop using this flag and to
locate any downstream Openstack projects that might be relying
on its behavior in a Python 2 context; the flag has no real effect
on Python 3.

Change-Id: I01984b4ff7e03dcf91ef8dcb05da67dda8270ae3
References: https://github.com/sqlalchemy/sqlalchemy/issues/4393
2018-12-21 12:50:25 -05:00
Andreas Jaeger
d65c3709b9 Use template for lower-constraints
Small cleanups:

* Use openstack-lower-constraints-jobs template, remove individual
  jobs.
* Sort list of templates

Change-Id: I96e67b9d57710d707328a514d837bfe95d976ce4
Needed-By: https://review.openstack.org/623229
2018-12-20 20:11:10 +01:00
ZhongShengping
f1be3e74a6 Update mailinglist from dev to discuss
openstack-dev was decomissioned this night in https://review.openstack.org/621258
Update openstack-dev to openstack-discuss

Change-Id: I773a629ab2fb8273004da92a217cd09f39132108
2018-12-05 09:38:17 +08:00
Zuul
fb12d340e8 Merge "Move warnings to their own module" 2018-10-30 03:35:54 +00:00
Mike Bayer
5b36e169ea Add "is_started" flag to enginefacade
Some module reloading scenarios such as that which occurs
within mod_wsgi mean that an existing module-level enginefacade
is already in the "started" state, however initialization
routines from the calling application may still attempt to
call the ``.configure`` method.  Add a new flag is_started
to both _TransactionContextManager and _TransactionFactory so
that calling code can check for this state ahead of time;
additionally, promote the TypeError raised to a specific subclass
enginefacade.AlreadyStartedError to allow for better optimistic
schemes.

Change-Id: I2f5a9e35c2fae0c28b78beef3dcd2c4794362766
References: I704196711d30c1124e713ac31111a8ea6fa2f1ba
2018-10-24 13:45:50 -04:00
Stephen Finucane
1f0f5654a7 Move warnings to their own module
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>
2018-10-17 14:04:42 +01:00
ZhongShengping
baa0a045b5 Clean up .gitignore references to personal tools
Developers run all sorts of different tools within Git repositories,
any of which can leave their own special trashfiles all over the
place. We can't every hope to catalog them all, so better to
recommend developers simply configure a global core.excludesfile to
filter the irrelevant files which tend to get created by their
personal choice of tools.

To this end, remove the long-standing sections for "Mr Developer"
and "Editors" since their mere existence here sends the signal that
we welcome (and have time to review) additions for any old tool
someone ever might happen to try. Also add a comment block
explaining this, for clarity.

We can, and should of course, continue to list files created by the
tools recommended by our workflow (test frameworks called from tox,
documentation and packaging builds, et cetera).

This change is a port of I1b41efac219fca44e2548fc36633724d0ecfc0cb
from the openstack-dev/oslo-cookiecutter repository.

Change-Id: I8ba491deac8de5d9f2a8ceefba64c0c6a73f92d1
2018-10-15 11:47:25 +08:00
Zuul
924fae4a47 Merge "Don't quote {posargs} in tox.ini" 2018-10-10 01:11:01 +00:00
Hervé Beraud
67b02d047a Always build universal wheels
All of our projects are pure python, so we can build
universal wheels by default.

Change-Id: Ifbba76848c79be9415c7305f90d020973d3bb116
2018-10-09 15:52:22 +02:00
Vieri
49e5bbe55e Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: Id8b5f9e1e334609d39a58706ac2039240f0ce9cb
2018-10-09 13:35:12 +00:00
Mike Bayer
e64c6bb697 Fix FOREIGN KEY messages for MariaDB 10.2, 10.3
MariaDB 10.2 and 10.3 have changed the format diplayed
for MySQL error 1091, adding the phrase "FOREIGN KEY",
changing the quoting style of the constraint name, and
replacing the phrase "column/key" with the word "it".
Adjust the regular expression in exc_filters to accommodate
these.

- "check that column/key" ->
  "check that constraint/column/key"
https://github.com/MariaDB/server/commit/db7edfed17efe6bc

- single quotes -> backticks
- "check that constraint/column/key" ->
  "check that it"
https://github.com/MariaDB/server/commit/99e48cb1d94e2d88

- "Can't DROP" -> "Can't DROP FOREIGN KEY"
https://github.com/MariaDB/server/commit/5c764a0eb82c87ac

Change-Id: I165c595edbbdc101ebd2367ca5680b6cd81eaa7b
2018-08-30 17:52:09 -04:00
Zuul
19859ac6e2 Merge "add lib-forward-testing-python3 test job" 2018-08-27 11:54:45 +00:00
OpenStack Proposal Bot
074c4851ec Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I36180c774142f6f268756b373aacd1fd9f5b9d66
2018-08-14 06:13:03 +00:00
Doug Hellmann
da6709626b add lib-forward-testing-python3 test job
This is a mechanically generated patch to add a functional test job
running under Python 3 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: Idc7f9fc739449683a3a5fbcdd080a5105f061e85
Story: #2002586
Task: #24322
2018-08-11 18:20:12 -04:00
Doug Hellmann
0dbb8dd0af add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I08f1b22e5d244cf0d4a263707b13286e941f6fde
Story: #2002586
Task: #24322
2018-08-07 16:17:32 -04:00
Doug Hellmann
0d60c4bedf import zuul job settings from project-config
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: Ie480cd3681b0a3eedbaebe1f30b7a863c87360ec
Story: #2003250
2018-08-03 17:44:18 -04:00
256ebc3513 Update reno for stable/rocky
Change-Id: Ie63b9305295fea38d2e142c2fbbd3b94d9515829
2018-07-26 12:37:57 +00:00
Vu Cong Tuan
944fe4b6c1 Switch to stestr
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Change-Id: Ifd51e726de277d33ff61db47110bf8b5563fcda7
2018-07-13 10:18:54 +07:00
Zuul
dff11337f5 Merge "Rename enginefacade.async to enginefacade.async_" 2018-07-04 00:40:44 +00:00
Mike Bayer
df6bf34012 Rename enginefacade.async to enginefacade.async_
Python 3.7 now makes "async" a keyword, so deprecate the
"async" name and replace with "async_".  Additionally,
use attribute name access only in order to implement and
test "async" as it won't work under Python 3.7.

Closes-Bug: #1775866
Change-Id: Ifb2c59c2cfbd615b04570b31fcfe868f4ffea3c6
2018-07-02 18:02:24 -04:00
melissaml
c49c96ff74 Add release notes to README.rst
Change-Id: Ieb5a1c097242542d2fdada305f223d2b43c6b0c6
2018-06-21 13:16:03 +08:00
Mike Bayer
43af1cf083 Remove most server_default comparison logic
Added a new test case that covers comparison of a MySQL server default
defined as text("0") in the model as well as in the database.   The
MySQL default comaprison logic in oslo.db was not accommodating of the
model side here being a text() construct.   As modern Alembic
versions supports most of the use cases tested here,
remove all server defaut comparison logic except for the boolean
comparison workaround.

Alembic minimum is bumped to 0.9.6; the issue repaired between
0.8.10 and 0.9.6 is http://alembic.zzzcomputing.com/en/latest/
changelog.html#change-5459a7552a17d8b658f0f710bedf6da0

Depends-on: I1a8244edae47b04b7b1fed54e577d6534945bcd8
Closes-bug: #1776527
Change-Id: I48a103e28d86128ea84466da4d9d6faab1dd9a9d
2018-06-15 13:31:38 +10:00
Doug Hellmann
4c70002578 remove sqla_09 test environment
We no longer support SQLAlchemy 0.9.0, so remove the test environment.

Change-Id: I614945b178ee09fe3c4c6c61c9356d072d776639
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 17:33:06 -04:00