Commit Graph

841 Commits

Author SHA1 Message Date
Zuul bc38e43044 Merge "Make signal handling order predictable" 2024-03-19 16:33:21 +00:00
Terry Wilson d026081ca4 Make signal handling order predictable
Due to the unordered nature of sets, it is possible for signal
handlers like _gracefull_shutdown() to run first and clear the
_signal_handlers before other registered handlers have run.

This patch converts _signal_handlers from a set to a list and
then runs the handlers LIFO similar to how atexit functions are
run. Given that the handlers added in service.py are added after
clearing the signal_handlers, they are guaranteed to be the first
in the list and the last run.

Change-Id: Ief3ab2f56fa3d805296709e12e5f7a71560f7b6e
Closes-Bug: #2057809
Related-Bug: #2056366
Signed-off-by: Terry Wilson <twilson@redhat.com>
2024-03-13 16:00:38 +00:00
Zuul 8ae4455ec7 Merge "reno: Update master for unmaintained/xena" 2024-03-12 14:29:49 +00:00
Zuul eecf5c130d Merge "reno: Update master for unmaintained/wallaby" 2024-03-12 14:19:27 +00:00
Zuul f3f5fcaaf4 Merge "reno: Update master for unmaintained/victoria" 2024-03-12 13:14:18 +00:00
OpenStack Release Bot 38c250ea9e 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: Ide682d061e1c18cc994eca93624ab5d9126edb26
2024-03-08 14:23:32 +00:00
OpenStack Release Bot a8a37260c2 reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: Icda46119aa5d2649803baaa119e97626c3df7bff
2024-03-07 14:27:11 +00:00
OpenStack Release Bot 9382835bad reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I14eba1d8d5fbf7e4c30a622e8ec2dd5c76f5d70d
2024-03-07 14:22:51 +00:00
OpenStack Release Bot 4f2a525613 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I61a45ef80df6ad2d976652d7ec072963df871502
2024-03-07 14:17:55 +00:00
Zuul f425dd1222 Merge "pre-commit: Integrate doc8 and bandit" 2024-02-21 06:00:36 +00:00
Zuul 69e469ad73 Merge "pre-commit: Bump versions" 2024-02-21 06:00:35 +00:00
Zuul 913705f413 Merge "Switch to coverage command" 2024-02-07 06:26:56 +00:00
Takashi Kajinami bc00121af4 Switch to coverage command
... to follow the current standard.

Change-Id: Iff63e7a53739df512272d40d17aa52ca96b695b6
2024-02-07 12:41:10 +09:00
OpenStack Release Bot 3bab803940 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: I86a86bdb1c9054f323a762590a6d29e4472af85d
2024-02-06 14:29:26 +00:00
Takashi Kajinami cf27f03c79 pre-commit: Integrate doc8 and bandit
We also remove these unnecessary linter dependencies from
test-requirements.txt.

The independent bandit target was removed because it's integrated to
the pep8 target.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: I094897e6de223753a5a497ec42348e4449132b17
2024-01-30 16:00:04 +09:00
Takashi Kajinami 6726f9100b pre-commit: Bump versions
hacking now has a native hook.

Co-Authored-By: Stephen Finucane <sfinucan@redhat.com>
Change-Id: Ib8e2cd42978e4ae360c78bb12551abcd4c8436b5
2024-01-30 15:48:24 +09:00
Takashi Kajinami ac181cec92 Bump hacking
hacking 3.0.x is too old.

Also, fixtures appears in both requirements and test-requirements.
Because this library is only used in oslo_service.fixtures for testing,
we can remove it from runtime requirements.

