This option was deprecated a long ago[1] and has had no effect for
multiple releases.
[1] 46d6b9306c26f36bc2d490afd9fcab30aa4725f5
Change-Id: I0971f67b43292f8794aa3329b2e7dccc67ec3f6f
Based on the agreed steps to implement the SRBAC community goal, this
enables the new policy defaults and scope checks by default.
Change-Id: I315893150549d1174c3270c37c031e6a519f9a28
This is a prep work to enforce new default policy rules and scope
checking, and allows users to enable/disable the enforcement by setting
the single knob.
Change-Id: I8248f825a90b50fe874224c7ee06a1de299f1feb
SQLAlchemy 2.0 wraps mostly everything in transactions, which limits our
ability to do this easily on a non-global basis. Use the raw connection
[1] instead.
[1] https://docs.python.org/3/library/sqlite3.html#sqlite3.Connection.execute
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic2bbf59550e965769c6b64f3e5eeec9783c6b290
We were previously calling 'connect()' on the 'connectable' object in
'run_migrations_online', regardless of whether it was an 'Engine' or
'Connection' object. This worked because, as noted in an inline comment,
"when connectable is already a Connection object, calling 'connect()'
gives us a *branched connection*." This is no longer the case. From the
SQLAlchemy docs [1]:
The Connection object does not support "branching", which was a
pattern by which a sub "connection" would be used that refers to this
connection as a parent.
Update our code to reflect this change, using the newly updated example
from the SQLAlchemy cookbook doc [2] as inspiration.
[1] https://docs.sqlalchemy.org/en/14/core/future.html#sqlalchemy.future.Connection
[2] https://alembic.sqlalchemy.org/en/latest/cookbook.html#connection-sharing
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Id41ae6d3fa3f343efdb727aae9bdef8ad2a098fd
This also gets us away from autocommit, i.e. the last outstanding item
in our preparation for SQLAlchemy 2.x.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I95c5e5d6b33e73a1df2bf036df44aa2e06cc9640
Make sure we avoid nested sessions going forward.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ia171bb823f5302fb3a6b2f6f88f7295f97254759
There are only a few callers. Do it directly.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ib9cb53c0a9a6b309e625bc8ed4facc18c4fbe0ba
This is the final preparation step for our removal of autocommit. This
makes our life easier since we can insist on only opening transactions
inside the public method.
On a related point, we remove one commit call from a private method and
keep another.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I75cf29a18b2179949ee4713f85ca52256d170c84
Well, we actually remove it but keep the entry point to avoid breaking
scripts. This has been around since 2016 and anyone that hasn't upgraded
now ain't upgrading.
This is one less set of APIs to worry about when removing the use of
autocommit.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I43051b3ca6e292f1164d750b04d7a440012b2ef5
Another step to make removal of autocommit easier.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I664a927198df1be89dcd9a5304afaf452795dcc6
This will make our life easier as we attempt to remove autocommit by
allowing us to maintain a pattern of only opening transactions inside
public methods.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: I74069645babc4200ffd4087503277282b4c12792
This turned out to be easier done that I expected.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ie50b4bd212c758ec41c82be145290024910099a0
This patch adds support for Aodh alarms of type Prometheus.
Depends-On: I72e124cca4398b78f7ed12e1db3f66bdbfcb196e
Change-Id: I5bb7c4d9086715fc22c0f7abc36d9bbfc88a60c9
Add file to the reno documentation build to show release notes for
stable/2023.2.
Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.
Sem-Ver: feature
Change-Id: Ie6ed8c8b287cfeedcf1ee35cbb18f5bacf14adfa
Since we bumped Fedora version used in CI from 36 to 37, we've
seen timeout during boot process more frequently, which results
in job failure. This increases core and ram assigned to Fedora
VMs, to reduce failure rate.
To avoid consuming too much resources, this limits concurrency
of test runner.
Change-Id: I12e8ee0861629fd42a6bd03ec8705751da12ff61
Some tests were failing if run by themselves.
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Change-Id: Ic797e8648283605940be9d0889c38641f34e86e7
Software deployments have FK constraints on software configs.
This change ensures the DBReferenceError caused by the constraints is
properly caught. With this change now heat returns 400 Bad Response,
instead of 500 Internal Server Error when a user tries to create
a software deployment with a non-existing software config.
Also, the stack_user_project_id field is defined as 64-chars-long
string in DB model, so we should ensure that the input value is shorter
than 65 chars. Otherwise it also results in DB error.
Story: 2010001
Task: 45098
Change-Id: I03274dc0cffa226140eb720458cce81e8b5ce187
Fedora 36 is already EOLed so we should use more recent version.
Because guest enters to emergency shell when Fedora 38 (latest at
the time of writing) is used, we select Fedora 37 for now.
Change-Id: Ie0876080c771fb124d4dd36f803fbfd3b108e240
Python 3.11 job run on Debian Bookworm which does
not have the mysql pkg for example, libmysqlclient-dev
instead they have mariadb. Updating bindep.txt file
to adjust the pkgs as per Debian bookworm.
Based on [1]
[1]: https://review.opendev.org/c/openstack/placement/+/893821
Change-Id: I18951908a1bea5f9f266382e8c7bfa91a5e6f38f