Commit Graph

713 Commits

Author SHA1 Message Date
Zuul 074f18abc8 Merge "reno: Update master for unmaintained/victoria" 2024-03-12 13:13:06 +00:00
OpenStack Release Bot 1945a040fa Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

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

Sem-Ver: feature
Change-Id: I185d17b1fc53768d448d272352b90d3a65ae4d99
2024-03-08 14:21:58 +00:00
OpenStack Release Bot e59f9fa675 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: Ie152ac05d3941aa8bfee511fa5ca33fd99a03cd3
2024-03-07 14:15:00 +00:00
Zuul 53709baa92 Merge "Fix wrong stacklevel" 2024-02-22 10:45:54 +00:00
Takashi Kajinami 925c2a241f Fix wrong stacklevel
We don't have to look for upper call layers for that specific warning
messages.

Change-Id: Ifdc568c29e29c049dede280b76010a2c69928e76
2024-02-22 00:02:38 +09:00
Zuul eedd2d842b Merge "pre-commit: Integrate bandit" 2024-02-21 06:08:38 +00:00
Zuul d42e5de219 Merge "pre-commit: Bump versions" 2024-02-21 06:08:37 +00:00
Zuul a2616eddb7 Merge "Drop fallback to DEFAULT section" 2024-02-13 13:48:21 +00:00
Takashi Kajinami d51723fa64 Drop fallback to DEFAULT section
The fallback was added 9 years ago, in 0.1.0 release[1].

[1] c98d5edc44

Change-Id: I3b66c5f9df58eaeea9fc51a6c0b83af2e39a525b
2024-02-07 23:17:36 +00:00
Takashi Kajinami 8ff86619bb Display coverage report
... for easy reference. Also make sure old data is purged.

Change-Id: I90bdc8e5eaf738dcbf05715436c7ba140e6f5dfb
2024-02-07 03:10:50 +00:00
Takashi Kajinami 797f40aa43 pre-commit: Integrate bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Id17f4865b2da9f4a5c1cd5ea360cd007315d1c0e
2024-02-02 21:46:30 +09:00
Takashi Kajinami 36bb13ec03 pre-commit: Bump versions
hacking now has a native hook.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ifc1875cc30d6724ae414cd9cd5c3d66e033c272c
2024-02-02 21:44:56 +09:00
Takashi Kajinami dedcc75835 Bump hacking
hacking 3.0.x is too old.

Change-Id: Ic768c0687f090f9ccc91d4eae6474b2a5993e06c
2024-01-26 01:23:46 +09:00
Ghanshyam Mann 7f1b9d1588 Update python classifier in setup.cfg
As per the current release tested runtime, we test
python version from 3.8 to 3.11 so updating the
same in python classifier in setup.cfg

Change-Id: I2c0432d7bfe39721602ac6773ddb5fed2f9dd384
2024-01-11 15:36:14 -08:00
Takashi Kajinami bd96105622 Deprecate Windows support
Because WinStackers project has been retired, running OpenStack on
Windows operating systems is no longer maintained.

Change-Id: If4ad14a9f7f974c120c6d70c826a1bba358052a3
2023-11-18 17:37:43 +00:00
OpenStack Release Bot 774f604c16 Update master for stable/2023.2
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: I8a07d02ce4384d2a8ae010b23a4151f0a43c2800
2023-09-07 09:36:02 +00:00
Zuul 1abc8e0c50 Merge "Bump bandit" 2023-06-27 13:46:24 +00:00
Hervé Beraud b4aec262e3 Bump bandit
Change-Id: I2432f5d6c9febfa3a579551f116692618982ecf3
2023-05-17 16:24:29 +02:00
OpenStack Proposal Bot 9c7ecb4198 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I6e9065fb6f5c34dcce87168edaa62b430801d1c8
2023-05-09 04:24:56 +00:00
Ghanshyam 28fd71fafd Revert "Moves supported python runtimes from version 3.8 to 3.10"
This reverts commit d41e8f3e2e.

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: Ic916838612b02eb5b7b1a140d1066a8298774009
2023-05-04 20:19:39 +00:00
Hervé Beraud d41e8f3e2e Moves supported python runtimes from version 3.8 to 3.10
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: I8f9d3349881703fc2fcc91c28b1ce1df65cb6539
2023-04-10 01:53:34 +00:00
OpenStack Release Bot 8c582a41a2 Update master for stable/2023.1
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: I4954e7590655ffbf44014b68dedacd9051e9d6a1
2023-02-24 15:16:10 +00:00
Hervé Beraud 0af59425ad Fix issues related to tox4
Related to https://lists.openstack.org/pipermail/openstack-discuss/2023-February/032247.html

