| 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
|
| |
|
|
| |
Change-Id: I66b9937df5c58561792328e08f836dc05927e7f1
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This moves out the engine next to run (or revert)
selection process to a single class that just does
this and moves out the common functions the analyzer
class provided to the runtime object (which all
components can access).
This makes it easier to adjust the selection algorithm
in different ways.
Change-Id: I091c69297a7bff60729791d3ca6c3fae14d6eea5
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
The usage of the full name is easier to read and easier
to understand in the surronding code so prefer to use
it.
Change-Id: I1c43704ae7dfdba90217ce9a1c60cef8e2ce8632
|
| |/
|
|
|
|
|
|
|
| |
To make it more obvious when a revert method is missing
a dependency, we now identify which method was missing
the required paramater.
Change-Id: I24b0d0b01dbd239b92ba444f6ef44273c5ac25d3
Closes-Bug: 1581616
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For a local process based executor usage currently to ensure
that task emitted notifications are proxied we use the multi
processing library and use its queue concept. This sadly creates
a proxy process that gets associated, and this proxy process
handles the queue and messages sent to and from it. Instead of
doing this we can instead just create a temporary local socket
using a random socket and have tasks (which are running in
different processes) use that to communicate back any emitted
notifications instead (and we can use the asyncore module to handle
the emitted notifications since it handles the lower level socket
reading, polling and dispatching).
To ensure that the socket created is somewhat secure we use a
similar process as the multi-processing library uses where we
sign all messages with a hmac that uses a one time key that only
the main process and the child process know about (and reject
any messages that do not validate using this key).
Change-Id: Iff9180054bf14495e5667af00ae2fafbdbc23791
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Currently when a string is passed to the parallel engine
it will only know how to create a process or a native thread
based executor. The futurist library also supports making
a green thread based executor, so support creating it.
This will save glance some code that they have to create
a executor based on different options (one of those is a
green option).
Change-Id: I15c164a38b4445d28eb6062aed6c56cce0e0364b
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of needing the engine method to lock, fetch, check
and then update the flow state it is more appropriate if the
storage class does all these actions itself (therefore hiding
this change from the engine code, making the engine code
that much smaller).
Change-Id: I2a289c2bcabe76728fa8eb26265ce168abf81b7c
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
Change-Id: Ic16c854d285398c688f132697c3bb7e637feb9a8
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
It can be quite nice to expose a basic set of metrics
about the internals of an engine, including the time
in each state, and how long the engine is active for
and likely more in the future.
To start add a engine statistics property and gather
some basic timing data and place this data into this
property for access (and/or introspection) by users.
Part of blueprint gather-engine-statistics
Change-Id: Ibc3c78755bd8ae779b52fc4772519f243a521576
|
| |\ \ \ \ |
|
| | |/ / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Also allows for people to create Atom's with a different rebind
or requires structure for the revert method, if desired.
Implements blueprint: seperate-revert-args
Change-Id: Ie7d13c8000ef08ff303481d486d1ba1cfbdeea44
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It can be useful for debugging a failure to be able
to stop when a failure is detected so that the failure
can be examined in more detail.
This adds the ability to have a 'never_resolve' engine
option which will skip such resolution attempts for
these types of scenarios.
Change-Id: If2386cba970e14c7168a6ff2d4fd4786bcd8e989
|
| |\ \ \
| |/ /
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It can be quite useful to control the delay/timeout
used during waiting periods via the run() method and
not requiring the usage of run_iter() to achieve the
same thing.
This change makes it possible to pass the same timeout
used in run_iter() to run() and have it be used in the
engine internals.
Change-Id: I3798ee14600a2d30e009abf1f273b5edbbe3f5ed
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Christmas came early.
Closes-Bug: #1479466
Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
|
| | | |
| | |
| | |
| | | |
Change-Id: I415a81d3b6b15b17a9a91cc2a0681c159172a4e1
|
| |/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of having 'self._check' be called at the stat
of every using function it can be made into a decorator
and placed on the function instead. This way it is a little
more explicit than having it called at the start of each
method.
This also adds a check to ensure the engine has been validated
before it is ran (and the decorator takes into this into
account as well).
Change-Id: I67ee8fe8629392003f7777d4d4fab918b1a071dd
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of repeatedly extraction of engine options in
local functions/methods, just extract the currently
used options once (in using objects __init__ methods).
This saves some repeated extraction and establishes
the pattern of where engine options should be extracted
going forward.
Change-Id: I4d24f7badef61fdd69db22f59931c374c32986ff
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: If0f213a0304bc336e95d72157cc2d4d402ebdd3f
|
| | |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of having the compiler do any validation on the
graph it has created instead have the compiler just compile
and have the engine that uses that compiled result do any
post compilation validation instead.
This makes it more clear that the compiler just compiles a
flow (and tasks and nested flows) into a graph, and that is
all that it does.
Change-Id: I96a35d732dc2be9fc8bc8dc6466256a19ac2df6d
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Instead of the added complexity of discarding flow nodes
we can simplify the compilation process by just retaining
them and jumping over them in further iteration and graph
and tree runtime usage.
This change moves toward a model that does just this, which
makes it also easier to in the future use the newly added
flow graph nodes to do meaningful things (like use them as
a point to change which flow_detail is used).
Change-Id: Icb1695f4b995a0392f940837514774768f222db4
|
| |\ \ |
|
| | |/
| |
| |
| | |
Change-Id: I0822bbf1caf28a8fd2b4e914643aca61ae0c7f45
|
| |/
|
|
|
|
|
|
|
| |
Just directly use the built machine in the action engine and
avoid having another layer of abstraction that does not provide
that much value. This makes the code cleaner, and more easy to
understand (and so-on).
Change-Id: Iae1279098112254338258c1941c15889f1ad1a79
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
If an engines work was previously partially completed and
it is desired to reset it (and re-run) so that partially
completed or ignored (or other) work inside of it can run
again make that possible by exposing and documenting
a new `reset` method (and use it internally as well).
Change-Id: I47f82010a2108d5d8fd5e42ca9f7e5f165e65488
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
To make it easily possible to change the retry
atom execution from being in the engine thread this
creates a retry executor (which is similar to the task
executor) and provide that a serial executor (which it will
use to execute with). This makes the retry and task actions
closer to being the same and makes the surrounding code that
much similar (which makes understanding it easier).
Change-Id: I993e938280df3bd97f8076293183ef21989e2dba
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
There really isn't any benefit in delaying the local
attributes creation until its first used so just upfront
create the compiler object.
Change-Id: I48c4342a6669077dd35f9cb8f25b5313d6814c8e
|
| |\ \ |
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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
|
| |/ /
| |
| |
| | |
Change-Id: If89baa042695f19e42b6368034f3ccf22c2cf0aa
|
| |\ \
| |/
|/| |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The addition of this method will make it possible
to optimize the many queries and updates that are performed
when a engine is initially having its storage unit prepared.
Part of blueprint make-things-speedy
Change-Id: Ie812abfbeca97372be05bc13e5c1059278fbbf4c
|
| |\ \ |
|
| | | |
| | |
| | |
| | | |
Change-Id: I5654b5db0db6b8e9884dae5cc285400edce2a698
|
| | | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Split the states that are not task states (but are retry
states) into there own additional set and then use that set
and a new function to validate the transition at other locations
in the code-base.
This makes the transitions that are valid for tasks/retries
easily viewable, more easy to read and understand, and
more correct (instead of being a mix of task + retry atom
transitions and states).
Change-Id: I9515c19daf59a21e581f51e757ece2050f348214
|
| |\ \ \
| |_|/
|/| | |
|
| | | |
| | |
| | |
| | |
| | |
| | | |
Depends-On: I442249783da4a6ae10c78b95e0b279409c95d2e6
Change-Id: I877928c858e8d6176d3f01ad9de2765104acf5c3
|
| |/ /
| |
| |
| | |
Change-Id: I48e5efdb28ee834666ec1eca18f35f245de340d3
|
| |/
|
|
| |
Change-Id: I65746fc7bc27f0b03e416eb6584df18bbc4a3053
|