| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|/
|
|
|
| |
Change-Id: Id87a1b17c1986d0e30629fed13bdfbecef4a3603
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
python3.0 has deprecated LOG.warn
https://docs.python.org/3/library/logging.html#logging.warning
Closes-Bug: #1650843
Change-Id: Ib8473cbdb84547f385e619fe08ed723b1ee7bcdb
|
|/
|
|
|
|
|
|
| |
dict.keys() returns object dict_keys on Python 3, can't work well
with kombu recently, convert it to list before futhur processing.
Closes-Bug: #1687855
Change-Id: I9dcfadd8f16eccce06f4cde3b2a6669f28a3f8bc
|
|
|
|
|
|
|
|
|
| |
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
|
|/
|
|
|
|
|
|
|
|
| |
Some classes defines __eq__() built-in function, but does
not define __ne__() built-in function, so self.assertEqual works
but self.assertNotEqual does not work at all in this test case in
python2. This patch fixes it.
Change-Id: I3e4f213081268bad44583a63a84795d39094117f
Closes-Bug: #1586268
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Change-Id: Id9adbc50bd51adc77ce88f698ad0ea2ee63fc5e2
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
|\ \ \ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Ifdf275a623352aa3e42fbf0aa9a4394b64b54337
|
|\ \ \ \ \ |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Change-Id: Ib26ff4418ab1128a578519be964c4d39cbd1d2f4
|
|\ \ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
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
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
When a worker hasn't responded to a notification
request for a given amount of time remove it from
being a useable worker that we can match task submissions
to.
Change-Id: I596bccc1c42f83ee79136dd27bc87039154ff7b1
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Remove some of the usage of @property as none of
these objects are publicly exposed (or have docstrings
on them) to save some space/lines of code that aren't
really adding any benefit.
Use less **kwargs when we know exactly what the keyword
arguments will or will not be. Being explicit makes it
easier to understand these functions (vs not knowing what
the arguments can or can't be).
Removes base worker finder because right now we only
have one implementation (at some point we will have
two) but we can just wait to add a base class until
then.
Change-Id: I7107ff6b77a355b4c5d301948355fb6386605388
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Instead of having a periodic notification thread that
will drop messages to try to find workers we can just
have this same work be done in the periodically called
on_wait callback that is already used for expiring and
matching workers to new/updated workers.
This avoids having one more thread that doesn't do all
that much (and activating it during waiting calls will
be often enough to achieve its goal in life).
Change-Id: If80233d13d914f2ed3665001a27627b78e6ee780
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
If the worker finder has not gotten any new notification messages
letting it know about new (or updated) workers we can just skip
trying to match existing waiting work to workers as without messages
being processed the match will still not work (as the worker data
doesn't change without those messages being processed).
Change-Id: I41d50c676f04f85c49a03d9d503da1955af45f7d
|