summaryrefslogtreecommitdiff
path: root/taskflow
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix parsing of zookeeper jobboard backend options"Zuul2023-04-195-10/+138
|\
| * Fix parsing of zookeeper jobboard backend optionsGregory Thiemonge2023-01-125-10/+138
| | | | | | | | | | | | | | | | Fix the zookeeper backend options when values are passed as strings, a "False" string is now treated as the False boolean. Closes-Bug: #1999174 Change-Id: I048faf06d89ebf980efe0598e647f2ec89f65ada
* | Prepare taskflow for sqlalchemy2Gregory Thiemonge2023-02-271-13/+21
| | | | | | | | | | | | | | | | | | * convert_unicode engine option is no longer supported * use positional arguments for select, lists are no longer supported * insert no longer accepts keyword constructor arguments * explicitly convert Rows to dicts Change-Id: I858d60b3d142e8ade8b2c0154872c8bfc19a42ba
* | Merge "Replace abc.abstractproperty with property and abc.abstractmethod"Zuul2023-02-174-10/+20
|\ \
| * | Replace abc.abstractproperty with property and abc.abstractmethodljhuang2022-08-034-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | Replace abc.abstractproperty with property and abc.abstractmethod, as abc.abstractproperty has been deprecated since python3.3[1] [1]https://docs.python.org/3.8/whatsnew/3.3.html?highlight=deprecated#abc Change-Id: I1bcecd99d8856c26621a5304d9f7f01f8f111918
* | | Merge "Change StrictRedis usage to Redis"Zuul2023-02-172-5/+5
|\ \ \ | |_|/ |/| |
| * | Change StrictRedis usage to RedisTobias Urdin2022-09-292-5/+5
| | | | | | | | | | | | | | | | | | | | | The StrictRedis class is only an alias for Redis in >= 3.0.0 Change-Id: Ief27531f120a50805053c214cb61bb4151678d70
* | | Fix test_while_is_not with python 3.115.1.0Gregory Thiemonge2022-12-051-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test_while_is_not function relied on strings and literals to test the 'while_is_not' function. But the while_is_not function uses the 'is' operator to test the equivalency of 2 objects. This triggers a bug with python 3.11 where using 'is' with literals is not advised (it is not recommended since python 3.8 [0]). The test now uses objects from a specific class to evaluate the while_is_not function. [0] https://docs.python.org/3/whatsnew/3.8.html#changes-in-python-behavior Change-Id: I38a0135aaf73e25aa20a11c0685d5c2a7b587a07
* | | Merge "Adapt to new jsonschema versions"Zuul2022-11-211-7/+8
|\ \ \ | |/ / | | / | |/ |/|
| * Adapt to new jsonschema versionsCorey Bryant2022-08-031-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | This change provides fixes that were dectected by unit test failures with new jsonschema (and py310). The types argument has been removed in favor of providing a type_checker to jsonschema.validators.extend: https://github.com/python-jsonschema/jsonschema/issues/577 Closes-Bug: #1983412 Change-Id: I86f12b3d264320308e7f4841910fc21a6e8b3fa9
* | Merge "Quote string representations"5.0.0Zuul2022-06-137-11/+12
|\ \
| * | Quote string representationsMichael Johnson2022-06-107-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | networkx 2.8.3 will raise errors if certain characters, such as a colon, in the node names and the string is not quoted. This patch double quotes flow, node, and task string representations to make sure there are not issues with these characters occuring in the names. Story: 2010083 Change-Id: Ib0941cddf14dde5d6b9f97fe0224d6e6f3975226
* | | Remove sixTakashi Kajinami2022-05-1874-439/+261
|/ / | | | | | | | | | | | | | | This library no longer supports Python 2, thus usage of six can be removed. This also removes workaround about pickle library used in Python 2 only. Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
* | Fix atomdetails failure column sizePavlo Shchelokovskyy2022-01-271-0/+36
| | | | | | | | | | | | | | | | | | failure and revert_failure fields in atomdetails is defined as a JSON type, but its data type is 'text' in mysql, which is limited to 64kbytes. JSON data type should have the same size as a LONGTEXT. Closes-Bug: #1959243 Change-Id: I65b6a6d896d3e8aad871dc19b0f8d0eddf48bdd6
* | Fix unit testsGregory Thiemonge2022-01-251-1/+1
|/ | | | | | | | | | Use fasteners 0.17.3, it fixes a deadlock issue. Also fixed a new error when building the doc. Depends-On: https://review.opendev.org/c/openstack/requirements/+/826318 Change-Id: I667725886ea424cf62c5b7a07a2e58ecb3399e0c
* Merge "Handle invalid redis entries in RedisJobBoard"4.6.4Zuul2022-01-101-1/+4
|\
| * Handle invalid redis entries in RedisJobBoardGregory Thiemonge2022-01-101-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | When catching that a redis buffer is not formatted correctly, _fetch_jobs now deletes the data from the hashmap, so the same error will not occur during the next call to the function. The commit also adds JobFailure in the list of caught exceptions (might be raised by _loads) in _fetch_jobs Closes-Bug: #1949950 Change-Id: I9078086cd4c3dbfa954422dfa3d5b19fefd7264f
* | Merge "Use LOG.warning instead of deprecated LOG.warn"Zuul2021-12-212-3/+3
|\ \
| * | Use LOG.warning instead of deprecated LOG.warnTakashi Kajinami2021-11-292-3/+3
| |/ | | | | | | | | | | | | | | | | The LOG.warn method is deprecated[1] and the LOG.warning method should be used instead. [1] https://docs.python.org/3/library/logging.html#logging.warning Change-Id: I4321a489c56eb1aa650e776ee35d8f88d4d8910c
* | Fix minor typo in ActionEngine exception messageEric Harney2021-12-021-1/+1
|/ | | | Change-Id: I66b9937df5c58561792328e08f836dc05927e7f1
* Merge "Use custom JSONType columns"4.6.3Zuul2021-10-261-8/+27
|\
| * Use custom JSONType columnsPavlo Shchelokovskyy2021-07-131-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the JSONType from sqlalchemy_utils is quite brittle as it only does primitive json.dumps on values. This leads to various sorts of StorageFailure exceptions in taskflow when, for example, an unserializable exception bubbles up to the 'failure' field of AtomDetails. This patch sublclasses the JSONType from sqlalchemy_utils and overrides two of its methods that do (de)serialization to work via oslo.serialization functions. They deal with such occurencies much better, for example, by providing 'str' as a fallback default. Change-Id: I3b9e9498b155199a4e707006a0cf22cda0567c06 Related-Bug: #1935957
* | Replace deprecated import of ABCs from collections4.6.2Takashi Kajinami2021-07-171-2/+2
| | | | | | | | | | | | | | | | ABCs in collections should be imported from collections.abc and direct import from collections is deprecated since Python 3.3. Closes-Bug: #1936667 Change-Id: Ia6316894a67cc0ea7ee0d2110565b45546c813e7
* | Merge "Fix flowdetails meta size"Zuul2021-06-011-0/+34
|\ \
| * | Fix flowdetails meta sizeGregory Thiemonge2021-05-031-0/+34
| |/ | | | | | | | | | | | | | | | | | | meta field in flowdetails is defined as a JSON data type, but its data type is 'text' in mysql, which is limited to 64kbytes. JSON data type should have the same size as a LONGTEXT. Closes-Bug: #1926304 Change-Id: I9f89badfc697f0f26245ca7f4c22d62e220be5f9
* | Use unittest.mock instead of mockHervé Beraud2021-04-272-2/+2
|/ | | | | | | | The mock third party library was needed for mock support in py2 runtimes. Since we now only support py36 and later, we can use the standard lib unittest.mock module instead. Change-Id: Ib169e3deb7ddb2bc93a206ebec4043552281aa7f
* Fix deprecated Alembic function args4.6.0Adam Harwell2021-01-281-9/+9
| | | | | | | | create_index and create_foreign_key were using long-deprecated argument names which were finally removed as of 1.5.0: https://alembic.sqlalchemy.org/en/latest/changelog.html#change-da0bea3199b905783ddbd0cde968beec Change-Id: I03405e3d0daf085d0849a6e3effc65ec05ceb7a1
* Merge "Add sentinel redis support"4.4.0Zuul2020-08-242-1/+48
|\
| * Add sentinel redis supportAnn Taraday2020-08-052-1/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | Redis client has an ability to connect to Redis server using Sentinel[1] (especially important for Redis clusters), but this ability was missing here. Allow to pass 'sentinel' variable to Redis conf, extend _make_client to use sentinel for that case. [1] - https://github.com/andymccurdy/redis-py#sentinel-support Change-Id: Ia8cc98e701435fd0231da3724f5d7108fc4f96f4
* | Avoid endless loop on StorageFailureAnn Taraday2020-08-241-0/+11
|/ | | | | | | | | | | If an error occures with writing atom detail in database( persistence backend) flow execution enters an endless loop throwing errors and retrying to save details. Avoid this situation and log exception message. Change-Id: Ic6b0a78d20124cc027468ecc6aeff189c25d1a8a Closes-bug: 1889773
* Switch from unittest2 compat methods to Python 3.x methodsmelissaml2020-07-054-50/+50
| | | | | | | | | | | | | | | | | With the removal of Python 2.x we can remove the unittest2 compat wrappers and switch to assertCountEqual instead of assertItemsEqual We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 Change-Id: Iaa8251a1e9965a00fe99b7a740a104c011260340
* Stop to use the __future__ module.Hervé Beraud2020-06-029-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The __future__ module [1] was used in this context to ensure compatibility between python 2 and python 3. We previously dropped the support of python 2.7 [2] and now we only support python 3 so we don't need to continue to use this module and the imports listed below. Imports commonly used and their related PEPs: - `division` is related to PEP 238 [3] - `print_function` is related to PEP 3105 [4] - `unicode_literals` is related to PEP 3112 [5] - `with_statement` is related to PEP 343 [6] - `absolute_import` is related to PEP 328 [7] [1] https://docs.python.org/3/library/__future__.html [2] https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html [3] https://www.python.org/dev/peps/pep-0238 [4] https://www.python.org/dev/peps/pep-3105 [5] https://www.python.org/dev/peps/pep-3112 [6] https://www.python.org/dev/peps/pep-0343 [7] https://www.python.org/dev/peps/pep-0328 Change-Id: Ie7c18f2f1b6294e3d19c36112d35f4472ce77e7b
* Import modules, not classesSean McGinnis2020-05-012-9/+4
| | | | | | | | This addresses comments from I24b13c8654a33d99bf687a44a36cfdace39e3866 to follow guidelines to only import modules, not classes. Change-Id: I0e66c08bfcdff306bac0121602d45b56cfb2c712 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Drop use of deprecated collections classesSean McGinnis2020-04-143-15/+8
| | | | | | | | | | | Many classes have moved from collections to collections.abc. The original imports work, but emit deprecation warnings. Now that we are py3-only, we can drop any references to the older deprecated locations. Change-Id: I24b13c8654a33d99bf687a44a36cfdace39e3866 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Zookeeper backend SSL supportussuri-em4.1.0Ann Kamyshnikova2020-03-061-0/+13
| | | | | | | | | | | | | | | | | | Bump kazoo version to 2.6.0 that supports SSL. Allow to configure ssl config options via conf * keyfile * keyfile_password * certfile * use_ssl * verify_certs https://kazoo.readthedocs.io/en/latest/api/client.html#kazoo.client.KazooClient This should be done in conformance with Redis jobboard backend, that already allows SSL settings. Change-Id: Ic2670c3c4caa93f69bc2d541c3701df2b6037d2e
* Merge "Update TaskFlow for networkx 2.x"3.8.0Zuul2019-11-1515-165/+73
|\
| * Update TaskFlow for networkx 2.xMichael Johnson2019-10-1815-165/+73
| | | | | | | | | | | | | | | | | | | | | | The networkx 2.x series has been out for two years now and supports python 3.6 and greater[1]. This patch updates TaskFlow to require a minimum of networkx 2.1. It also updates the code to support recent deprecation expiration introduced in the 2.4 release. [1] https://networkx.github.io/documentation/stable/news.html Change-Id: Ife31d353ba80824ebc63c8b21ee90943badc8da3
* | Fix python3.8 hmac compatibilityEric Harney2019-09-031-1/+2
|/ | | | | | | | | The "digestmod" parameter must be passed in for Python 3.8. md5 was chosen here because this is what was implicitly used for Python < 3.8. Change-Id: I17eca0692c4a89ff90cfa9d4ef3947d2c9ee23e7
* Use mysql LONGTEXT for atomdetails resultstrain-em3.7.1Ann Taraday2019-08-091-0/+43
| | | | | | | | | | | | | | | With a lot of possible retries using mysql sa.Text for result field atomdetails table is not enough. Updated 'results' column type to LONGTEXT in mysql backend case. PosgreSQL seems not to be affected as postgres text type is not having length limitation. Co-Authored-By: Michael Johnson <johnsomor@gmail.com> Change-Id: I4e44e3288ae49d85c5b5ce8ff26ba83f3b9d2c7b Closes-bug: #1838015
* Handle collections.abc deprecationsSean McGinnis2019-05-091-1/+11
| | | | | | | | | | | | | | | The use of ABC classes directly from collections has been deprecated in 3.x versions of Python. The direction is to use the classes defined in collections.abc. Python 2.7 does not have this, but Python 3.8 will be dropping the backwards compatibility to use the old location. Six also does not have support for this yet, so in the mean time to make sure we don't run into issues as folks try to move to 3.8, and to get rid of deprecation warnings in logs, this handles importing from the preferred location and falls back if it not available. Change-Id: I15554bf3c109045ebdc237ce7cb40299f5d1b298 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Remove the duplicated wordmelissaml2018-08-211-1/+1
| | | | Change-Id: Ia9964fd613efc49479e763b6a7095d63115179ab
* Create KazooClient with taskflow loggerTheodoros Tsioutsias2018-08-161-0/+5
| | | | | | | | | KazooClient should use the taskflow logger and not the default one. Using the default logger means that the user cannot control its log level Change-Id: Id9549028522955ece0ae9f675c5ecc1c2fd816de Closes-Bug: #1785036
* Update various links in docsVu Cong Tuan2018-07-173-13/+13
| | | | | | Avoid redirects, s/http/https/. Change-Id: Id03bd49f250b48109967a0e04b92b75925f08932
* Fix code to support networkx > 1.0Michal Arbet2018-07-116-16/+172
| | | | | | | | | | | | | With the release of NetworkX 2.0 the reporting API was moved to view/iterator model. Many methods were moved from reporting lists or dicts to iterating over the information. Methods that used to return containers now return views and methods that returned iterators have been removed in networkx. Because of this change in NetworkX 2.0 , taskflow code have to be changed also to support networkx > 2.0 Change-Id: I23c226f37bd85c1e38039fbcb302a2d0de49f333 Closes-Bug: #1778115
* Merge "Trivial: update pypi url to new url"Zuul2018-05-171-1/+1
|\
| * Trivial: update pypi url to new urlXiaojueGuan2018-05-131-1/+1
| | | | | | | | Change-Id: I172077bc2b4cf5e02691c98b07860f853f9f4da9
* | Fix doc buildBen Nemec2018-05-092-5/+11
|/ | | | | | | | | | | | | | | | | | | | Most notably, taskflow is hitting the sphinx issue https://github.com/sphinx-doc/sphinx/issues/2549 which causes a spurious warning that breaks the build with -W. There is a workaround posted in https://stackoverflow.com/questions/31784830/sphinx-ivar-tag-goes-looking-for-cross-references to move :ivar: docstrings to inline comments on the member variable itself. This is not ideal because it causes the docs to render differently from :ivar:, but until the sphinx bug is fixed it will allow us to keep documenting the problematic variables. There was also a problem with one of the doctests because the output had changed. That is now fixed. I also noticed a typo in one of the parameter descriptions so that is fixed too. Change-Id: Ib44621f6c3ba2c5476ec430218a0449f9f45d18f
* set default python to python3Doug Hellmann2018-04-173-3/+6
| | | | | | | | | | | | | | | | | | Set the default python to python3 except for the py27 environment. We have to set that explicitly to override the new default. Have py27 and py3* jobs run same commands by removing the commands entry for py27. The pep8 rules under python 3 are different, so we need to fix a couple of issues with blank space. The E721 rule is ignored entirely because we are not yet using a version of flake8 that supports ignoring individual rules on specific lines, although the instructions for that are added so that when we upgrade flake8 to a newer version we can remove the global rule. Change-Id: Id236b0632a83a188958130d04f1e9c476c5ace65 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* Fix invalid json unit testBen Nemec2018-02-081-1/+5
| | | | | | | | | | Recent versions of oslo.serialization have made it possible to dump exceptions to JSON, which broke a unit test in taskflow that assumed exceptions were unserializable. This change switches to an explicitly unserializable class for that test. Change-Id: If6d19bc9fcf1f1813cb087d42dc7ba6a61c71b3d Closes-Bug: 1748241
* Merge "Avoid log warning when closing is underway (on purpose)"3.0.1Zuul2017-12-121-1/+8
|\