summaryrefslogtreecommitdiff
path: root/taskflow/persistence
Commit message (Collapse)AuthorAgeFilesLines
* Merge "Fix parsing of zookeeper jobboard backend options"Zuul2023-04-191-1/+3
|\
| * Fix parsing of zookeeper jobboard backend optionsGregory Thiemonge2023-01-121-1/+3
| | | | | | | | | | | | | | | | 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
* | Replace abc.abstractproperty with property and abc.abstractmethodljhuang2022-08-031-1/+2
|/ | | | | | | | | 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
* Remove sixTakashi Kajinami2022-05-185-31/+20
| | | | | | | | 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
* 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
* | 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
* 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
* Stop to use the __future__ module.Hervé Beraud2020-06-022-4/+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
* 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
* Fix doc buildBen Nemec2018-05-091-2/+6
| | | | | | | | | | | | | | | | | | | | 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
* turn on warning-is-error in doc buildDoug Hellmann2017-07-081-1/+1
| | | | | Change-Id: Id87a1b17c1986d0e30629fed13bdfbecef4a3603 Signed-off-by: Doug Hellmann <doug@doughellmann.com>
* python3.0 has deprecated LOG.warnxhzhf2017-03-072-5/+5
| | | | | | | | python3.0 has deprecated LOG.warn https://docs.python.org/3/library/logging.html#logging.warning Closes-Bug: #1650843 Change-Id: Ib8473cbdb84547f385e619fe08ed723b1ee7bcdb
* Replace retrying with tenacityGevorg Davoian2016-11-031-9/+7
| | | | | | | | | | | | This patch replaces the legacy retrying library with the newer and more convenient tenacity one, taking into account that: 1) retrying uses milliseconds for wait times, but tenacity uses seconds; 2) retrying has a lot of numeric arguments for specifying behaviour of decorated functions, while tenacity has a few of them, which are specialized objects, thus making the retry-decorator more flexible. Change-Id: I4b165d37b2ecc210f2b94c103b73eaab51529261 Closes-Bug: #1635404
* Use method ensure_tree from oslo.utilsChangBo Guo(gcb)2016-09-251-1/+2
| | | | | | Oslo.utils provides same function and just use it. Change-Id: Iac245d4d98c41edea5294a4d8842db69a42b3794
* remove unused LOGji-xuepeng2016-07-101-3/+0
| | | | | | This is to remove unused LOG to keep code clean. Change-Id: Ie44659f3b7af9612f127f7d46bb2c1481b6a634f
* Fix some misspellings in the function name and descriptionsPablo Iranzo Gómez2016-06-301-1/+1
| | | | Change-Id: I7e3451feb94b1f25b00c5e7b197bb6b527548306
* Don't use deprecated method timeutils.isotime2.2.0ChangBo Guo(gcb)2016-06-101-2/+2
| | | | | | | | This method was drepcated and will be removed in Ie8903e23fc88c03f4da78292a759d18c6a135064, so don't use it anymore. Change-Id: If2a6249cfd4ea1cb5eb4dfc4e3333ac9a5aafbf6
* Fix documentation related to missing BaseTask classGreg Hill2016-05-111-1/+1
| | | | | | | The docs no longer matched reality. Change-Id: I9ee98e16fc03489569bbed8355416a73f7bc02ff Closes-Bug: 1579890
* Remove deprecated things for 2.0 releaseJoshua Harlow2016-05-102-63/+4
| | | | Change-Id: Id9adbc50bd51adc77ce88f698ad0ea2ee63fc5e2
* Ensure upgrade for sqlalchemy is protected by a lockJoshua Harlow2016-03-201-13/+17
| | | | | | | | | Make sure that upgrade() is thread-safe (as it appears not to be) by using a lock that all connections from the same engine will use. Change-Id: I2b2b1be9e797099c8412fc6819465e550b1b934a Closes-Bug: #1559496
* Merge "Use the retrying lib. to do basic sqlalchemy engine validation"Jenkins2016-01-091-47/+41
|\
| * Use the retrying lib. to do basic sqlalchemy engine validationJoshua Harlow2016-01-051-47/+41
| | | | | | | | | | | | | | | | Instead of a custom loop and backoff just use the retrying library to do this same code and delegate the loop complexity to it instead. Change-Id: Iaf02cc728d2a2cfc7077300e03d7ef25522717b7
* | Merge "Use alembic upgrade function/command directly"Jenkins2016-01-062-26/+15
|\ \
| * | Use alembic upgrade function/command directlyJoshua Harlow2015-06-152-26/+15
| | | | | | | | | | | | | | | | | | | | | Instead of implementing a similar version to what the upgrade function does, just use it directly instead. Change-Id: I61a3c9f09c6e0724f2b55951989171ef4aaafe0c
* | | Merge "Use shared util helper for driver name + config extraction"Jenkins2016-01-051-16/+6
|\ \ \
| * | | Use shared util helper for driver name + config extractionJoshua Harlow2015-12-221-16/+6
| | |/ | |/| | | | | | | Change-Id: I43465b8f5868e64bdf38d2873417a8a4a403a23b
* | | Merge "Move all internal blather usage/calls to trace usage/calls"Jenkins2015-12-231-1/+1
|\ \ \ | |/ / |/| |
| * | Move all internal blather usage/calls to trace usage/callsJoshua Harlow2015-12-171-1/+1
| | | | | | | | | | | | Change-Id: I415a81d3b6b15b17a9a91cc2a0681c159172a4e1
* | | Fix currently broken and inactive mysql testsJoshua Harlow2015-12-221-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 868dd8485456ce78a396b687ec7744dc365f06be added a migration script that caused there to be two heads (starting points) of migrations which would cause alembic to be unable to do the initial schema creation (and upgrade). So this fixes that by correctly making one head only and not skipping tests for a database if it can not be upgraded for whatever reason (which was silencing the test failures). Closes-bug: #1528683 Change-Id: Id571072eec1dc3b6cbb9e868854f6db0b271e5f8
* | Merge "Use the sqlalchemy-utils json type instead of our own"Jenkins2015-12-152-23/+66
|\ \
| * | Use the sqlalchemy-utils json type instead of our ownJoshua Harlow2015-09-092-23/+66
| | | | | | | | | | | | Change-Id: Ie01ea85e74f1daed6bfa5158c0faa476d06873ba
* | | Add in-memory backend delete() in recursive/non-recursive modesJoshua Harlow2015-10-141-8/+27
| | | | | | | | | | | | Change-Id: I957c875bf493b2e38bf82af6faccbab8a4861ade
* | | Fix how the dir persistence backend was not listing logbooksJoshua Harlow2015-09-041-2/+6
|/ / | | | | | | | | | | | | | | | | | | Due to the usage of the os.path.islink check this means that no logbooks would be returned when get_logbooks was called, which is not the behavior we want. Closes-Bug: #1492403 Change-Id: Ife6a5bec777c9e2d820391914ce2c6fbbadf4f79
* | Merge "Remove no longer used '_was_failure' static method"Jenkins2015-07-271-5/+0
|\ \
| * | Remove no longer used '_was_failure' static methodJoshua Harlow2015-07-231-5/+0
| | | | | | | | | | | | Change-Id: I74765d376cdaa2c23a6aaa4a74517da4e2df7ad8
* | | Merge "Use io.open vs raw open"1.17.0Jenkins2015-07-261-4/+4
|\ \ \ | |/ / |/| |
| * | Use io.open vs raw openJoshua Harlow2015-07-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | The io.open call can take in a encoding so we don't need to read in binary mode, then convert it since it can just do that on our behalf. Change-Id: I0cce2841b40f1566ba07ff95a553cb18ea9059ee
* | | Fix lack of space between functionsJoshua Harlow2015-07-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Somehow this passed through the gate and now it is causing related failures, so fix it so that those other failures will not happen. Change-Id: Idb046b0e4e23af49c947a80cf6f77fef3a9ec0c8
* | | Merge "Remove **most** usage of taskflow.utils in examples"Jenkins2015-07-211-0/+93
|\ \ \
| * | | Remove **most** usage of taskflow.utils in examplesJoshua Harlow2015-07-171-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It appears folks are using the taskflow.utils code in there own code-bases (likely taking it from the examples) which we do not want to encourage, so remove the usage of **most** of taskflow.utils code from the examples so that people are less likely to copy/paste/reference it. Change-Id: I0ce3c520de347e3e746e7912aa1366a515458424
* | | | Merge "Update 'make_client' kazoo docs and link to them"Jenkins2015-07-171-0/+10
|\ \ \ \
| * | | | Update 'make_client' kazoo docs and link to themJoshua Harlow2015-07-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the creation of a client is somewhat important and knowing what the options that are transfereed to kazoo are we should explicitly document what keys are and what the values should be. Change-Id: I1a5037b274828190270ea5c402be8b2100306de4
* | | | | Merge "Address concurrent mutation of sqlalchemy backend"Jenkins2015-07-171-13/+8
|\ \ \ \ \
| * | | | | Address concurrent mutation of sqlalchemy backendJoshua Harlow2015-06-151-13/+8
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to prevent a thread from closing a backend while another thread is getting a connection (which can result in an engine being created) stop this kind of concurrent mutation by creating a engine (if it was not user provided) in the constructor. In the close the engine dispose is called (which will according to the docs just create a new pool anyway) so there is no need to recreate the full engine object from its same configuration again. Change-Id: Id1fa3001b3ebbe76bbcdb08ed4add6a9e16ea96b
* | | | | Merge "Retain atom 'revert' result (or failure)"Jenkins2015-07-153-48/+185
|\ \ \ \ \ | |_|_|/ / |/| | | |
| * | | | Retain atom 'revert' result (or failure)Joshua Harlow2015-07-103-48/+185
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a atom is reverted it can be useful to retain the result of that 'revert' method being called, so that it can be later analyzed (or used for various purposes) so adjust the storage, and actions to enable it to be stored. Change-Id: I38a9a5f3bf7550e924468bb4a86652cb8beb306c
* | | | Update all removal_version from being ? to being 2.0Joshua Harlow2015-07-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before the 2.0 release it would be great to get these removed so let's mark that version as the version that will no longer have these in it. Change-Id: I66a74d270bf95db005e9febfce1a5e211c7a49f6