Change-Id: I38b5e7fe25820ffda712bbc983e4ea3d6c3bf17d
2023-02-17 13:16:04 +00:00
Zuul d1f07ad353 Merge "Cleanup py27 support" 2022-12-20 19:11:36 +00:00
OpenStack Proposal Bot 22f69e7402 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic909177a35589f59ea78fec6e741c2c954abc119
2022-11-05 03:27:01 +00:00
Balazs Gibizer 01cf2ffdf4 Ignore coverage result files
Change-Id: I82d120f2a04eebf40f309a5d301ad253744d9712
2022-09-05 13:29:49 +02:00
Balazs Gibizer ee3f73a133 Fix fair internal lock used from eventlet.spawn_n
The fasteners lib in version 0.15.0 removed the
threading.current_thread workaround for eventlet[1] because eventlet
seemed to fixed the current_thread issues tracked in [2]. However the
fix for [2] only fixed half of the problem. The threading.current_thread
call works if it is called from thread created by eventlet.spawn.
However if the thread is created with eventlet.spawn_n then
threading.current_thread is still broken and returns the ID of the
python native thread.

The fasteners' ReaderWriterLock depends heavily on
threading.current_thread to decide which thread holds a lock and to
allow re-entry of that thread. This leads to the situation that
multiple threads created from spawn_n could take the same
ReaderWriterLock at the same time.

The fair internal lock in oslo.concurrency uses ReaderWriterLock and
as a result such lock is broken for threads created with spawn_n.

Note that this issue was raised with eventlet in [3] when the nova team
detected it via a direct usage of ReaderWriterLock in the nova test
code. As [3] did not lead to a solution in eventlet nova implemented a
nova local fix for the test code in [4].

However now we detected that oslo.concurrency is affected by this issue
as well.

This patch restores the workaround that was removed by [1].

Note that a fasteners issue [5] also opened to restore the
workaround[1].

[1] 467ed75ee1
[2] https://github.com/eventlet/eventlet/issues/172
[3] https://github.com/eventlet/eventlet/issues/731
[4] https://review.opendev.org/c/openstack/nova/+/813114
[5] https://github.com/harlowja/fasteners/issues/96

Closes-Bug: #1988311
Change-Id: Ia873bcc6b07121c9bd0b94c593567d537b4c1112
2022-09-05 13:29:04 +02:00
Balazs Gibizer 796203c948 Prove that spawn_n with fair lock is broken
The fasteners lib in version 0.15.0 removed the
threading.current_thread workaround for eventlet[1] because eventlet
seemed to fixed the current_thread issues tracked in [2]. However the
fix for [2] only fixed half of the problem. The threading.current_thread
call works if it is called from thread created by eventlet.spawn.
However if the thread is created with eventlet.spawn_n then
threading.current_thread is still broken and returns the ID of the
python native thread.

The fasteners' ReaderWriterLock depends heavily on
threading.current_thread to decide which thread holds a lock and to
allow re-entry of that thread. This leads to the situation that
multiple threads created from spawn_n could take the same
ReaderWriterLock at the same time.

The fair internal lock in oslo.concurrency uses ReaderWriterLock and
as a result such lock is broken for threads created with spawn_n.

Note that this issue was raised with eventlet in [3] when the nova team
detected it via a direct usage of ReaderWriterLock in the nova test
code. As [3] did not lead to a solution in eventlet nova implemented a
nova local fix for the test code in [4].

However now we detected that oslo.concurrency is affected by this issue
as well.

This patch adds tests to show the scope of the problem.

Note that the coverage tox target is changed to explicitly enable native
threading otherwise it runs eventlet specific tests in a native
environment.

