| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
Replace assertEqual(None, *) with assertIsNone in tests to have more
clear messages in case of failure.
Change-Id: I74452af6d840bcf612fd3bb2521db9134460dd63
Closes-Bug: #1280522
|
| |
|
|
|
|
|
|
| |
Christmas came early.
Closes-Bug: #1479466
Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
|
| |
|
|
| |
Change-Id: I2ff3b9bb4d0b8143163e4bf370f10c74e79dbd31
|
| |
|
|
|
|
|
|
|
|
|
| |
This makes it possible to REVERT a subflow
and have it also revert the parent flow if
the parent flow doesn't have its own retry
strategy. We will probably want to make this
new behavior the default or only behavior
in a future release.
Change-Id: Iea5ac366380ba7396a87d0185703549fb0c2f825
|
| |
|
|
|
|
|
| |
First parameter should be the expected value.
Change-Id: I2941296e38c3245da298cc64aeb5636fbc4b2eb6
Partial-Bug: #1357117
|
| |
|
|
|
|
|
|
| |
Perform some small adjustments/cleanups and add some
unit tests to ensure this function keeps operating as
expected.
Change-Id: I496bd6844072f57624de31fc7ddb0362f163cc53
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
- Added a MapFunctorTask and ReduceFunctorTask to mimic the python
builtin functions map and reduce, respectively
Change-Id: I29cd1249e1671aedfd2d25460d746b8d2154df2b
|
| |/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When look-up is occurring the possible provider
ordering is used instead of the scope returned provider
ordering. This causes incorrect matches when look-up
argument names that are produced by multiple providers (at
the same scope level) all providing the same requirement
name.
The scope order should be enforced as the de-facto order
and not the order that the storage unit finds (which is
hash based and varies depending on hash ordering).
Closes-Bug: #1425326
Change-Id: I15f1ee5515758bdc470c0f7dd7a2f616923e5628
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Perform some adjustments to the periodic worker type to
make it easier to later change and make it better in the
future. These changes hopefully also reduce complexity
and increase understandability.
In part this deprecates providing a tombstone via
__init__() since that will restrict future enhancements we can
make (in retrospect we need more internal control over that
argument & type to build better workers).
Change-Id: I1965e157c303c2a45b9950e9f4a921c638f57fd1
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the multilock unit test check that all values were
acquired (as expected). Also use a class constant for
the number of threads to spin up when testing timing
overlaps and use the module constant for the duration
to wait (to try to trigger overlaps) and use a new helper
utility function to make it more obvious what is happening
in the multilock release method.
Also swaps out the usage of time.time in the lock utils
unit test to attempt to use monotonic time (when it can
be used) so that false positives are unable to happen (using
time.time it is possible for time to go backwards and cause
a non-existent overlap to appear).
Change-Id: Ifb3967e1c1da41e1b7ac0793fc6a99f84de2a907
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The code we had for adjusting the netutils urlsplit
function to add in a params method/property is no
longer needed as that functionality is now pushed into
the oslo.utils repo/package where it can be maintained
there in a more proper manner instead; so we can now
remove our adjustment code and just use the upstream
code instead.
Change-Id: I5ca05c0ac6a6221157a737ba20814cfd63adf51e
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reflection module is now part of oslo.utils so we should
remove our local version and use that version instead; this
also goes for the uuidutils module which is now part of
oslo.utils as well so we no longer need our local version
copied from the incubator...
Note that one reflection method `find_subclasses` which was to
specific to taskflow is now moved to the misc utility module
instead of its prior home in the reflection module.
Change-Id: I069881c80b0b2916cc0c414992b80171f7eeb79f
|
| |
|
|
|
|
|
|
|
|
| |
Add a misc.clamp function that will clamp a value to a given
range (it can also call a callback if clamping occurs). Use it
to clamp the progress value that was previously clamped with
a set of customized logic that can now be replaced with a more
generalized logic that can be shared.
Change-Id: I8369dbb61f73a60932d9e15c8b4d06db249ea38e
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of creating daemon threads using the threads module directly
use our small utility file to create the daemon thread on our behalf
and set the appropriate attributes to ensure it's a daemon thread.
This change replaces the existing locations where we were doing this
manually and uses the threading_utils helper function uniformly instead.
Change-Id: I535cee8a63407f753cf812df53c4f5bc83e0c9ae
|
| |
|
|
|
|
|
|
|
|
|
|
| |
In order to make it simpler (and less code) just prefer to use
object types that already exist instead of trying to make dictionaries
also behave like objects.
For those that really need this kind of functionality:
https://pypi.python.org/pypi/attrdict
Change-Id: Ib7ddfa517f0500082fafac2c3e53fd6a158a6ddf
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The notifier module needs to be hoisted out of the misc utility
file so that it can be depended on existing by users in a well
defined (non-utility) location.
This change does this hoisting process & creates a new module
and places the existing code there, then creates a deprecated
proxy that exists at the old location (this will be removed
in the next version + 1).
In a future change (in 0.5) we can remove this old location and
remove all references to the previous location (until then we
must keep the old location being used to ensure subclass checks
and other types checks function properly).
Part of blueprint top-level-types
Change-Id: I47fac110adf7cec5c859c2e055c1ceb1f25a7fbd
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The failure module needs to be hoisted out of the misc utility
file so that it can be depended on existing by users in a well
defined (non-utility) location.
This change does this hoisting process & creates a new module
and places the existing code there, then creates a deprecated
proxy that exists at the old location (this will be removed
in the next version + 1).
In a future change (in 0.5) we can remove this old location and
remove all references to the previous location (until then we
must keep the old location being used to ensure subclass checks
and other types checks function properly).
Part of blueprint top-level-types
Change-Id: I7d13ad1e9e5f5ecc90ab81949cc92ddf7309f13c
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When the cachedproperty descriptor is attached to an object
that needs to be only created/set by one thread at a time we
should ensure that this is done safely by using a lock to
prevent multiple threads from creating and assigning the
associated attribute.
Fixes bug 1366156
Change-Id: I0545683f83402097f54c34a6b737904e6edd85b3
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The __qualname__ attribute simplifies the determination
of an objects class name and callable name and is useful
in python 3.x to be able to use since it can correctly
identify names better than the python 2.x __name__ attribute
can.
Adds a few tests in to ensure that the usage of __qualname__
where available functions as expected.
See: http://legacy.python.org/dev/peps/pep-3155/
Fixes bug 1341441
Change-Id: Ic6942cbbc8e35d65fb3ac603ff1dfc8e20c194a3
|
| |
|
|
|
|
|
|
|
| |
Since the stopwatch is a type in the time
module we should move the test for it from
utils test to the test that is used to test
all the various types.
Change-Id: Id462baaada2784bf2af1da9c8548a2393c1af7fb
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Create a time module under types and place
the stop watch class and timeout classes there
so that we can have a single location where
generic types that do things with time can be
located.
Part of blueprint top-level-types
Change-Id: I8eb7e897c0354b20a7fa0d061434006e775d5e94
|
| |
|
|
|
|
| |
Closes-Bug: #1325677
Change-Id: I6366dea5458adec30e945a9834e15da946813461
|
| |
|
|
|
|
| |
Add a few tests that verify it is working as expected.
Change-Id: I6c062f84f7c2a6baf8fc9a697ebe2d715f82d332
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow the uri passed to various entrypoints to itself
contain most of the configuration for that entrypoint
by using the RFC 3986 uri format to allow for additional
parameters to be used in configuring and selecting those
entrypoints.
Also bring over network_utils from oslo since it provides
a more compliant url splitting support.
Part of blueprint persistence-uris
Change-Id: I8e5d8584d2cac4f9b338fa155f220cdfd52bb7d9
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of requiring iteration to be able to list new
jobs and existing jobs so that they can be claimed, allow
for attaching callbacks to the jobboard where instead of
requiring iteration those callbacks will be automatically
called by the jobboard internally when events are recieved.
Breaking change: renames transition notifier to notifier
since it is really not just a notifier for transitions but
is a generic notifier of events occuring (and details about
those events). This is an internal api so its not expected
that this will cause any issues (it's not expected for external
users to be creating instances of this class).
Implements bp board-notification
Change-Id: I2384d5e335ed9d17e29fec9a78699e3156fa225c
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 42ca240e8157b840c298d14fbf478ae570376633 which
was a breaking change in a library consumed by other OpenStack
projects with no deprecation or backwards compatibility
considerations. It was able to merge because openstack/taskflow is
apparently not yet part of the integrated gate via the proposed
I202f4809afd689155e2cc4a00fc704fd772a0e92 change.
Change-Id: I96cf36dc317499df91e43502efc85221f8177395
Closes-Bug: #1300161
|
| |
|
|
|
|
|
|
|
|
| |
Failure class is important part of TaskFlow API, so it should
be more visible and accessible.
Breaking change: any client that used taskflow.utils.misc.Failure
should be updated.
Change-Id: Ib30000c9246bbcb227b34dfb0aba4d0b950bf926
|
| |
|
|
|
|
|
|
|
|
|
|
| |
New version is able to compare sequences whith elements that are not
hashable and cannot be compared (so that sorted() does not work).
For that, a utility function that caluclates difference between two
sequences was added. This function was also used in retry.ForEachBase.
The assertion was also renamed to assertItemsEqual, which matches
same assertion that was added in python 2.7.
Change-Id: I2b1b811190e9dc51718e4ca17ffc5c9015c34dc4
|
| |
|
|
|
|
|
|
|
| |
Remove line containing
comment - # vim: tabstop=4 shiftwidth=4 softtabstop=4
Change-Id: I7581cc88b8de433d5609ed06c6570b0b45c13573
Closes-Bug:#1229324
|
| |
|
|
|
|
|
|
| |
* Added missing period for doc strings
* Correct syntax errors
* Remove H402 from flake8 ignore list
Change-Id: Ia8592bf99378e3658d6cca2ceb148bf9eb0b5de8
|
| |
|
|
|
|
|
|
|
|
|
| |
Record how long a task took to execute (or fail)
by adding a new listener (and associated refactoring)
that can be used to record these time statistics in
storage.
blueprint capture-task-duration
Change-Id: I9c556e5dcbad924380ae4b94ffb03bc22edad50a
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
It appears that instance methods do not get removed
due to not passing the 'is' check, so switch to using
a new reflection utility method which can handle this
equality check in a way that actually works.
Also adds tests to make sure this does not occur again.
Closes-Bug: 1257550
Change-Id: Iab47dd62cb61de0d93d0fe8d90e59772beebeaeb
|
| |
|
|
|
|
|
|
| |
- don't allow python keywords;
- use ascii symbols only, no national letters or digits;
- code cleanup.
Change-Id: Ibf863edb6fd06257df05ca3c490f87f1c097144f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Make the python 3.3 testing work by selectively
disabling & including eventlet, switch to testtools
and testrepository which has 2.6, 2.7, 3.2+ unified
testing support so that we can correctly run our
tests in all supported python versions.
Closes-Bug: #1251660
Co-authored-by: Alexander Gorodnev <agorodnev@griddynamics.com>
Change-Id: I23b6f04387cfd3bf6b5a044edffa446ca897ce3a
|
| |
|
|
|
|
|
| |
Replace assertEquals and assertNotEquals with assertEqual and
assertNotEqual (new rule, H234), and fix indentation.
Change-Id: I86177325dee3aa00af5df8b3085acd478994ee34
|
| |
|
|
|
|
|
|
|
| |
We used to ignore optional task arguments (arguments of 'execute' method
with default value). With this change flow author can pass such
arguments to task by mentioning them in 'requires' and/or 'rebind'
task constructor parameters.
Change-Id: Ib92f87eb05623d30db6f1691d75c11376d45c87a
|
| |
|
|
|
|
|
|
|
|
|
|
| |
A "_" is a valid python identifier as long as it
is not the first letter of the given attribute (as
an attribute dict doesn't have the concept of
protected/private variables).
Also include a few links and comments as to why
the restrictions are inplace.
Change-Id: I23f17113cedb99b2817bad0c464a43d10af6722c
|
| |
|
|
|
|
|
|
|
|
|
| |
Refactor taskflow.utils.reflection to use six and py3-compatible
constructs.
Breaking change: drop class name from result of get_callable_name
for unbound methods. One can't get class name for unbound method
in python 3.
Change-Id: I98c5b33e7ee4520caf365aa87c9859ec967990de
|
| |
|
|
|
|
|
|
| |
Make utils.reflection.get_class_name() return just type name (without
module) for builtin exceptions and types. This makes output less
clumsy and makes this function return same strings for python 2 and 3.
Change-Id: Ibc599ed34c804cf2cf2ab67e7466a48ebe7f6df3
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
In order to avoid the circular import
in threading utils move the decorators
functionality to utils/misc and move the
locking functionality to utils/lock_utils
and then use these functions from the
threading util (and elsewhere).
Fixes bug: 1236080
Change-Id: I9e71c2ba15782cbb6dd5ab7e1264b77ed47bc29e
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* save task failures to sqlalchemy backend and restore them
from there;
* for any wrapped exception use common WrappedFailre exception
type, which makes it easier to handle particular exception types;
* several minor improvements.
Affects-db: this change adds db migration that looses exception
information for saved task details.
Change-Id: I575282002e6999646bbf51f492b82a7e3525787a
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to move away from the existing flows having their
own implementation of running, start moving the existing
flows to be patterns that only structure tasks (and impose
constraints about how the group of tasks can run) in useful
ways.
Let the concept of running those patterns be handled by an
engine instead of being handled by the flow itself. This
will allow for varying engines to be able to run flows in
whichever way the engine chooses (as long as the constraints
set up by the flow are observed).
Currently threaded flow and graph flow are broken by this
commit, since they have not been converted to being a
structure of tasks + constraints. The existing engine has
not yet been modified to run those structures either, work
is underway to remediate this.
Part of: blueprint patterns-and-engines
Followup bugs that must be addressed:
Bug: 1221448
Bug: 1221505
Change-Id: I3a8b96179f336d1defe269728ebae0caa3d832d7
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In this commit we split utils module into several parts:
- flow_utils, with code used in running flows;
- threading_utils, with code that helps in working with threads;
- reflection, with code that inspects python objects metadata;
- misc, with all the other code that used to live in utils.py.
We also move graph_utils into taskflow.utils package.
This commit just moves code around. It should not change any logic (with
exception of complex_graph example).
Change-Id: Iebfe45395f0ff502bc00fc7ae14829130b2c6abe
|
| |
|
|
|
|
|
|
|
|
| |
Move code that gets callable args from functor task to utils.py and
enhance it to support more use cases.
We do not rely on naming conventions for 'self' and 'cls' parameters any
more; we look at the collable if it is bound method instead.
Change-Id: Ie1a9a7cc727b5fbc2780aba28b1d0253e5bc0ea4
|
| |
|
|
|
|
|
| |
Code that makes name from a callable was moved from functor
task to utils and enhanced to better support more use cases.
Change-Id: I1280a31553c5051079e60b31cd1796f51485f040
|
| |
|
|
|
|
|
|
|
|
|
| |
Instead of being strongly tied to unittest2 make
it easier for taskflow to switch to another root
class (testr?) by abstracting out the unittest2
usage. This also enables some useful functionality
to exist in that root test class that other tasks
can take advantage of.
Change-Id: I381b6fb07e47f984b44cde439a17f39a1c1d32ac
|
| |
|