Change-Id: Iaf57598a73af62e07e890245dc51c9af6a807bd7
2024-01-27 18:49:56 +09:00
Ghanshyam Mann 875b5930e6 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: I709f3609f52b7d75a0c176d5ecb0704600a00c8b
2024-01-11 16:19:43 -08:00
Zuul 3900aa7db5 Merge "Fix native threads on child process" 2023-12-19 19:14:19 +00:00
OpenStack Release Bot ff83185d80 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: I5f7a274cd826dd083f2b7e93b6741620bdaa5883
2023-09-07 09:38:29 +00:00
OpenStack Proposal Bot e94d47a964 Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: Iaf9b4202906d53e2ae6ae59293df4fd8c2bfd466
2023-06-28 04:30:39 +00:00
Hervé Beraud 4bff0d2d8b Bump bandit
Change-Id: I55ca7b1197d8c0d93a1037f175db7671c2ccb400
2023-05-17 11:37:17 +02:00
Ghanshyam b4c4869dbe Revert "Moves supported python runtimes from version 3.8 to 3.10"
This reverts commit a9324198e9.

Keeping Python 3.10 in setup.cfg classifier and zuul.yaml changes.

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: I2fe191cbcc71fdb52d05d1d08e1dfd40de95a8c3
2023-05-05 18:51:54 +00:00
Hervé Beraud a9324198e9 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: If044570184e1df33c8754a39a782ea94e4ea165f
2023-04-10 13:02:18 +09:00
OpenStack Release Bot 43413775fc 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: I84cb4b959ab10d4930856d7a6c3077444a136c2b
2023-02-24 15:23:38 +00:00
Hervé Beraud b3ba591402 Fix issues related to tox4
Related to https://lists.openstack.org/pipermail/openstack-discuss/2023-February/032247.html

Change-Id: Icf10da4f425ca3ea514eac132f7527165afe31a2
2023-02-17 13:15:45 +00:00
Takashi Natsume 845fc45fab Fix misuse of assertTrue
Replace assertTrue with assertEqual.

Change-Id: I918930a6fd3980297ee7d68dd6c9397416fb3335
Closes-Bug: 1988308
Signed-off-by: Takashi Natsume <takanattie@gmail.com>
2022-09-19 01:12:30 +00:00
OpenStack Proposal Bot 2c32ffdb7d Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I1cc0ace5b5160d9aeb3b4475f5e5b04a4a108cca
2022-09-10 04:32:42 +00:00
OpenStack Release Bot 6f9ed9ac46 Add Python3 antelope unit tests
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: I6224cad8af381bf6c167852fab447035dbacb19f
2022-09-09 09:18:24 +00:00
OpenStack Release Bot 92fbee91c6 Update master for stable/zed
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: I9dc519f12735bb2d98824ba6c5d775bc323afff0
2022-09-09 09:18:23 +00:00
Gorka Eguileor 67daa4b3c2 Fix native threads on child process
When the parent process used eventlet tpool to run code in native
threads then anything the child tries to run in a native thread will
hang forever.

The reason for that is that the parent has initialize the pool of
threads and use a flag to mark that it has been initialized, and when
the child is forked then it will have the flag saying that it has been
initialized and expects the threads to be running, but they are not.  So
there is no thread to pick up the job when a greenlet queues the job, so
the greenthread waits forever to get the result of the operation.

This patch tells eventlet's tpool to clean things up on the child just
after forking, that way if the child uses native threads tpool will
spawn all the threads again.

Closes-Bug: #1983949
Change-Id: If2421427c48faa976d6c6ee9bafe4d563288037b
2022-08-08 17:56:13 +02:00
OpenStack Proposal Bot a27acfe23f Imported Translations from Zanata
For more information about this automatic import see:
https://docs.openstack.org/i18n/latest/reviewing-translation-import.html

Change-Id: I67eae9c8e73bac373f6c86e256f508c1fe1ff1db
2022-06-21 03:50:34 +00:00
Hervé Beraud dc04fb1e93 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)

Also indicates that we support python 3.9.

Change-Id: Ic6dd48a11ae639ad9bc0ebeeffce7483c8bed588
2022-05-05 16:05:26 +02:00
OpenStack Release Bot 1f5e01b3f2 Add Python3 zed unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for zed.

See also the PTI in governance [1].

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