Also note that [5] was opened to reintroduce the workaround[1] in fasteners.

[1] 467ed75ee1
[2] https://github.com/eventlet/eventlet/issues/172
[3] https://github.com/eventlet/eventlet/issues/731
[4] https://review.opendev.org/c/openstack/nova/+/813114
[5] https://github.com/harlowja/fasteners/issues/96

Related-Bug: #1988311
Change-Id: Ibc193c855b49b95b46ebd2aac82ea89e33f885f0
2022-09-05 13:27:37 +02:00
niuke c7d214bae4 Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py

Change-Id: I89ea0dab79cdc53c164c171a42a06f2a6d6aefad
2022-08-13 09:48:11 +08:00
Zuul 052b2f2357 Merge "Fix formatting of release list" 2022-07-14 11:56:56 +00:00
Gorka Eguileor 9800d58cb3 Log when waiting to acquire lock
We currently have no log entry when we start trying to acquire a lock.

In general this is ok, but there are cases where it can be problematic,
for example if we have a deadlock situation or if a lock takes a very
long time to be acquired.

In those scenarios looking at the logs we would see the operation
proceed normally and suddenly go completely silent without knowing that
it's waiting for a lock to be freed.

This patch adds a debug log message right before trying to acquire the
lock so we can detect those situations.

Change-Id: I1354dfb98b0927ae167802ecc4ab1d34f6b4d720
2022-07-07 20:01:48 +02:00
OpenStack Proposal Bot e158ca49be Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Ic6a8cb3efdddaa809b1381a7d9b96e50b7e9da9f
2022-06-21 03:42:17 +00:00
Hervé Beraud c37515e7cc Fix formatting of release list
Change-Id: Icd55bbb5111c12f150b8792c36e201d114ab14dc
2022-05-27 11:58:24 +02:00
Hervé Beraud f4f81cf939 Drop python3.6/3.7 support in testing runtime
In Zed cycle testing runtime, we are targetting to drop the
python 3.6/3.7 support, project started adding python 3.8 as minimum,

example nova:
- 56b5aed08c/setup.cfg (L13)

Change-Id: I1f947ad541b7417fd43ac10feef591fa939f19da
2022-05-05 16:10:49 +02:00
songwenping 145f060b51 Remove unnecessary unicode prefixes
Change-Id: I56651c1b83baaf443551686d7e8545eba2a0c7a1
2022-04-19 19:39:35 +08:00
Zuul 5d17e5fb44 Merge "Allow python_exec kwarg to be None" 2022-04-05 12:04:56 +00:00
Thiago Brito 11210a957c Fix RequiredOptError when missing lock_path
When lock_file is not present on the [oslo_concurrency] section of the
config file, we are getting a misleading error saying that it is not
preset on the DEFAULT group. This commit fixes it by providing the group
arg to the RequiredOptError constructor.

Closes-Bug: #1966320

Signed-off-by: Thiago Brito <thiago.brito@windriver.com>
Change-Id: Idee6987739917c7eae4faee15a66085a9ef7f6d2
2022-03-24 15:13:48 -03:00
Stephen Finucane 51a43dacc4 Update CI to use unversioned jobs template
As part of the migration of this project to the independent release
model, we failed to notice that the job template was still tied to a
specific release. We've now introduced a new unversioned job template,
'openstack-python3-jobs' [1], which was can and should use. Do this.

[1] https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/833286/

Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/833286/
Change-Id: Ifc12f060d9d78dc04b6addbaa441667b00e5bd69
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-03-15 15:07:07 +00:00
tushargite96 3c2a0846c5 Add Python3 yoga unit tests
This patch updates the project template to use the Yoga project template
to ensure unit testing is in place for all of the tested runtimes
for yoga. For more please refer to [1].

[1]: https://governance.openstack.org/tc/reference/project-testing-interface.html

Change-Id: I47f85706b2b5ad8ac12ac67e97b5bb7179572615
2022-03-02 22:19:30 +05:30
Brian Rosmaita a937c5562f Allow python_exec kwarg to be None
processutils.execute() is documented to take a python_exec kwarg and
default to using sys.executable if that argument isn't set.  It is
convenient (and more intuitive) for this behavior to also occur if
the argument is present with value None.

