<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openstack/taskflow.git/taskflow/tests/unit/test_engines.py, branch 4.6.2</title>
<subtitle>opendev.org: openstack/taskflow.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/'/>
<entry>
<title>Update URLs in documents according to document migration</title>
<updated>2017-07-13T04:05:18+00:00</updated>
<author>
<name>ChangBo Guo(gcb)</name>
<email>eric.guo@easystack.cn</email>
</author>
<published>2017-07-13T04:05:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=40645e19a7036f8e7b1e5d7d1a37a5ef874cfc4c'/>
<id>40645e19a7036f8e7b1e5d7d1a37a5ef874cfc4c</id>
<content type='text'>
Change-Id: I9ca92fdcec388e02462332e04fe7c1bf8b5f64b8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I9ca92fdcec388e02462332e04fe7c1bf8b5f64b8
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix process based executor task proxying-back events</title>
<updated>2017-07-11T03:14:04+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@yahoo-inc.com</email>
</author>
<published>2016-01-25T23:56:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=84c7a7b2c7dcbade1bc802cac7c93ccd9b746cb3'/>
<id>84c7a7b2c7dcbade1bc802cac7c93ccd9b746cb3</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace assertRaisesRegexp with assertRaisesRegex</title>
<updated>2017-06-03T06:40:12+00:00</updated>
<author>
<name>Vu Cong Tuan</name>
<email>tuanvc@vn.fujitsu.com</email>
</author>
<published>2017-06-03T05:28:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=db61fad6b237934f410e9ccbd1c24cf13e6c53fb'/>
<id>db61fad6b237934f410e9ccbd1c24cf13e6c53fb</id>
<content type='text'>
assertRaisesRegexp was renamed to assertRaisesRegex in Py3.2
For more details, please check:
https://docs.python.org/3/library/
unittest.html#unittest.TestCase.assertRaisesRegex

Change-Id: I89cce19e80b04074aab9f49a76c7652acace78b3
Closes-Bug: #1436957
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
assertRaisesRegexp was renamed to assertRaisesRegex in Py3.2
For more details, please check:
https://docs.python.org/3/library/
unittest.html#unittest.TestCase.assertRaisesRegex

Change-Id: I89cce19e80b04074aab9f49a76c7652acace78b3
Closes-Bug: #1436957
</pre>
</div>
</content>
</entry>
<entry>
<title>Instead of a multiprocessing queue use sockets via asyncore</title>
<updated>2016-05-24T23:16:56+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@yahoo-inc.com</email>
</author>
<published>2015-11-12T00:33:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=c5e9cf28df9dda763d146859b1472d8bbcf85665'/>
<id>c5e9cf28df9dda763d146859b1472d8bbcf85665</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow for specifying green threaded to parallel engine</title>
<updated>2016-05-03T18:00:51+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@yahoo-inc.com</email>
</author>
<published>2016-01-25T21:28:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=261826674b6d556f0b23b0431fcae6f5202863a9'/>
<id>261826674b6d556f0b23b0431fcae6f5202863a9</id>
<content type='text'>
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
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Ensure that the engine finishes up even under sent-in failures"</title>
<updated>2016-04-28T20:50:08+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2016-04-28T20:50:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=bc69b55a01719bad8f7bc848ef333eded66f747f'/>
<id>bc69b55a01719bad8f7bc848ef333eded66f747f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge "Use 'addCleanup' instead of 'tearDown' in engine(s) test"</title>
<updated>2016-02-03T21:14:07+00:00</updated>
<author>
<name>Jenkins</name>
<email>jenkins@review.openstack.org</email>
</author>
<published>2016-02-03T21:14:06+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=48c4187a2e07684d4db024f75653ea8cbc207aa5'/>
<id>48c4187a2e07684d4db024f75653ea8cbc207aa5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Ensure that the engine finishes up even under sent-in failures</title>
<updated>2016-01-21T01:11:00+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@yahoo-inc.com</email>
</author>
<published>2016-01-21T00:51:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=6957eec3fd6b96fb76a562f20d3b57995e547d8f'/>
<id>6957eec3fd6b96fb76a562f20d3b57995e547d8f</id>
<content type='text'>
Change-Id: Ic16c854d285398c688f132697c3bb7e637feb9a8
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: Ic16c854d285398c688f132697c3bb7e637feb9a8
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow for alterations in decider 'area of influence'</title>
<updated>2016-01-10T06:42:17+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@yahoo-inc.com</email>
</author>
<published>2015-11-17T00:27:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=8e8156c488dea8ae876b112c30e41e60da4f5be7'/>
<id>8e8156c488dea8ae876b112c30e41e60da4f5be7</id>
<content type='text'>
Christmas came early.

Closes-Bug: #1479466

Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Christmas came early.

Closes-Bug: #1479466

Change-Id: I931d826690c925f022dbfffe9afb7bf41345b1d0
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow provided flow to be empty</title>
<updated>2015-11-20T20:56:51+00:00</updated>
<author>
<name>Joshua Harlow</name>
<email>harlowja@gmail.com</email>
</author>
<published>2015-08-03T03:48:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/openstack/taskflow.git/commit/?id=010b3fda2125dd9fe10e8ee8cfd5aba35575c43a'/>
<id>010b3fda2125dd9fe10e8ee8cfd5aba35575c43a</id>
<content type='text'>
If someone really wants to provide a flow to run that is
empty that is there prerogative so it doesn't seem that valuable
to blow up if they do this.

Change-Id: I0ad89b0ade85a64f6ec107e2686454ef6dc97353
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If someone really wants to provide a flow to run that is
empty that is there prerogative so it doesn't seem that valuable
to blow up if they do this.

Change-Id: I0ad89b0ade85a64f6ec107e2686454ef6dc97353
</pre>
</div>
</content>
</entry>
</feed>
