| Commit message (Collapse) | Author | Age | Files | Lines |
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/
|
|
|
|
|
|
| |
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
|
| |/
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let's dive into what the problem is here.
First a description of what happens to a task that
is to be executed in a external (but local) process
via the process executor mechanism.
When a task is about to be sent to execute in the
external (but local) process its first cloned, this
is mainly done so that its notification callbacks can
be altered in a safe manner (ie not altering the
original task object to do this) and that clone has
its notifier emptied out.
What replaces the clone's notifier callbacks though
is a new object (that has a __call__ method so it
looks like just another callback) that will send
messages to the parent process (the one that has
the engine in it) over a secure(ish) channel whenever
the local task triggers its notifier notify() method.
This allows for callbacks in the parent process to
get triggered because once the messages recieved the
original tasks notifier object has its notify() method
called (therefore those callbacks do not really know
the task they are getting messages from is executing out
of process).
The issue though is that if the ANY(*) event type is registered
due to how it works in the notifier is that if the child/cloned
notifier has the ANY event type registered and the cloned task
calls notify() with a specific event this will cause the ANY
callback (in the clone) to transmit a message *and* it will
cause the *specific* event callback to also transmit a message
back to the parent process.
On the engine process side it will get 2 messages and trigger
the callbacks 3 times (twice for the specific event callback
because how the local notifier has the ANY callback registered
and one more time when the local process also sends the same
event based on its registration of the ANY event in the child
process).
This is not what is expected (the message rcved on the engine
process should only trigger one callback to get triggered
if the engine process task has no ANY callback registered or two
engine process callbacks to get triggered if the engine process
task has the ANY callback registered).
Closes-Bug: #1537948
Change-Id: I271bf1f23ad73df6c177cf00fd902c4881ba44ae
|
| |
|
|
|
|
|
|
| |
python3.0 has deprecated LOG.warn
https://docs.python.org/3/library/logging.html#logging.warning
Closes-Bug: #1650843
Change-Id: Ib8473cbdb84547f385e619fe08ed723b1ee7bcdb
|
| |
|
|
|
|
|
|
|
| |
Lock down the various state machine action handling
functions so that they are ensured correct (and consistent)
access to the storage layer when they are modifiying and/or
reading it.
Change-Id: Ie893a44aa963ab515f19e77f9904f49c843cb4e5
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
| |
This can be useful to look at for debugging purposes
when trying to understand how (and if) a atom is being
ignored by a set of deciders.
Change-Id: I550a2f7f361e516c255683d725b2f3a8130a0a86
|
| |
|
|
|
|
| |
This is to remove unused LOG to keep code clean.
Change-Id: Ie44659f3b7af9612f127f7d46bb2c1481b6a634f
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| | |
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
|
| | |
| |
| |
| | |
Change-Id: I7e3451feb94b1f25b00c5e7b197bb6b527548306
|
| |/
|
|
|
|
|
|
|
| |
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 waiting on futures to complete that may still be
in an executors backlog (aka, not even started yet) we can
avoid even executing (and waiting on these to finish) by
forcing them to be cancelled and handling this when analyzing
the futures result (by doing nothing with the cancelled result
of a future).
This saves some time when doing suspension with executors that
have a very small pool of workers that actually run tasks/atoms.
Change-Id: Ie79466c44ac6af5ff8936f192ebce4428aa12d98
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Moved common argument mapping logic to Atom
* Removed BaseTask
* Removed duplicated logic from subclasses
Change-Id: I275745adb80cecb0c35c1230eac76436bf3b0157
|
| |\ \ \ |
|
| | |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
For allowing for future changes (where the future
'add_done_callback' can be used if we deem it to be ok
to do this) make the completion of an atom a small helper
function that is called (and can be called elsewhere in
the future).
Change-Id: Ief2746debf496b017331a88c7913d9321aac0774
|
| |\ \ \ |
|
| | | | |
| | | |
| | | |
| | | | |
Change-Id: Iaee621e15330979d80285430be97af91934b0357
|
| |\ \ \ \
| |_|/ /
|/| | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This is hopefully useful to understand why this happens
in this order.
Change-Id: I8ff63417489a8d4bada12acc91dbc6bca69df2ba
|
| | |_|/ /
|/| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Add more trace logging that can be useful to log
when things start to work in the wrong way (which
can sometimes happen).
Change-Id: I7f36735d29c94e382f790feef283e538a9a6a8ff
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Christmas came early.
Closes-Bug: #1479466
Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This wasn't actually using the right data to derive
uniqueness, so fix it to actually use the right entry
to determine what to skip or what not to skip.
Closes-Bug: #1525379
Change-Id: Ic23b6d03877f7714f6a3fb74adac0ba58cd97f0d
|
| |\ \ \ \ |
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
The utility method allows for moving the logic of which
item compiler handles which type to the main compiler
class instead of having it in each per compiler instance.
Change-Id: Iec578b846a879cbff40f2c50ce865eb260b073e8
|
| | | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of doing repeated type checks in the completer engine
internal component/object just use the runtime compilation routine
to cache the mapping of atom names to actions and then use an exposed
function to fetch the needed action in the completer object
as needed.
Change-Id: I07161e7956d039cf89d057b8082e12b82adcd82f
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I415a81d3b6b15b17a9a91cc2a0681c159172a4e1
|
| |\ \ \ \ \
| |/ / / /
|/| | | | |
|
| | | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I2ff3b9bb4d0b8143163e4bf370f10c74e79dbd31
|
| |\ \ \ \ \
| |_|/ / /
|/| | | | |
|
| | | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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
|