Closes-bug: #1962603
Related-bug: #1962581
Change-Id: I2e1f187feaf4bf9fbfaf04fce78efa0cba49fc07
2022-03-01 13:05:22 -05:00
dengzhaosen 95b9334cfa Update python testing classifier
Yoga testing runtime[1] has been updated to add py39
testing as voting. Unit tests update are handled by the
job template change in openstack-zuul-job

- https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/820286

this commit updates the classifier in setup.cfg file.

[1] https://governance.openstack.org/tc/reference/runtimes/yoga.html

Change-Id: I27c8214b7e56066c1989788a17f49264c86cba6c
2021-12-21 17:30:20 +08:00
Romain Poupin a9ccf0a64d Add support for non-blocking locks
This adds support for a non-blocking behavior of the lock : the context-based
lock now raises an AcquireLockFailedException if the lock can't be acquired on
the first try.

At a higher layer, we just caught this exception inside the 'synchronized'
decorator to prevent calling the wrapped function. In which case, we then
trace this acquisition failure.

For now at least, disabling blocking is not supported when using fair locks
because the ReaderWriterLock.write_lock() provided by the fasteners module
doesn't implements this behavior.

Change-Id: I409da79007c9ba4fb8585da881e3d56998b0b98b
2021-06-24 09:45:48 +02:00
YuehuiLei 8e08400864 setup.cfg: Replace dashes with underscores
Setuptools v54.1.0 introduces a warning that the use of dash-separated
options in 'setup.cfg' will not be supported in a future version [1].
Get ahead of the issue by replacing the dashes with underscores. Without
this, we see 'UserWarning' messages like the following on new enough
versions of setuptools:

  UserWarning: Usage of dash-separated 'description-file' will not be
  supported in future versions. Please use the underscore name
  'description_file' instead

[1] https://github.com/pypa/setuptools/commit/a2e9ae4cb

Change-Id: I4f58234e6f2d0b0b8548d1cf53c266c562b411eb
2021-05-05 10:03:59 +08:00
dengzhaosen 0139c6ccac Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: I1ff344d345b56246e6a86f7761ef900e42daefa2
2021-04-27 02:53:57 +00:00
Zuul 4da91987d6 Merge "Use py3 as the default runtime for tox" 2021-04-16 17:21:33 +00:00
Zuul 2af2fed6c3 Merge "Remove lower-constraints remnants" 2021-04-16 11:54:44 +00:00
Daniel Bengtsson 5397838f41 Move flake8 as a pre-commit local target.
The goal here is to avoid conflicts between flake8 and hacking version each
2 days.

Inspired from nova's approach[1].

The flake8 version to install will be determined by hacking and
requirements[2] will stay aligned instead of relying on different versions.

[1] https://opendev.org/openstack/nova/src/branch/master/.pre-commit-config.yaml#L26-L35
[2] https://opendev.org/openstack/hacking/src/branch/master/requirements.txt#L1

Change-Id: I2486771d784b84eeccdc3a71ab53ce707d2c8f73
2021-03-23 13:15:24 +01:00
wu.shiming 5e6ab754f7 Remove lower-constraints remnants
These were missed in change: Ic086f5e9a7a8b9c9050ef27993f339d52ad1e236

Change-Id: Ifbfb33e18c95a3bf01dd522835d1246989e78242
2021-02-19 14:43:13 +08:00
Hervé Beraud 7dcf9e9da3 Dropping lower constraints testing
We facing errors related to the new pip resolver, this
topic was discussed on the ML and QA team proposed to
to test lower-constraints [1].

I propose to drop this test because the complexity and recurring pain needed
to maintain that now exceeds the benefits provided by this mechanismes.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019390.html

Change-Id: Ic086f5e9a7a8b9c9050ef27993f339d52ad1e236
2020-12-18 15:07:17 +01:00
Hervé Beraud 07cf5c0fc6 Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.

[1] https://review.opendev.org/#/c/722814/
[2] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: Ib833cd6818e7071cf3e85f77966e9c02a4026efd
2020-11-04 10:46:42 +01:00