Change-Id: I3c6623fe5c5df7a965458ba1b2bc5dde0900d237
2022-03-04 17:19:44 +00:00
OpenStack Release Bot e07697f572 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

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

Sem-Ver: feature
Change-Id: I6e5c1ce720b69cc2ba98b73fe6c8d193ca338ad6
2022-03-04 17:19:43 +00:00
Bence Romsics 6552b9a820 Make debug option of wsgi server configurable
Because in some deployments tracebacks in API responses are unwanted
for security reasons.

Change-Id: I8a2acea7393c369bfa7d7822f21b4d40d56d6739
Needed-By: https://review.opendev.org/c/openstack/neutron/+/818391
Partial-Bug: #1951429
2021-12-21 11:23:23 +00:00
Zuul 7a62271de3 Merge "Fix fo() backdoor command for non-class objects" 2021-10-13 15:29:08 +00:00
Sebastian Lohff eb191548cf Fix fo() backdoor command for non-class objects
The backdoor command fo() uses isinstance() to check if an object is an
instance of a class. This only works with objects that have a __class__
attribute, else an AttributeError is raised by isinstance(). This is
seldomly the case, though if there is one such object fo() will cease to
work. Therefore we need to protect us against this case by checking for
a __class__ attribute before calling isinstance().

An example for an object without __class__ would be
functools._lru_list_elem.

Change-Id: Ia4c5cbdc249535d36f6e71f7b2a7359bc6fdf219
Closes-Bug: #1946072
2021-10-05 08:29:50 +00:00
Julia Kreger d3ee8ef00a Fix BackOffLoopingCall error so it is not misleading
The backoff looping call logging was previously making
a decision on if timeout had or was going to be exceeded
by including idle time and it's internal time, however
this is misleading as the overall operation may take
30 seconds externally, a user initiated timeout of 30
seconds is requested, and the error might say something
like 18 seconds has passed, when that is incorrect.

The logic is actualy correct, the logging was just
misleading.

Fixes the exception message to use the total time.

Change-Id: Ie9ef5a53abb24f6ab7de0ad57a672c0a8d7ff0ee
2021-09-16 10:18:35 -07:00
OpenStack Release Bot fcdeb4a1b6 Add Python3 yoga unit tests
This is an automatically generated patch to ensure unit testing
is in place for all the of the tested runtimes for yoga.

See also the PTI in governance [1].

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

Change-Id: I8dc196b1b2cd3f6986fb2e80b1399a90c26bd6f9
2021-09-10 14:39:01 +00:00
OpenStack Release Bot a88a695c01 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

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

Sem-Ver: feature
Change-Id: I218ac5f11e3ac8042988d91b6a2beef3522dde70
2021-09-10 14:39:00 +00:00
Zuul 091fd6510a Merge "Remove references to 'sys.version_info'" 2021-06-01 12:06:42 +00:00
YuehuiLei 19f369a6e5 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: Ide75d5a0fb9215a81f0410b6ffa77849463cf888
2021-05-05 09:58:35 +08:00
dengzhaosen aea7627eb0 Remove references to 'sys.version_info'
We support Python 3.6 as a minimum now, making these checks no-ops.

Change-Id: Ibaa2cdb7cc27f541aeb778782813354df2911156
2021-04-29 09:10:24 +08:00
Zuul 0cd154c51a Merge "Remove lower-constraints remnants" 2021-04-16 17:17:35 +00:00
Zuul f66930b440 Merge "Use TOX_CONSTRAINTS_FILE" 2021-04-16 14:30:33 +00:00
Zuul b5b4d46591 Merge "remove unicode from code" 2021-04-16 10:50:48 +00:00
Zuul b5c46d32bb Merge "Add Python3 xena unit tests" 2021-04-15 20:43:55 +00:00
Zuul 8034c9343f Merge "Update master for stable/wallaby" 2021-04-15 18:36:39 +00:00
Daniel Bengtsson 900692743e 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: Ie1d59a73d47d8042d669304da802b9f9a34a81a9
2021-03-23 13:09:41 +01:00