| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 481936a822425c6a8c806409c8c877eed6661a2c.
Keeping Python 3.10 in setup.cfg classifier.
Reason for revert:
Needed-By: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175
TC has been discussing about re-adding the python 3.8
testing in current master 2023.2 release testing.
- https://meetings.opendev.org/meetings/tc/2023/tc.2023-04-25-18.00.log.html#l-191
- https://lists.openstack.org/pipermail/openstack-discuss/2023-April/033469.html
While governance changes are under review, TC agreed to add py3.8 testing
so that we do not see more project/lib dropping python 3.8 and make them
uninstalable on python 3.8
- https://meetings.opendev.org/meetings/tc/2023/tc.2023-05-02-18.00.log.html#l-17
- https://review.opendev.org/c/openstack/governance/+/882165
Also adding py3.8 testing back in job https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/882175
Change-Id: I8b17440c9d36b36fe50183e61d6f1c22ece6d3d4
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In change I1e71150ba6daeba464b6ed8d46163f1f34959db3 we removed the
legacy base test classes, first deprecated in 2015. We forgot to include
a release note, however. Address this now.
Change-Id: I4d66f0308b89a187143ef6c8495383fe60043c14
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Change I8629225eeb51d95264d8a3e4b719268bb1597f4f bumped the minimum
version for SQLAlchemy to 1.4, meaning this logic is now dead. Remove
it.
Change-Id: I4d4a58e15e840ecfa63e15c709617a65642c8323
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
We were creating regexes without the DOTALL flag, which meant '.' wasn't
matching newlines. This meant exceptions that contained multiple lines
would not be caught. For example, in my environment where Kerberos is
used, I see the following otherwise harmless message:
(psycopg2.OperationalError) connection to server at "localhost" (::1),
port 5432 failed: could not initiate GSSAPI security context: No
credentials were supplied, or the credentials were unavailable or
inaccessible: Configuration file does not specify default realm
connection to server at "localhost" (::1), port 5432 failed: FATAL:
database "non_existent_database" does not exist
The presence of that newline causes our matchers to fail and the
exception is not wrapped. Correct this.
In the meanwhile, we reformat the function that does the wrapping to
make it a little flatter. This was difficult to modify (for debugging
purposes) due to the level of indentation.
Change-Id: I5396a5a3272e6984954d819cfc71507283c775db
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \ \
| |/ / / |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This should have been removed in change
Ic3d6bd318038d723b0d50d39e45f8e26289e9a57 but was missed.
Change-Id: I4e1faa2c617ac19e7c9766e99ee9012ad9298d31
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \ \
| |/ / /
| | / /
| |/ /
|/| | |
|
| |/
| |
| |
| |
| |
| |
| | |
Mock it out, reducing test run of ~3 and ~15 seconds to milliseconds.
Change-Id: Ice3a0c0d0a5b8c2920c7f775ff8ce974b572c66e
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The fixtures have been available for a very long time now. We can drop
these.
Change-Id: I1e71150ba6daeba464b6ed8d46163f1f34959db3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Within 2023.2 python version 3.9 and 3.10 are the
supported python runtimes [1].
[1] https: //review.opendev.org/c/openstack/governance/+/872232
Change-Id: I0cb0d4e03858a4f394aed484508b305683ce7863
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add two new jobs to verify the main branches of these two projects. This
should keep us on top of things.
Change-Id: Iaa955e6d5563c97ab5cc64fe9133db63d6489a0e
Depends-on: https://review.opendev.org/c/openstack/project-config/+/879549
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This functionality has been available upstream since SQLALchemy 1.2 [1].
However, for oslo.db to use this feature while maintaining full
behavior, we need at least SQLAlchemy 2.0.5 to provide complete event
support. In particular, oslo.db adds several new "is disconnect"
conditions including those specific to Galera.
Behavior of the handle_error event is modified to expect the "pre-ping"
calling form, which may not have an "engine" present (only a dialect),
and additionally takes advantage of the new is_pre_ping attribute which
informs on the correct way to affect the disconnection status within the
ping handler.
Change-Id: I50d862d3cbb126987a63209795352c6e801ed919
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remaining issues encountered when running with SQLAlchemy 2.0 for real:
* Never call str() on a URL and expect it to be meaningful anymore.
The password is aggressively obfuscated now (users absolultely
wouldn't let us leave it as is)
* More utilities and fixtures that were calling begin() within a
block that would have already begun
* isnot is now called is_not; mocking "isnot" leads into too many
weird compat layers
* ORM InstrumentedAttribute and internals use __slots__ now, mock
seems to not be able to patch methods. Ideally these tests would use
a comparator subclass or something
* Connection.connection.connection is now called driver_connection,
SQLAlchemy keeps the old name available however oslo.db test suite
does not appear to tolerate the deprecation warning emitted,
so add a compat layer
* mapper() is fully removed from 2.0, not sure if there is another
not-yet-committed gerrit that removes mapper()
[1] https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine.params.pool_pre_ping
[2] https://docs.sqlalchemy.org/en/20/changelog/changelog_20.html#change-2fe37eaf2295cebd3bb4ee8e5b8c575c
[3] https://github.com/sqlalchemy/sqlalchemy/issues/5648
Change-Id: Ifaca67c07f008d8bc0febeecd3e200cc7ee7a4b0
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The SQLAlchemy method ``url.make_url`` accepts strings and ``url.URL``
object types. By default, oslo.db was converting any object to string
before calling ``url.make_url``, that parses this string. Since
SQLAlchemy 2.0, the ``url.URL.__str__`` method is removed and the
``url.URL.__repr__`` method returns a string with the password hidden.
The new utility method checks what type of object is passed and only
if the object is not a string nor a ``url.URL`` object, is converted
to a string.
Closes-Bug: #2012928
Change-Id: I84f13f378f83e2a55078370ae2b4787f00982c23
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sqlalchemy-migrate does not support SQLAlchemy 2.x and we're not going
to invest the time in changing this. Remove integration of
sqlalchemy-migrate in oslo.db, allowing us to support SQLAlchemy 2.x
fully.
Note that we do not remove the 'migration_cli' module entirely yet.
While this is deprecated, it is possible to use this with alembic.
New users shouldn't be switching to it, but any existing users can
continue to use this module for some time yet.
Change-Id: Ic3d6bd318038d723b0d50d39e45f8e26289e9a57
Sem-Ver: api-break
|
|
|
|
|
|
|
|
|
| |
In the method ``engines._connect_ping_listener``, the connection should
be rolled back after the ping execution. The rollback will revert the
transaction and delete it.
Closes-Bug: #2008209
Change-Id: Iba29ded227634e02795052acfd89b572bf21f54c
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add file to the reno documentation build to show release notes for
stable/2023.1.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.
Sem-Ver: feature
Change-Id: I564d0adb2b6bd7df059ebe40d34715ecd0e2197e
|
|
|
|
|
|
|
| |
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: Ib2362e15f0b610412ed992d63da63ad2d2b39883
|
|
|
|
|
|
|
|
|
|
| |
The default value for wsrep_sync_wait option should be `None`.
However, since 0 is set incorrectly, an unintended process is executed.
This patch fixes default value for wsrep_sync_wait option to `None`
instead of `0`.
Change-Id: Ifb1dc7ddcb127a69ea01234922caa7ca5ab111ce
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
the bandit command excludes the folder named "tests" but does not
seem to exclude where the tests actually are here, which is
oslo_db/tests. add this folder, as we have "assert" statements
as well as pickle use in our test suite, which bandit disapproves of.
Change-Id: I63ad4fbbd7fa72e7a4d8ebd458d323516f997424
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When using Galera, the wsrep_sync_wait option [1]
can change the behavior of a variety of Galera DQL/DML statements
such that a particular operation will pause until outstanding
write-sets are fully persisted to the local node. The setting
supersedes the previous boolean parameter wsrep_causal_reads
which only affected SELECT, with an updated approach that allows
for fine-grained control of so-called "causality checks"
on individual statement types. The legacy-compatible setting
of '1' indicates that READ/SELECT/BEGIN operations should
proceed only after any pending writesets are fully available.
The use case for this setting is for an application that
is running operations on multiple Galera nodes simultaenously.
An application that commits data on one node, and then immediately
uses a different connection (on a potentially different node)
to SELECT that data, may fail to see those changes if
"causality checks" for SELECT are not enabled. While
a COMMIT operation in Galera will block locally until all other
nodes approve of the writeset, the operation does not block
for the subsequent period of time when other nodes are actually
persisting that writeset. Setting up "causal reads"
in this case indicates that a SELECT operation will wait until
any writesets in progress are available, thus maintaining
serialization between the COMMIT and subsequent SELECT.
As the name implies, wsrep_sync_wait adds...waiting! to the
operation, and thus directly impacts performance by adding
latency to SELECT operations or to the operations that have
been selected for causality checks, to the degree that
concurrent writesets are expected to be present.
Since it's not expected that most if any Openstack applications
actually need this setting in order to be effective with
Galera multi-master operation, and as the setting is available
within client session scope and also impacts performance,
making it available on a per-application basis means that
specific applications which may see issues under load can
choose to enable this setting, much in the way any other
"transaction isolation" settings might be made, without having
to add a cluster-wide performance penalty by setting it at the
Galera server level.
[1] https://mariadb.com/docs/ent/ref/mdb/system-variables/wsrep_sync_wait/
Change-Id: Iee7afcac8ba952a2d67a9ad9dd0e4eae3f42518e
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoids the following warning:
SAWarning: Could not assemble any primary keys for locally mapped
table 'fake_table_inh' - no rows will be persisted in this Table.
class FakeTableJoinedInh(FakeTable):
Change-Id: Ia7795be05e6364d8b2d70be70f5154094a55161a
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for antelope.
See also the PTI in governance [1].
[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html
Change-Id: If49ecb73f63339772f56dc96545d922330ae7620
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems postgres-client has changed the format of error messages.
Previously we saw messages like:
fatal: database "non_existent_database" does not exist
These are now prefixed. For example:
connection to server at "localhost" (::1), port 5432 failed: fatal:
database "non_existent_database" does not exist
You can see this in the docs. Compare the "Client Connection Problems"
section for Postgres 13 [1] to Postgres 14 [2].
[1] https://www.postgresql.org/docs/13/server-start.html
[2] https://www.postgresql.org/docs/14/server-start.html
Change-Id: Id2c8eec202d128d142b8a8a8f904fcc14b6f52d7
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-bug: #1989208
|
|/
|
|
|
|
|
| |
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html
Change-Id: Iae58f095c34f7118a4a2683b6d283e8cf81836b8
|
|
|
|
|
|
|
|
| |
The 'assert_has_calls' is a method, not a variable.
Change-Id: I6aea978b8fc9adf4a062c149c84d6562f5adec04
Closes-Bug: 1989280
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Traditionally, the MySQL support in oslo.db has assumed use of the
InnoDB storage engine. However, this isn't the only storage engine
available and a few years ago an effort was made to add support for
another storage engine, MySQL Cluster (NDB). The oslo.db aspects of this
effort were tracked via bug 1564110 [1] and from reading this bug and
looking at other patches related to this effort [2], it becomes obvious
that this was never seen through to the completion and the
OpenStack-wide effort never took off [3]. As a result, much of what is
here is in-effect dead code now.
Given no one is using this engine, there's no reason to keep it around.
Deprecate it with an eye on removing it sooner rather than later.
[1] https://bugs.launchpad.net/oslo.db/+bug/1564110
[2] https://review.opendev.org/q/owner:octave.orgeron%2540oracle.com
[3] https://review.opendev.org/c/openstack/openstack-specs/+/429940
Change-Id: Id5ddf1d6f47b8a572001f58ad8b9b8a7dbe4e8ac
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
Change-Id: Iad89a0564b7851d75703f769c6eb96fbfe9a1e97
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
In change Idf6fd858fad9521c7c5ba82c31b6d3077756abd9, we defined the
'cache_ok' key on a number of custom types. However, we relied on this
attribute being inheritable which is not the case due to how that
attribute is checked for [1]. As a result, we must set this attribute on
every one of our custom types.
[1] https://github.com/sqlalchemy/sqlalchemy/blob/rel_1_4_41/lib/sqlalchemy/sql/type_api.py#L984
Change-Id: I005af8c7afe3b5104068ca153aecbfe54e163ca3
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add file to the reno documentation build to show release notes for
stable/zed.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.
Sem-Ver: feature
Change-Id: Ic0f1c5a9e902f13b66bab62d32e452211fb277ef
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Replace abc.abstractproperty with property and abc.abstractmethod,
as abc.abstractproperty has been deprecated since python3.3[1]
[1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc
Change-Id: Id90fbd2c53fd49341043bde740500a857a4339d3
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Enable the 'CaptureOutput' fixture provided by oslotest by default.
Change-Id: Ib34d8ab411a67816db2e26b49bec75993b5bed56
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We've deprecated a number of modules recently. We don't need to emit
these warnings when running unit tests. Silence things.
Change-Id: I7aed7789584bf0070f11c22b5eaa0e80c42dfc9c
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \
| |/ / |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We shouldn't be raising warnings from SQLAlchemy. Where we are
intentionally doing so, we should capture these warnings at the test
level. This requires some minor fixes.
Change-Id: I9d4512dc337153edc48a2cc3bf95ab2b31c39ccf
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
|
|\ \ \
| |/ / |
|