2151 Commits

Author SHA1 Message Date
Takashi Kajinami
499bded13f Add Gelera specific error code for connection retries
Import the following galera specific error code to handle connection
retries, from the latest list of codes used by retry filter in oslo.db.

 - 1024: WSREP has not yet prepared node for application use [1]
 - 1927: Connection was killed [2]

[1] 45079050f1d54c3be15ce128487f79c9490be77c
[2] 34f9a3ac7a56883f8a2cd2a9a93bc42e5194bc1e

Change-Id: Ic5851122df20d91081f13c10f68ae7f5e00e6b26
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-22 01:45:10 +09:00
Takashi Kajinami
1af9fcecab Use more specific assertion methods
Enable a few optional checks from hacking to enforce this.

Change-Id: I685df20195f7f3ae26fbd6b1dd9906761d68b07c
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-17 01:27:25 +09:00
Zuul
8310dbdcd7 Merge "Add recursion support to _mask_keys in formatter" 2026-02-15 11:57:15 +00:00
Zuul
3162be331d Merge "Use helper to close client" 2026-02-14 21:59:45 +00:00
Takashi Kajinami
ea54b631a6 Use helper to close client
... instead of implementing the same logic twice.

Change-Id: I564b1352d6b1ab3bc5f450503c8964a03bf7fc4c
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-15 00:13:50 +09:00
Zuul
6579ff2a98 Merge "Avoid silent skip for zookeeper config problems" 2026-02-14 04:45:06 +00:00
Zuul
d33046e443 Merge "Replace deprecated warn method" 2026-02-14 04:38:13 +00:00
Takashi Kajinami
d7d1b4f0cf Replace deprecated warn method
The warn method of logger instances has been deprecated. Use warning
instead.

Change-Id: I92eadc3ca9103d33e8b3fee619658e6419addc25
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-14 01:29:09 +00:00
Takashi Kajinami
9d11fa7b2b Avoid silent skip for zookeeper config problems
Change-Id: I9a50e9db9860c3736ad68136956b31d89e626552
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-14 09:56:49 +09:00
Takashi Kajinami
aa50bfa5aa Fix wrong environment variable to detect redis port
Change-Id: I645eea079d9098c9bd1ad76bd508f2e9fc3c8c11
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-13 16:09:12 +00:00
Takashi Kajinami
822b7d68a0 Use pifpaf env vars to detect backend services
... to avoid leaving some test cases silently skipped.

Change-Id: I8be37a3cc0876c6befceca9f65581d680cdebdb4
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-13 16:09:06 +00:00
Takashi Kajinami
7f29ba5f28 Remove zake
The zake library was archived a few years back and is no longer
installable due to its usage of pkg_resources .

Use real zookeeper instance for these tests.

Change-Id: If806bef4c7aea4704dab8b98833dc8b44e30ef1d
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-02-14 01:07:37 +09:00
Zuul
e0b07599c6 Merge "Drop redundant assertion method overrides" 2026-02-05 10:16:49 +00:00
Gregory Thiemonge
6fc3a9b0f1 Avoid iterating over the same atoms in a graph
When iterating over a "diamond" graph, some atoms may be processed
multiple times. Depending on the size of the graph, it has a huge impact
on the complexity of the algorithm.
The patch ensures that each node is processed only once.

Closes-Bug: #2139228
Closes-Bug: #2086453
Change-Id: Iced8a1fd02ef5766f4017bb1b6c6d48b4c061b5c
Signed-off-by: Gregory Thiemonge <gthiemon@redhat.com>
2026-02-03 15:52:46 +01:00
Takashi Kajinami
67b67db570 pre-commit: Bump versions
Change-Id: I1cf4e526d6cdc0af931a1fa9372b5dd0036440dc
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-01-24 23:55:32 +09:00
Takashi Kajinami
2b5a92bd01 Drop redundant assertion method overrides
... and use the built-in ones instead.

Also replace assertDictEqual because assertEqual should select
an appropriate method automatically[1].

[1] https://docs.python.org/3.13/library/unittest.html

The list of type-specific methods automatically used by assertEqual()
are summarized in the following table. Note that it’s usually not
necessary to invoke these methods directly.

Change-Id: I4b7d3563e5a025cd3efa602a28c12865dcf3474d
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2026-01-09 11:05:29 +00:00
Zuul
eebbf33258 Merge "Replace PackException/UnpackException" 2025-11-17 16:13:24 +00:00
Takashi Kajinami
e3cca6cd18 Bump pyupgrade target to 3.10+
... according to the versions currently supported.

Change-Id: Ibc60bf2bb13a57625d6afd045be88d988f4b24a9
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-10-05 19:46:33 +09:00
Tobias Urdin
11f859b085 Add recursion support to _mask_keys in formatter
... the first patch [1] did not take into
account the multiple levels of data that
needs to be filtered.

