Commit Graph

1020 Commits

Author SHA1 Message Date
Vasyl Saienko a1fe1b9cfb Fix eventlet detection
Eventlet may be installed, but not used for example projects
like octavia. Improve autodetection mechanism by trying to import
module and check if it is actually patched.

Closes-Bug: #2039346
Change-Id: I860abe953ce945bb5152c77a7daeb6aa1003512b
2024-03-26 14:50:12 +00:00
Zuul 3e58709e80 Merge "reno: Update master for unmaintained/victoria" 2024-03-12 13:15:18 +00:00
OpenStack Release Bot 66285911c0 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: I4f35c60e6b4605bc09eadf51c97ca118221afc21
2024-03-08 14:22:36 +00:00
OpenStack Release Bot f157e2bce9 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: If991ba29c68011a7a1d76b13e7c3abab52d05f9f
2024-03-07 14:16:13 +00:00
Takashi Kajinami a892465f19 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: Ie797e48fb9d04649fa70e3d5c2f4161d123ed8f5
2024-02-06 15:18:54 +09:00
Takashi Kajinami de07539a7b pre-commit: Bump versions
hacking now has a native hook.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ib7af2d4299853e9758cbf148908aa1ef5de1b235
2024-02-06 15:17:51 +09:00
Takashi Kajinami 631b2f62dc Bump hacking
hacking 2.0.x or 3.0.x is too old.

Change-Id: If6b2d64febbf00814503eccd59dd9dadd330e0ba
2024-02-06 15:16:17 +09:00
Ghanshyam Mann fddcbf1365 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: Ie93ba0a3b817944b9ca801590c02d3900c23cde6
2024-01-11 16:18:47 -08:00
Zuul b5b8c30b0d Merge "Deprecate Windows support" 2023-09-08 11:27:29 +00:00
Takashi Kajinami f3693db5ee Deprecate Windows support
Unfortunately the Winstackers project has been retired because of no
maintainers[1][2], and OpenStack on Windows host is no longer
maintained.

[1] https://lists.openstack.org/pipermail/openstack-discuss/2022-November/031044.html
[2] https://review.opendev.org/c/openstack/governance/+/886880

Change-Id: I4ad06af023fb4812dc9c6a15a23c5e85ef6cce8d
2023-09-08 08:25:38 +09:00
OpenStack Release Bot ca1ef3b8c9 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: I8edfee12910034cbff318131654ffe00de8396c9
2023-09-07 09:37:02 +00:00
Zuul 0b47867702 Merge "Catch RuntimeError when loading log config file" 2023-08-23 08:45:02 +00:00
Zuul 82a59af436 Merge "Bump bandit" 2023-08-10 17:13:18 +00:00
Alfredo Moralejo 390a1d108e Catch RuntimeError when loading log config file
Since python 3.12, logging is raising RuntimeError when content is
invalid [1][2]. Note this is also backported to 3.11 branch.

This is making oslo_log to not raise LogConfigError but throw the
underlying RuntimeError.

[1] 152227b569
[2] 12f1581b0c

Change-Id: I7631394bee7281f6a393ab4ba7604f871626997a
2023-08-09 16:03:23 +02:00
Hervé Beraud bf52b05995 Bump bandit
Change-Id: I113d97b3719cce3c4c19c16ea7b8b395cc3beaa0
2023-05-19 14:45:39 +02:00
OpenStack Proposal Bot eaf6089ab2 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If54645a47ec9bc193215550f4f37e3f8a3ab131a
2023-05-09 03:43:09 +00:00
Ghanshyam a0c3ca8ce1 Revert "Moves supported python runtimes from version 3.8 to 3.10"
This reverts commit 6abf69e194.

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: Ib5b901f245cb65bbd9deee6e030ddb96fc7b8015
2023-05-04 20:19:08 +00:00
Hervé Beraud 6abf69e194 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: Ibabaaf286ca4ce942908086e490929900ccf7c95
2023-04-10 01:50:19 +00:00
OpenStack Release Bot ecfe66faa1 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: I8e979b65ca350f53b6eb795f5d2358c628268425
2023-02-24 15:19:10 +00:00
Zuul 76f3098ac0 Merge "Cleanup py27 support" 2023-02-17 14:57:51 +00:00
OpenStack Proposal Bot 15c71dd604 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: If528578c75c86ab560b19a53e32fca921c827878
2023-01-28 03:51:07 +00:00
Hervé Beraud f104bc4411 tox - fix allowlist_external issues
Change-Id: I07d2126176d00acf361349fa6f8de6b34ae64a16
2023-01-27 10:28:13 +01:00
songwenping 2b6f58019c 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: I82753bf268ebcc6fd701a56c64534a9cd3d5b4ae
2022-12-31 11:12:48 +08:00
Rodolfo Alonso Hernandez de615d9370 Make the eventlet logging fix execution conditional
This patch changes the ``log.setup()`` signature to allow a kwarg
that makes the eventlet logging fix conditional.