This adds recursive support for masking
keys and adds unit testing for that
specific code part.

[1] https://review.opendev.org/c/openstack/taskflow/+/932843

Signed-off-by: Tobias Urdin <tobias.urdin@binero.com>
Change-Id: I62c77b7473448d586a3cf15c0bfdf8d68170c0d8
2025-09-08 23:27:58 +02:00
Takashi Kajinami
1e9d520c8f Replace PackException/UnpackException
PackException was deprecated in msgpack 0.5.0[1] and has been
equivalent to Exception since msgpack 0.6.0[2].

In additoon, [3] mentions that even UnpackException should be replaced
by Exception. The same is recommended in [4], too.

Also replace the unused catch for Exception.

[1] https://github.com/msgpack/msgpack-python/commit/3dad39811d93
[2] https://github.com/msgpack/msgpack-python/commit/07f0beeabb71
[3] https://github.com/msgpack/msgpack-python/blob/main/ChangeLog.rst#050
[4] https://github.com/msgpack/msgpack-python/blob/e6445d3b/msgpack/exceptions.py#L4-L6

Change-Id: Id3c08dc5263119be52184364c05dc9f78a14b8fc
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
2025-08-22 19:16:17 +09:00
Brett Delle Grazie
f80b1bfb6e fix(conductor): add stop and wait methods to base
This prevents type checkers from failing when using the base Conductor class as a type.

Closes-Bug: #2117198
Change-Id: I7633b100cc07f79637f1d9d553f3fcf323c57b4c
Signed-off-by: Brett Delle Grazie <brett.dellegrazie@gmail.com>
2025-07-17 22:39:05 +02:00
Zuul
d01920ef1c Merge "Fix skipped database persistence tests" 2025-05-27 18:38:49 +00:00
Zuul
41a2c01b83 Merge "Fix duplicate table_name argument" 2025-05-27 17:40:40 +00:00
Takashi Kajinami
c7aac5b751 Fix skipped database persistence tests
Change-Id: I786465ba28e9df9b4c1b2c1abbb163cbed15d8a2
2025-05-27 13:40:12 +00:00
Takashi Kajinami
d9f26c51b9 Fix duplicate table_name argument
Fix the following error caused by the regression introduced by
72df15e629 .

TypeError: CreateIndexOp.__init__() got multiple values for argument
'table_name'

Closes-Bug: #2111806
Change-Id: I3e941ffbb0193056e8e271bf96f6a841a2ba95c0
2025-05-27 11:53:48 +00:00
Tobias Urdin
a5b7323fa4 Add mask keys parameters to failure logging
This adds the two parameter mask_inputs_keys
and mask_outputs_keys to the failure logging
formatter and the dynamic listener so that we
can mask fields in provides and requires data
if it's a dict.

Change-Id: Ib05255e01f806c5a134538cc8ddd168e45503a7f
2025-04-03 09:10:00 +02:00
Zuul
b4a2f99035 Merge "Sets indexes for all tables in taskflow as unique" 2025-04-02 17:14:35 +00:00
Takashi Kajinami
80e1aadc49 Run pyupgrade to clean up Python 2 syntaxes
Update all .py source files by
 $ pyupgrade --py3-only $(git ls-files | grep ".py$")
to modernize the code according to Python 3 syntaxes.

pep8 errors are fixed by
 $ autopep8 --select=E127,E128,E501 --max-line-length 79 -r \
    --in-place taskflow

Also add the pyupgrade hook to pre-commit to avoid merging additional
Python 2 syntaxes.

Change-Id: Ifd0a0ade9789497482c7937bffd82c48acfb3d78
2025-04-02 15:23:12 +09:00
Zuul
31f5b4e46f Merge "Remove process executor" 2025-04-01 11:01:35 +00:00
Zuul
28fc207d07 Merge "Use oslo.utils implementation to parse sentinel address" 2025-03-27 03:08:12 +00:00
Takashi Kajinami
e3be5c3b79 redis: Omit ssl options when ssl is disabled
The "Connection" class used when ssl is disabled does not accept any
ssl_* arguments, so passing these options into connection_kwargs
causes TypeError.

Because ssl_* options are unused unless ssl option is set to true, we
can filter out these options based on the core ssl option.

Closes-Bug: #2102707
Change-Id: I2e329a545c77a1ac0dec3813e2f29aee67191d48
2025-03-20 00:06:33 +00:00
Takashi Kajinami
1e8eac4db3 Remove process executor
The process executor was deprecated during 2024.2 cycle[1] because it
depends on asyncore which was removed in Python 3.12 . Remove it
because the deprecation warning has been kept for enough cycles.

[1] 78d39c49aa

Change-Id: I239f3ce408492a310ec56886102f4a7c512c44b1
2025-03-16 10:53:24 +09:00
Takashi Kajinami
c56d967177 Use oslo.utils implementation to parse sentinel address
... instead of maintaining own logic.

Change-Id: I62b65b059d4aacacad6fd7e5426f5beed721e58b
2025-03-14 18:22:07 +09:00
Jose Castro Leon
72df15e629 Sets indexes for all tables in taskflow as unique
Introduces an alembic migration to set all indexes to unique so
upgrades to MySQL 8.4 and onwards do not complain about nonstandard
foreign keys.

Closes-Bug: 2100747

Change-Id: Ie0777edf076cbb4f0fdbdf7b273564b73d935434
Signed-off-by: Jose Castro Leon <jose.castro.leon@cern.ch>
2025-03-03 10:15:43 +01:00
Zuul
e41463b1ad Merge "Deprecate utility for eventlet" 2025-02-26 15:46:31 +00:00
Zuul
ac3d6541f5 Merge "Replace oslo_utils.encodeutils.exception_to_unicode" 2025-02-11 16:22:11 +00:00
Zuul
5c683f837b Merge "Read pifpaf environments to detect service ports" 2025-02-11 13:34:30 +00:00
Zuul
0f5a4e5755 Merge "Drop unused constants" 2025-02-11 13:16:21 +00:00
Takashi Kajinami
6ce78a4794 Deprecate utility for eventlet
Change-Id: I22f1b04e10ceb8cbca00d654573838c694dcdbcf
2025-02-07 22:28:52 +09:00
Hervé Beraud
1928a9a715 fix typo
Change-Id: I0b4b516b4c37cb86b536ffce26f321a54d35b2ef
2025-01-29 15:01:09 +01:00
Takashi Kajinami
7780de0125 Read pifpaf environments to detect service ports
... instead of using own hard-code.

Change-Id: I450eebaffe8b73be6fc0a29b5ccc6076f18be5f5
2025-01-12 17:58:00 +09:00
Takashi Kajinami
1b0a1c4b62 Drop unused constants
These constants were used by the test code which no longer exist.

Trivial-Fix

Change-Id: Iab30b79915916de80dc5fa6290307cfacec7b8c9
2025-01-12 17:28:25 +09:00
Takashi Kajinami
6bad546934 Replace oslo_utils.encodeutils.exception_to_unicode
The function is being deprecated now because it is equivalent to
str(ex) in Python 3.

Depends-on: https://review.opendev.org/c/openstack/oslo.utils/+/938929
Change-Id: I95627daf03bebe1d17e2212ed5e1d883251502b3
2025-01-12 08:22:37 +00:00
Takashi Kajinami
dbf8be4edb Remove unused usage of pkg_resources
pbr is in requirements now so should always exist. pkg_resourcs was
removed in Python 3.12 [1] and can no longer be used.

[1] https://docs.python.org/3/whatsnew/3.12.html#ensurepip

Change-Id: I1f1d5c75f10b6f232dd2bf23fc963693f8388f98
2024-10-03 09:51:09 +09:00
Zuul
a8b48d6e02 Merge "Fix REVERT_ALL with Retries in unordered Flows" 2024-08-07 13:50:05 +00:00
Takashi Kajinami
fc14510adb Follow-up of "Add Etcd backend for jobboard"
Address the two minor improvements found during the review.
 - Rename 'join' method to more explicit name
 - Allow float timeout value

Change-Id: I08b1b1584414a7675257f0aac90017e91c7cd716
2024-07-08 07:03:22 +00:00
Zuul
6d5a435e42 Merge "Add Etcd backend for jobboard" 2024-07-08 04:20:49 +00:00
Gregory Thiemonge
f0fd57a863 Add Etcd backend for jobboard
Add a new backend for jobboard based on Etcd3, it uses the etcd3gw
bindings.

Change-Id: I12eaa04dfb11941802200736e56a4fb5761fb368
2024-06-11 16:23:40 +02:00
Zuul
828e92409c Merge "Python3.12: disable process_executor, which depends on asyncore" 2024-05-17 09:53:29 +00:00
Cyril Roelandt
78d39c49aa Python3.12: disable process_executor, which depends on asyncore
The asyncore module has been deprecated in Python 3.6 and removed in
Python 3.12. In the future, we should either port process_executor to
asyncio or deprecate it, but for now we just disable it starting in
Python 3.12.

Closes-Bug: #2026183

Change-Id: I6c69593c5ce5a62721294564917d7a75531a2dac
2024-05-03 23:23:58 +00:00