Some libraries that import oslo.log, replace the logging locking
handling with its own implementation. For example oslo.privsep
replaces the logging handler with its own one [1], that allows the
communication between the privileged daemon process and the service
importing the library. This local handler clashes with the
evenlet logging fix implemented in [2].

[1]1020c6fbf5/oslo_privsep/daemon.py (L579)
[2]https://review.opendev.org/c/openstack/oslo.log/+/852443

Partial-Bug: #1995514
Related-Bug: #1995091
Change-Id: I4bbcfe7db6d75188e61b9084cb02b2dd2aaa0c76
2022-11-14 16:59:12 +00:00
Gorka Eguileor 94b9dc32ec Fix logging in eventlet native threads
There is a bug in eventlet where logging within a native thread can lead
to a deadlock situation: https://github.com/eventlet/eventlet/issues/432

When encountered with this issue some projects in OpenStack using
oslo.log, eg. Cinder, resolve them by removing any logging withing
native threads.

There is actually a better approach. The Swift team came up with a
solution a long time ago [1], and in this patch that fix is included as
part of the setup method, but will only be run if the eventlet library
has already been loaded.

This patch adds the eventlet library as a testing dependency for the
PipeMutext unit tests.

[1]: 69c715c505

Closes-Bug: #1983863
Change-Id: Iac1b0891ae584ce4b95964e6cdc0ff2483a4e57d
2022-08-08 17:09:50 +02:00
Zuul 6401da71b3 Merge "[Fix] init global_request_id if not in context" 2022-05-13 11:03:59 +00:00
Hervé Beraud 66f9be975c [Fix] init global_request_id if not in context
Initialize by default the `global_request_id` if not passed
in the given context to avoid error with logging.

Change-Id: I6bd63c1d6a1331a4e47b923ccf6df50c930c8162
Closes-Bug: #1972974
2022-05-11 11:19:32 +02:00
Hervé Beraud cdbf6e7a91 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: I46e2456b9931d215c97b15ac97b47a6977282584
2022-05-05 16:13:06 +02:00
Zuul ebdee7f399 Merge "Log Global Request IDs by default" 2022-04-26 12:21:47 +00:00
Takashi Kajinami 2ba348facb Log Global Request IDs by default
Global Request IDs were introduced a while ago[1] so that operators can
trace processing of resources across multiple services more easily.

Some services like Nova or Neutron have implemented this feature and
a request made by these services have additional global request id in
its context. However current default format doesn't include that new id
and users need to update the log format parameter in each service to
get this information recorded.

This change updates the default log format so that the Global Request
IDs can be more widely and easily used.

[1] https://specs.openstack.org/openstack/oslo-specs/specs/pike/global-req-id.html

Change-Id: I1adc9b29bb356ce56704c066b375b49374200d3c
2022-04-25 13:02:15 +00:00
Takashi Kajinami 7ed065f38d Add system scope information to default user identity string
As part of Secure RBAC work, support for system users(eg. system admin)
is being added. However current default format does not include
the system scope information so we can't determine whether the context
is non-scoped or system-scoped.

This change updates the default logging_user_identity_format so that
system scope is logged by default.

Change-Id: I7982cdb280599fb38362eb837cb527592267b91f
2022-04-19 17:08:58 +09:00
Zuul f31946fd89 Merge "Fix formatting of release list" 2022-03-22 13:32:05 +00:00
Zuul 264108395a Merge "Add Zed in versionutils" 2022-03-22 13:32:04 +00:00
Stephen Finucane be33d589d0 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/

Change-Id: Id3cc1d93e18a172960b4c8ca7a7e52ebfd307842
Depends-On: https://review.opendev.org/c/openstack/openstack-zuul-jobs/+/833286/
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2022-03-15 15:07:19 +00:00
Goutham Pacha Ravi 29b6146cbe Add Zed in versionutils
with these once could use versionutils.deprecated.ZED
in config annotations and logs.

Change-Id: I8d5ed01a4b4d1a544fe868c571a54dc96e8ae2f2
2022-03-11 03:15:09 +05:30
tushargite96 0a4ed949fa 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: Idda4215001b245322983d59507a38d19d1d322bd
2022-03-02 22:19:32 +05:30
Pierre Riteau cdcc1057ae Fix formatting of release list
Change-Id: Ibd6deb5339129e8f4099bdb1fef48490a8bac093
2022-02-07 14:15:00 +01:00
Alan Bishop de03a59ed7 Add Yoga to versionutils
Change-Id: If1e846c79477cb0fc06d5702240e1dbb9f2c9c40
2022-02-05 13:00:13 -08:00
Alan Bishop 650ce7d313 Use project when logging the user identity
The logging_user_identity_format option's default value is changed
to reference the project instead of the tenant. This is necessary
because I2fded6f3476df1fb8c4e042ef28ed8ccb7ab0737 removed the tenant
argument from request contexts.

Related-Bug: #1505827
Change-Id: Id6d4b6eaa2b96ba5bd53e8b2dae5d9eea13b25d9
2022-02-05 12:58:43 -08:00
dengzhaosen 27d159b4d6 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: Idab66b3046b54d4e963d987b528347262fb9aa4d
2021-12-21 16:46:05 +08:00
Takashi Kajinami 96a08b8ff9 Replace deprecated arguments of RequestContext
The following arguments of the RequestContext class are deprecated
since oslo.context 2.18[1].
 user          : renamed to user_id
 tenant        : renamed to project_id
 domain        : renamed to domain_id
 user_domain   : renamed to user_domain_id
 project_domain: renamed to project_domain_id

This change updates arguments used accordingly.

[1] d78cf592e1e3e7aa0fc99bfdd655e82f5c44dfe3

Change-Id: I815790106e42ca3cb5b8b3cf98b065a27b9a520e
2021-07-23 00:24:39 +09:00
Zuul 41c8807534 Merge "Remove references to 'sys.version_info'" 2021-06-01 12:21:07 +00:00
Zuul 72f5eb88e4 Merge "Ussuri+ is python3 only" 2021-05-26 19:05:53 +00:00
dengzhaosen 526192ddba Ussuri+ is python3 only
update python to python3

Change-Id: I08e9b66e03c59af7f6600633aaa87d55fcd46a56
2021-05-06 09:25:46 +08:00
songwenping dc9fe87b73 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: I19543673ddf80d93e28f5503b7672f64a6cecf2a
2021-04-30 06:37:36 +00:00
Jorhson Deng 26d1c29938 Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: Ifd84fe4d7282e93998dc37cab4adda6d99d4adc1
2021-04-27 01:37:10 +00:00
Zuul 349d9dd9ee Merge "Drop lower-constraints" 2021-04-16 13:13:23 +00:00
Zuul b8ccdcf9e9 Merge "Fix log_rotate_interval help text formatting" 2021-04-16 12:04:08 +00:00
Zuul 2c067a916c Merge "remove unicode from code" 2021-04-16 11:45:36 +00:00
songwenping 92f0e8f29c Drop lower-constraints
Lower-constraints is not a requirement of the OpenStack Python PTI
[0] and there currently is a discussion on the mailing list [1]
about dropping the test, with the oslo team already having done
so [2].

The new dependency resolver in pip fails due to incompatible
dependency versions in our lower-constraints file, meaning that
we were never providing any real guarantees with it.

To unblock the CI, I am disabling lower-constraints job for now,
with the option to reenable it in case we fix the constraints,
and based on the outcome of the mailing list discussions and
consensus.

[0]. https://governance.openstack.org/tc/reference/pti/python.html
[1].
http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019672.html
[2].
http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019659.html

Change-Id: I04e49f005841eb341c2d53cbc469252c089d1ab5
2021-04-16 10:25:26 +00:00