Website ready for builds?

2017-06-21 Thread John D. Ament
All,

Some feedback from today's board meeting.  Its noted that Aria Tosca has
been incubating for 10 months and still doesn't have a website hosted at
Apache.  I know Arthur had been doing some work on the area, but wanted to
see if the current code in the website repo was ready to go?

If so, would I be able to get a script together similar to
https://github.com/apache/incubator/blob/jbake-site/build_site.sh that does
the actual site build?  Obviously replace the bake command (from jbake)
with the proper commands to get the website built.

John


incubator-ariatosca git commit: ARIA-283 Update readme installation instructions [Forced Update!]

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-283-update-readme-installation-instructions e7ab90d10 -> 
e339960ef (forced update)


ARIA-283 Update readme installation instructions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e339960e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e339960e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e339960e

Branch: refs/heads/ARIA-283-update-readme-installation-instructions
Commit: e339960ef92663560c68cf049e824853f91cf74b
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 18:05:05 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 18:07:48 2017 +0300

--
 README.rst | 63 -
 1 file changed, 44 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e339960e/README.rst
--
diff --git a/README.rst b/README.rst
index 8af13a5..3aa62fe 100644
--- a/README.rst
+++ b/README.rst
@@ -26,37 +26,62 @@ ARIA is an incubation project under the `Apache Software 
Foundation `__.
+ARIA is `available on PyPI `__.
+
+ARIA requires Python 2.6/2.7. Python 3 is currently not supported.
 
 To install ARIA directly from PyPI (using a ``wheel``), use::
 
-pip install aria
+pip install --upgrade pip setuptools
+pip install apache-ariatosca
 
 To install ARIA from source, download the source tarball from
-`PyPI `__, extract it, and then when 
inside the extracted
-directory, use::
+`PyPI `__, extract it, and run::
 
-pip install .
+pip install --upgrade pip setuptools
+pip install incubator-ariatosca
 
 The source package comes along with relevant examples, documentation, 
``requirements.txt`` (for
 installing specifically the frozen dependencies' versions with which ARIA was 
tested) and more.
 
-Note that for the ``pip install`` commands mentioned above, you must use a 
privileged user, or use
-virtualenv.
 
-ARIA itself is in a ``wheel`` format compatible with all platforms. Some 
dependencies, however,
-might require compilation (based on a given platform), and therefore possibly 
some system
-dependencies are required as well.
+ARIA has additional optional dependencies. These are required for running 
operations over SSH.
+Below are instructions on how to install these dependencies, including 
required system dependencies
+per OS.
+
+Note: These dependencies may have varying licenses which may not be compatible 
with Apache license 2.0.
+
+
+Ubuntu/Debian (tested on Ubuntu14.04, Ubuntu16.04)::
+
+apt-get install -y python-dev gcc libffi-dev libssl-dev
+pip install aria[ssh]
+
+Centos (tested on Centos6.6, Centos7)::
+
+yum install -y python-devel gcc libffi-devel openssl-devel
+pip install aria[ssh]
+
+Archlinux::
+
+pacman -Syu --noconfirm python2 gcc libffi openssl
+pip2 install aria[ssh]
+
+Windows (tested on Win10)::
+
+# no additional system requirements are needed
+pip install aria[ssh]
+
+MacOS::
 
-On Ubuntu or other Debian-based systems::
+# TODO
 
-sudo apt install python-setuptools python-dev build-essential libssl-dev 
libffi-dev
 
-On Archlinux::
 
-sudo pacman -S python-setuptools
+To install ``pip``, either use your distro's package management system, or run:
 
-ARIA requires Python 2.6/2.7. Python 3+ is currently not supported.
+wget http://bootstrap.pypa.io/get-pip.py
+python get-pip.py
 
 
 Getting Started
@@ -129,10 +154,10 @@ ARIA is licensed under the
:target: 
https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history
 .. |License| image:: 
https://img.shields.io/github/license/apache/incubator-ariatosca.svg
:target: http://www.apache.org/licenses/LICENSE-2.0
-.. |PyPI release| image:: https://img.shields.io/pypi/v/ariatosca.svg
-   :target: https://pypi.python.org/pypi/ariatosca
-.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/ariatosca.svg
-.. |Wheel| image:: https://img.shields.io/pypi/wheel/ariatosca.svg
+.. |PyPI release| image:: https://img.shields.io/pypi/v/apache-ariatosca.svg
+   :target: https://pypi.python.org/pypi/apache-ariatosca
+.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/apache-ariatosca.svg
+.. |Wheel| image:: https://img.shields.io/pypi/wheel/apache-ariatosca.svg
 .. |Contributors| image:: 

incubator-ariatosca git commit: ARIA-283 Update readme installation instructions [Forced Update!]

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-283-update-readme-installation-instructions e339960ef -> 
92480c20c (forced update)


ARIA-283 Update readme installation instructions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/92480c20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/92480c20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/92480c20

Branch: refs/heads/ARIA-283-update-readme-installation-instructions
Commit: 92480c20cdb9eff33d2846d8324145b3d5053484
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 18:05:05 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 18:08:20 2017 +0300

--
 README.rst | 63 -
 1 file changed, 44 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/92480c20/README.rst
--
diff --git a/README.rst b/README.rst
index 8af13a5..d49410c 100644
--- a/README.rst
+++ b/README.rst
@@ -26,37 +26,62 @@ ARIA is an incubation project under the `Apache Software 
Foundation `__.
+ARIA is `available on PyPI `__.
+
+ARIA requires Python 2.6/2.7. Python 3 is currently not supported.
 
 To install ARIA directly from PyPI (using a ``wheel``), use::
 
-pip install aria
+pip install --upgrade pip setuptools
+pip install apache-ariatosca
 
 To install ARIA from source, download the source tarball from
-`PyPI `__, extract it, and then when 
inside the extracted
-directory, use::
+`PyPI `__, extract it, and run::
 
-pip install .
+pip install --upgrade pip setuptools
+pip install incubator-ariatosca
 
 The source package comes along with relevant examples, documentation, 
``requirements.txt`` (for
 installing specifically the frozen dependencies' versions with which ARIA was 
tested) and more.
 
-Note that for the ``pip install`` commands mentioned above, you must use a 
privileged user, or use
-virtualenv.
 
-ARIA itself is in a ``wheel`` format compatible with all platforms. Some 
dependencies, however,
-might require compilation (based on a given platform), and therefore possibly 
some system
-dependencies are required as well.
+ARIA has additional optional dependencies. These are required for running 
operations over SSH.
+Below are instructions on how to install these dependencies, including 
required system dependencies
+per OS.
+
+Note: These dependencies may have varying licenses which may not be compatible 
with Apache license 2.0.
+
+
+Ubuntu/Debian (tested on Ubuntu14.04, Ubuntu16.04)::
+
+apt-get install -y python-dev gcc libffi-dev libssl-dev
+pip install aria[ssh]
+
+Centos (tested on Centos6.6, Centos7)::
+
+yum install -y python-devel gcc libffi-devel openssl-devel
+pip install aria[ssh]
+
+Archlinux::
+
+pacman -Syu --noconfirm python2 gcc libffi openssl
+pip2 install aria[ssh]
+
+Windows (tested on Win10)::
+
+# no additional system requirements are needed
+pip install aria[ssh]
+
+MacOS::
 
-On Ubuntu or other Debian-based systems::
+# TODO
 
-sudo apt install python-setuptools python-dev build-essential libssl-dev 
libffi-dev
 
-On Archlinux::
 
-sudo pacman -S python-setuptools
+To install ``pip``, either use your distro's package management system, or 
run::
 
-ARIA requires Python 2.6/2.7. Python 3+ is currently not supported.
+wget http://bootstrap.pypa.io/get-pip.py
+python get-pip.py
 
 
 Getting Started
@@ -129,10 +154,10 @@ ARIA is licensed under the
:target: 
https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history
 .. |License| image:: 
https://img.shields.io/github/license/apache/incubator-ariatosca.svg
:target: http://www.apache.org/licenses/LICENSE-2.0
-.. |PyPI release| image:: https://img.shields.io/pypi/v/ariatosca.svg
-   :target: https://pypi.python.org/pypi/ariatosca
-.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/ariatosca.svg
-.. |Wheel| image:: https://img.shields.io/pypi/wheel/ariatosca.svg
+.. |PyPI release| image:: https://img.shields.io/pypi/v/apache-ariatosca.svg
+   :target: https://pypi.python.org/pypi/apache-ariatosca
+.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/apache-ariatosca.svg
+.. |Wheel| image:: https://img.shields.io/pypi/wheel/apache-ariatosca.svg
 .. |Contributors| image:: 

incubator-ariatosca git commit: ARIA-283 Update readme installation instructions [Forced Update!]

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-283-update-readme-installation-instructions f786a73dd -> 
e7ab90d10 (forced update)


ARIA-283 Update readme installation instructions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/e7ab90d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/e7ab90d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/e7ab90d1

Branch: refs/heads/ARIA-283-update-readme-installation-instructions
Commit: e7ab90d10dc9cccd320253c8c7092b007eeba812
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 18:05:05 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 18:06:46 2017 +0300

--
 README.rst | 63 -
 1 file changed, 44 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/e7ab90d1/README.rst
--
diff --git a/README.rst b/README.rst
index 8af13a5..fe9c489 100644
--- a/README.rst
+++ b/README.rst
@@ -26,37 +26,62 @@ ARIA is an incubation project under the `Apache Software 
Foundation `__.
+ARIA is `available on PyPI `__.
+
+ARIA requires Python 2.6/2.7. Python 3 is currently not supported.
 
 To install ARIA directly from PyPI (using a ``wheel``), use::
 
-pip install aria
+pip install --upgrade pip setuptools
+pip install apache-ariatosca
 
 To install ARIA from source, download the source tarball from
-`PyPI `__, extract it, and then when 
inside the extracted
-directory, use::
+`PyPI `__, extract it, and run::
 
-pip install .
+pip install --upgrade pip setuptools
+pip install incubator-ariatosca
 
 The source package comes along with relevant examples, documentation, 
``requirements.txt`` (for
 installing specifically the frozen dependencies' versions with which ARIA was 
tested) and more.
 
-Note that for the ``pip install`` commands mentioned above, you must use a 
privileged user, or use
-virtualenv.
 
-ARIA itself is in a ``wheel`` format compatible with all platforms. Some 
dependencies, however,
-might require compilation (based on a given platform), and therefore possibly 
some system
-dependencies are required as well.
+ARIA has additional optional dependencies. These are required for running 
operations over SSH.
+Below are instructions on how to install these dependencies, including 
required system dependencies
+per OS.
+
+Note: These dependencies may have varying licenses which may not be compatible 
with Apache license 2.0.
+
+
+Ubuntu/Debian (tested on Ubuntu14.04, Ubuntu16.04)::
+
+apt-get install -y python-dev gcc libffi-dev libssl-dev
+pip install aria[ssh]
+
+Centos (tested on Centos6.6, Centos7)::
+
+yum install -y python-devel gcc libffi-devel openssl-devel
+pip install aria[ssh]
+
+Archlinux::
+
+pacman -Syu --noconfirm python2 gcc libffi openssl
+pip2 install aria[ssh]
+
+Windows (tested on Win10)::
+
+# no additional system requirements are needed
+pip install aria[ssh]
+
+MacOS::
 
-On Ubuntu or other Debian-based systems::
+# TODO
 
-sudo apt install python-setuptools python-dev build-essential libssl-dev 
libffi-dev
 
-On Archlinux::
 
-sudo pacman -S python-setuptools
+To install ``pip``, either use your distro's package management system, or run:
 
-ARIA requires Python 2.6/2.7. Python 3+ is currently not supported.
+wget http://bootstrap.pypa.io/get-pip.py
+python get-pip.py
 
 
 Getting Started
@@ -129,10 +154,10 @@ ARIA is licensed under the
:target: 
https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history
 .. |License| image:: 
https://img.shields.io/github/license/apache/incubator-ariatosca.svg
:target: http://www.apache.org/licenses/LICENSE-2.0
-.. |PyPI release| image:: https://img.shields.io/pypi/v/ariatosca.svg
-   :target: https://pypi.python.org/pypi/ariatosca
-.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/ariatosca.svg
-.. |Wheel| image:: https://img.shields.io/pypi/wheel/ariatosca.svg
+.. |PyPI release| image:: https://img.shields.io/pypi/v/apache-ariatosca.svg
+   :target: https://pypi.python.org/pypi/apache-ariatosca
+.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/apache-ariatosca.svg
+.. |Wheel| image:: https://img.shields.io/pypi/wheel/apache-ariatosca.svg
 .. |Contributors| image:: 

incubator-ariatosca git commit: ARIA-283 Update readme installation instructions

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-283-update-readme-installation-instructions [created] 
f786a73dd


ARIA-283 Update readme installation instructions


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f786a73d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f786a73d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f786a73d

Branch: refs/heads/ARIA-283-update-readme-installation-instructions
Commit: f786a73dd4b2ac2fc56b71e5a9649a4f9ab840f7
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 18:05:05 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 18:05:05 2017 +0300

--
 README.rst | 63 -
 1 file changed, 44 insertions(+), 19 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f786a73d/README.rst
--
diff --git a/README.rst b/README.rst
index 8af13a5..3aa62fe 100644
--- a/README.rst
+++ b/README.rst
@@ -26,37 +26,62 @@ ARIA is an incubation project under the `Apache Software 
Foundation `__.
+ARIA is `available on PyPI `__.
+
+ARIA requires Python 2.6/2.7. Python 3 is currently not supported.
 
 To install ARIA directly from PyPI (using a ``wheel``), use::
 
-pip install aria
+pip install --upgrade pip setuptools
+pip install apache-ariatosca
 
 To install ARIA from source, download the source tarball from
-`PyPI `__, extract it, and then when 
inside the extracted
-directory, use::
+`PyPI `__, extract it, and run::
 
-pip install .
+pip install --upgrade pip setuptools
+pip install incubator-ariatosca
 
 The source package comes along with relevant examples, documentation, 
``requirements.txt`` (for
 installing specifically the frozen dependencies' versions with which ARIA was 
tested) and more.
 
-Note that for the ``pip install`` commands mentioned above, you must use a 
privileged user, or use
-virtualenv.
 
-ARIA itself is in a ``wheel`` format compatible with all platforms. Some 
dependencies, however,
-might require compilation (based on a given platform), and therefore possibly 
some system
-dependencies are required as well.
+ARIA has additional optional dependencies. These are required for running 
operations over SSH.
+Below are instructions on how to install these dependencies, including 
required system dependencies
+per OS.
+
+Note: These dependencies may have varying licenses which may not be compatible 
with Apache license 2.0.
+
+
+Ubuntu/Debian (tested on Ubuntu14.04, Ubuntu16.04)::
+
+apt-get install -y python-dev gcc libffi-dev libssl-dev
+pip install aria[ssh]
+
+Centos (tested on Centos6.6, Centos7)::
+
+yum install -y python-devel gcc libffi-devel openssl-devel
+pip install aria[ssh]
+
+Archlinux::
+
+pacman -Syu --noconfirm python2 gcc libffi openssl
+pip2 install aria[ssh]
+
+Windows (tested on Win10)::
+
+# no additional system requirements are needed
+pip install aria[ssh]
+
+MacOS::
 
-On Ubuntu or other Debian-based systems::
+# TODO
 
-sudo apt install python-setuptools python-dev build-essential libssl-dev 
libffi-dev
 
-On Archlinux::
 
-sudo pacman -S python-setuptools
+To install ``pip``, either use your distro's package management system, or run:
 
-ARIA requires Python 2.6/2.7. Python 3+ is currently not supported.
+wget http://bootstrap.pypa.io/get-pip.py
+python get-pip.py
 
 
 Getting Started
@@ -129,10 +154,10 @@ ARIA is licensed under the
:target: 
https://ci.appveyor.com/project/ApacheSoftwareFoundation/incubator-ariatosca/history
 .. |License| image:: 
https://img.shields.io/github/license/apache/incubator-ariatosca.svg
:target: http://www.apache.org/licenses/LICENSE-2.0
-.. |PyPI release| image:: https://img.shields.io/pypi/v/ariatosca.svg
-   :target: https://pypi.python.org/pypi/ariatosca
-.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/ariatosca.svg
-.. |Wheel| image:: https://img.shields.io/pypi/wheel/ariatosca.svg
+.. |PyPI release| image:: https://img.shields.io/pypi/v/apache-ariatosca.svg
+   :target: https://pypi.python.org/pypi/apache-ariatosca
+.. |Python Versions| image:: 
https://img.shields.io/pypi/pyversions/apache-ariatosca.svg
+.. |Wheel| image:: https://img.shields.io/pypi/wheel/apache-ariatosca.svg
 .. |Contributors| image:: 

incubator-ariatosca git commit: review 1 fix [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 3de374534 -> d6fa143b2 
(forced update)


review 1 fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/d6fa143b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/d6fa143b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/d6fa143b

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: d6fa143b21c10cd5ed16b1819ee5c7ad221cb835
Parents: 2fc9896
Author: max-orlov 
Authored: Wed Jun 21 17:56:27 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 18:00:07 2017 +0300

--
 aria/cli/commands/executions.py|   7 +-
 aria/orchestrator/workflow_runner.py   |  24 ++---
 aria/orchestrator/workflows/core/engine.py |   8 +-
 tests/orchestrator/test_workflow_runner.py | 125 +---
 4 files changed, 92 insertions(+), 72 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d6fa143b/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index a6f06c3..b337e84 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -135,8 +135,8 @@ def start(workflow_name,
 
 workflow_runner = \
 WorkflowRunner(
-inputs, model_storage, resource_storage, plugin_manager,
-service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, inputs=inputs, 
executor=executor,
 task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
 )
 logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
@@ -158,7 +158,6 @@ def start(workflow_name,
 @aria.pass_plugin_manager
 @aria.pass_logger
 def resume(execution_id,
-   inputs,
dry,
task_max_attempts,
task_retry_interval,
@@ -171,7 +170,7 @@ def resume(execution_id,
 
 workflow_runner = \
 WorkflowRunner(
-inputs, model_storage, resource_storage, plugin_manager,
+model_storage, resource_storage, plugin_manager,
 execution_id=execution_id, executor=executor,
 task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
 )

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/d6fa143b/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 99b6edf..829b8cd 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -37,8 +37,8 @@ DEFAULT_TASK_RETRY_INTERVAL = 30
 
 class WorkflowRunner(object):
 
-def __init__(self, inputs, model_storage, resource_storage, plugin_manager,
- execution_id=None, service_id=None, workflow_name=None, 
executor=None,
+def __init__(self, model_storage, resource_storage, plugin_manager,
+ execution_id=None, service_id=None, workflow_name=None, 
inputs=None, executor=None,
  task_max_attempts=DEFAULT_TASK_MAX_ATTEMPTS,
  task_retry_interval=DEFAULT_TASK_RETRY_INTERVAL):
 """
@@ -55,23 +55,29 @@ class WorkflowRunner(object):
 :param task_retry_interval: Retry interval in between retry attempts 
of a failing task
 """
 
+self._is_resume = execution_id is not None
+self._is_start = \
+workflow_name is not None and service_id is not None and 
execution_id is None
+
 self._model_storage = model_storage
 self._resource_storage = resource_storage
 
 # the IDs are stored rather than the models themselves, so this module 
could be used
 # by several threads without raising errors on model objects shared 
between threads
 
-if workflow_name is not None and service_id is not None and 
execution_id is None:
+if self._is_start:
 self._service_id = service_id
 self._workflow_name = workflow_name
 self._validate_workflow_exists_for_service()
 self._execution_id = self._create_execution_model(inputs).id
-elif execution_id is not None:
+elif self._is_resume:
 self._execution_id = execution_id
 self._service_id = self.execution.service.id
 self._workflow_name = 
model_storage.execution.get(self._execution_id).workflow_name
 

incubator-ariatosca git commit: review 1 fix

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 2fc9896cf -> 3de374534


review 1 fix


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3de37453
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3de37453
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3de37453

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: 3de37453468ef39f4cf3ea8af8e540f2c31ee58b
Parents: 2fc9896
Author: max-orlov 
Authored: Wed Jun 21 17:56:27 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 17:56:27 2017 +0300

--
 aria/cli/commands/executions.py|   7 +-
 aria/orchestrator/workflow_runner.py   |  24 ++---
 aria/orchestrator/workflows/core/engine.py |   8 +-
 tests/orchestrator/test_workflow_runner.py | 122 +---
 4 files changed, 90 insertions(+), 71 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3de37453/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index a6f06c3..b337e84 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -135,8 +135,8 @@ def start(workflow_name,
 
 workflow_runner = \
 WorkflowRunner(
-inputs, model_storage, resource_storage, plugin_manager,
-service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, inputs=inputs, 
executor=executor,
 task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
 )
 logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
@@ -158,7 +158,6 @@ def start(workflow_name,
 @aria.pass_plugin_manager
 @aria.pass_logger
 def resume(execution_id,
-   inputs,
dry,
task_max_attempts,
task_retry_interval,
@@ -171,7 +170,7 @@ def resume(execution_id,
 
 workflow_runner = \
 WorkflowRunner(
-inputs, model_storage, resource_storage, plugin_manager,
+model_storage, resource_storage, plugin_manager,
 execution_id=execution_id, executor=executor,
 task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
 )

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3de37453/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 99b6edf..829b8cd 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -37,8 +37,8 @@ DEFAULT_TASK_RETRY_INTERVAL = 30
 
 class WorkflowRunner(object):
 
-def __init__(self, inputs, model_storage, resource_storage, plugin_manager,
- execution_id=None, service_id=None, workflow_name=None, 
executor=None,
+def __init__(self, model_storage, resource_storage, plugin_manager,
+ execution_id=None, service_id=None, workflow_name=None, 
inputs=None, executor=None,
  task_max_attempts=DEFAULT_TASK_MAX_ATTEMPTS,
  task_retry_interval=DEFAULT_TASK_RETRY_INTERVAL):
 """
@@ -55,23 +55,29 @@ class WorkflowRunner(object):
 :param task_retry_interval: Retry interval in between retry attempts 
of a failing task
 """
 
+self._is_resume = execution_id is not None
+self._is_start = \
+workflow_name is not None and service_id is not None and 
execution_id is None
+
 self._model_storage = model_storage
 self._resource_storage = resource_storage
 
 # the IDs are stored rather than the models themselves, so this module 
could be used
 # by several threads without raising errors on model objects shared 
between threads
 
-if workflow_name is not None and service_id is not None and 
execution_id is None:
+if self._is_start:
 self._service_id = service_id
 self._workflow_name = workflow_name
 self._validate_workflow_exists_for_service()
 self._execution_id = self._create_execution_model(inputs).id
-elif execution_id is not None:
+elif self._is_resume:
 self._execution_id = execution_id
 self._service_id = self.execution.service.id
 self._workflow_name = 
model_storage.execution.get(self._execution_id).workflow_name
 else:
-

[3/3] incubator-ariatosca git commit: ARIA-282 Make SSH capability opt-in

2017-06-21 Thread ran
ARIA-282 Make SSH capability opt-in

Since the Fabric library uses Paramiko, which is a library
using a license which is incompatible with Apache's,
ARIA's SSH capabilities are now opt-in and no longer part
of the default installation.

Instead, users who would like to use SSH operations
should install ARIA's extra "[ssh]", which would install
Fabric and allow to take advantage of the execution-plugin's
SSH capabilities.

Users who won't install this extra will still be able to use
ARIA as well as the execution plugin, only without SSH.

Additional changes:

 - A new tox environment has been created for running
   SSH tests. The remaining envs only install plain ARIA.

 - requirements.in commented lines were removed -
   the bug that used to exist regarding environment markers
   has been fixed, and there's no longer the need
   to copy these manually to requirements.txt.

 - Environment-marked dependencies are now installed
   via "install_requires" rather than "extra_requires".

 - Added requirements.in to the manifest file,
   as well as fixed a bug in setup.py, which caused
   source distribution to make aria get installed
   without any dependencies before this fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/105971f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/105971f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/105971f8

Branch: refs/heads/ARIA-282-make-ssh-capability-opt-in
Commit: 105971f8ebc81de5ce5a98ce11a1d8580e671c21
Parents: 1fee85c
Author: Ran Ziv 
Authored: Wed Jun 21 15:39:34 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 17:37:57 2017 +0300

--
 .travis.yml |  2 ++
 MANIFEST.in |  1 +
 Makefile|  5 +--
 .../orchestrator/execution_plugin/operations.py | 13 ++--
 requirements.in | 16 ++
 requirements.txt| 32 ---
 setup.py| 33 +---
 tox.ini | 18 ---
 8 files changed, 53 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index b11ed62..de02d78 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,8 @@ env:
 - TOX_ENV=py26
 - TOX_ENV=py27e2e
 - TOX_ENV=py26e2e
+- TOX_ENV=py27ssh
+- TOX_ENV=py26ssh
 install:
   - pip install --upgrade pip
   - pip install --upgrade setuptools

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 877a7dd..020b00e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,7 @@ include NOTICE
 include VERSION
 include CHANGELOG.rst
 include README.rst
+include requirements.in
 include requirements.txt
 recursive-include docs/html *
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/Makefile
--
diff --git a/Makefile b/Makefile
index cb4b58f..f5f2e66 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,10 @@ clean:
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install .
+   pip install .[ssh]
 
 install-virtual:
-   pip install --editable .
+   pip install --editable .[ssh]

# "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \
@@ -55,6 +55,7 @@ test:
tox -e pylint_tests
tox -e py$(PYTHON_VERSION)
tox -e py$(PYTHON_VERSION)e2e
+   tox -e py$(PYTHON_VERSION)ssh
 
 dist: docs
python ./setup.py sdist bdist_wheel

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/aria/orchestrator/execution_plugin/operations.py
--
diff --git a/aria/orchestrator/execution_plugin/operations.py 
b/aria/orchestrator/execution_plugin/operations.py
index 5effa8a..0bc8083 100644
--- a/aria/orchestrator/execution_plugin/operations.py
+++ b/aria/orchestrator/execution_plugin/operations.py
@@ -15,7 +15,6 @@
 
 from aria.orchestrator import operation
 from . import local as local_operations
-from .ssh import operations as ssh_operations
 
 
 @operation
@@ -38,7 +37,7 @@ def run_script_with_ssh(ctx,

[1/3] incubator-ariatosca git commit: ARIA-278 remove core tasks [Forced Update!]

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-282-make-ssh-capability-opt-in 65a8e787e -> 105971f8e (forced 
update)


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1fee85c4/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
--
diff --git 
a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py 
b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
index 5dd2855..f5fb17a 100644
--- a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
+++ b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
@@ -13,12 +13,13 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from networkx import topological_sort, DiGraph
+from networkx import topological_sort
 
+from aria.modeling import models
 from aria.orchestrator import context
-from aria.orchestrator.workflows import api, core
+from aria.orchestrator.workflows import api
+from aria.orchestrator.workflows.core import compile
 from aria.orchestrator.workflows.executor import base
-
 from tests import mock
 from tests import storage
 
@@ -26,8 +27,8 @@ from tests import storage
 def test_task_graph_into_execution_graph(tmpdir):
 interface_name = 'Standard'
 operation_name = 'create'
-task_context = mock.context.simple(str(tmpdir))
-node = 
task_context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
+workflow_context = mock.context.simple(str(tmpdir))
+node = 
workflow_context.model.node.get_by_name(mock.models.DEPENDENCY_NODE_NAME)
 interface = mock.models.create_interface(
 node.service,
 interface_name,
@@ -35,12 +36,12 @@ def test_task_graph_into_execution_graph(tmpdir):
 operation_kwargs=dict(function='test')
 )
 node.interfaces[interface.name] = interface
-task_context.model.node.update(node)
+workflow_context.model.node.update(node)
 
 def sub_workflow(name, **_):
 return api.task_graph.TaskGraph(name)
 
-with context.workflow.current.push(task_context):
+with context.workflow.current.push(workflow_context):
 test_task_graph = api.task.WorkflowTask(sub_workflow, 
name='test_task_graph')
 simple_before_task = api.task.OperationTask(
 node,
@@ -64,12 +65,9 @@ def test_task_graph_into_execution_graph(tmpdir):
 test_task_graph.add_dependency(inner_task_graph, simple_before_task)
 test_task_graph.add_dependency(simple_after_task, inner_task_graph)
 
-# Direct check
-execution_graph = DiGraph()
-core.translation.build_execution_graph(task_graph=test_task_graph,
-   execution_graph=execution_graph,
-   
default_executor=base.StubTaskExecutor())
-execution_tasks = topological_sort(execution_graph)
+compile.create_execution_tasks(workflow_context, test_task_graph, 
base.StubTaskExecutor)
+
+execution_tasks = topological_sort(workflow_context._graph)
 
 assert len(execution_tasks) == 7
 
@@ -83,30 +81,23 @@ def test_task_graph_into_execution_graph(tmpdir):
 '{0}-End'.format(test_task_graph.id)
 ]
 
-assert expected_tasks_names == execution_tasks
-
-assert isinstance(_get_task_by_name(execution_tasks[0], execution_graph),
-  core.task.StartWorkflowTask)
-
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[1], 
execution_graph),
-  simple_before_task)
-assert isinstance(_get_task_by_name(execution_tasks[2], execution_graph),
-  core.task.StartSubWorkflowTask)
+assert expected_tasks_names == [t._api_id for t in execution_tasks]
+assert all(isinstance(task, models.Task) for task in execution_tasks)
+execution_tasks = iter(execution_tasks)
 
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[3], 
execution_graph),
-  inner_task)
-assert isinstance(_get_task_by_name(execution_tasks[4], execution_graph),
-  core.task.EndSubWorkflowTask)
+assert next(execution_tasks)._stub_type == models.Task.START_WORKFLOW
+_assert_execution_is_api_task(next(execution_tasks), simple_before_task)
+assert next(execution_tasks)._stub_type == models.Task.START_SUBWROFKLOW
+_assert_execution_is_api_task(next(execution_tasks), inner_task)
+assert next(execution_tasks)._stub_type == models.Task.END_SUBWORKFLOW
+_assert_execution_is_api_task(next(execution_tasks), simple_after_task)
+assert next(execution_tasks)._stub_type == models.Task.END_WORKFLOW
 
-_assert_execution_is_api_task(_get_task_by_name(execution_tasks[5], 
execution_graph),
-  simple_after_task)
-assert isinstance(_get_task_by_name(execution_tasks[6], 

[2/3] incubator-ariatosca git commit: ARIA-278 remove core tasks

2017-06-21 Thread ran
ARIA-278 remove core tasks


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/1fee85c4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/1fee85c4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/1fee85c4

Branch: refs/heads/ARIA-282-make-ssh-capability-opt-in
Commit: 1fee85c4193c635d8598affbf769d306917760d8
Parents: 9907520
Author: max-orlov 
Authored: Sun Jun 11 19:05:35 2017 +0300
Committer: max-orlov 
Committed: Tue Jun 20 19:14:41 2017 +0300

--
 aria/modeling/orchestration.py  | 143 +++---
 aria/orchestrator/context/operation.py  |   7 +
 aria/orchestrator/context/workflow.py   |  21 ++
 aria/orchestrator/workflow_runner.py|  22 +-
 aria/orchestrator/workflows/api/task.py |   7 +
 aria/orchestrator/workflows/core/__init__.py|   2 +-
 aria/orchestrator/workflows/core/compile.py | 116 
 aria/orchestrator/workflows/core/engine.py  | 121 +
 .../workflows/core/events_handler.py| 137 +-
 aria/orchestrator/workflows/core/task.py| 271 ---
 aria/orchestrator/workflows/core/translation.py | 109 
 aria/orchestrator/workflows/events_logging.py   |  25 +-
 aria/orchestrator/workflows/executor/base.py|  31 ++-
 aria/orchestrator/workflows/executor/dry.py |  57 ++--
 aria/orchestrator/workflows/executor/process.py |  18 +-
 aria/orchestrator/workflows/executor/thread.py  |  18 +-
 tests/__init__.py   |   2 +
 tests/orchestrator/context/__init__.py  |   9 +-
 tests/orchestrator/context/test_operation.py|  26 +-
 tests/orchestrator/context/test_serialize.py|  10 +-
 .../orchestrator/execution_plugin/test_local.py |  10 +-
 tests/orchestrator/execution_plugin/test_ssh.py |  11 +-
 tests/orchestrator/test_workflow_runner.py  |  43 ++-
 .../orchestrator/workflows/core/test_engine.py  |  23 +-
 .../orchestrator/workflows/core/test_events.py  |  20 +-
 tests/orchestrator/workflows/core/test_task.py  |  31 +--
 .../test_task_graph_into_execution_graph.py |  55 ++--
 .../orchestrator/workflows/executor/__init__.py |  89 +++---
 .../workflows/executor/test_executor.py |  26 +-
 .../workflows/executor/test_process_executor.py |  26 +-
 .../executor/test_process_executor_extension.py |   7 +-
 .../test_process_executor_tracked_changes.py|   7 +-
 32 files changed, 677 insertions(+), 823 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/1fee85c4/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 995c8c2..17d2476 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -21,7 +21,6 @@ classes:
 """
 
 # pylint: disable=no-self-argument, no-member, abstract-method
-
 from datetime import datetime
 
 from sqlalchemy import (
@@ -34,19 +33,19 @@ from sqlalchemy import (
 String,
 Float,
 orm,
-)
+PickleType)
 from sqlalchemy.ext.associationproxy import association_proxy
 from sqlalchemy.ext.declarative import declared_attr
 
 from ..orchestrator.exceptions import (TaskAbortException, TaskRetryException)
-from .mixins import ModelMixin, ParameterMixin
+from . import mixins
 from . import (
 relationship,
 types as modeling_types
 )
 
 
-class ExecutionBase(ModelMixin):
+class ExecutionBase(mixins.ModelMixin):
 """
 Execution model representation.
 """
@@ -152,7 +151,7 @@ class ExecutionBase(ModelMixin):
 )
 
 
-class PluginBase(ModelMixin):
+class PluginBase(mixins.ModelMixin):
 """
 An installed plugin.
 
@@ -213,7 +212,7 @@ class PluginBase(ModelMixin):
 uploaded_at = Column(DateTime, nullable=False, index=True)
 
 
-class TaskBase(ModelMixin):
+class TaskBase(mixins.ModelMixin):
 """
 Represents the smallest unit of stateful execution in ARIA. The task state 
includes inputs,
 outputs, as well as an atomic status, ensuring that the task can only be 
running once at any
@@ -257,10 +256,24 @@ class TaskBase(ModelMixin):
 
 __tablename__ = 'task'
 
-__private_fields__ = ['node_fk',
-  'relationship_fk',
-  'plugin_fk',
-  'execution_fk']
+__private_fields__ = ['dependency_operation_task_fk', 
'dependency_stub_task_fk', 'node_fk',
+  'relationship_fk', 'plugin_fk', 'execution_fk']
+
+START_WORKFLOW = 'start_workflow'
+END_WORKFLOW = 'end_workflow'
+START_SUBWROFKLOW = 'start_subworkflow'
+END_SUBWORKFLOW = 'end_subworkflow'
+STUB = 

incubator-ariatosca git commit: ARIA-282 Make SSH capability opt-in

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/master 1fee85c41 -> 105971f8e


ARIA-282 Make SSH capability opt-in

Since the Fabric library uses Paramiko, which is a library
using a license which is incompatible with Apache's,
ARIA's SSH capabilities are now opt-in and no longer part
of the default installation.

Instead, users who would like to use SSH operations
should install ARIA's extra "[ssh]", which would install
Fabric and allow to take advantage of the execution-plugin's
SSH capabilities.

Users who won't install this extra will still be able to use
ARIA as well as the execution plugin, only without SSH.

Additional changes:

 - A new tox environment has been created for running
   SSH tests. The remaining envs only install plain ARIA.

 - requirements.in commented lines were removed -
   the bug that used to exist regarding environment markers
   has been fixed, and there's no longer the need
   to copy these manually to requirements.txt.

 - Environment-marked dependencies are now installed
   via "install_requires" rather than "extra_requires".

 - Added requirements.in to the manifest file,
   as well as fixed a bug in setup.py, which caused
   source distribution to make aria get installed
   without any dependencies before this fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/105971f8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/105971f8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/105971f8

Branch: refs/heads/master
Commit: 105971f8ebc81de5ce5a98ce11a1d8580e671c21
Parents: 1fee85c
Author: Ran Ziv 
Authored: Wed Jun 21 15:39:34 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 17:37:57 2017 +0300

--
 .travis.yml |  2 ++
 MANIFEST.in |  1 +
 Makefile|  5 +--
 .../orchestrator/execution_plugin/operations.py | 13 ++--
 requirements.in | 16 ++
 requirements.txt| 32 ---
 setup.py| 33 +---
 tox.ini | 18 ---
 8 files changed, 53 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index b11ed62..de02d78 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,8 @@ env:
 - TOX_ENV=py26
 - TOX_ENV=py27e2e
 - TOX_ENV=py26e2e
+- TOX_ENV=py27ssh
+- TOX_ENV=py26ssh
 install:
   - pip install --upgrade pip
   - pip install --upgrade setuptools

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 877a7dd..020b00e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,7 @@ include NOTICE
 include VERSION
 include CHANGELOG.rst
 include README.rst
+include requirements.in
 include requirements.txt
 recursive-include docs/html *
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/Makefile
--
diff --git a/Makefile b/Makefile
index cb4b58f..f5f2e66 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,10 @@ clean:
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install .
+   pip install .[ssh]
 
 install-virtual:
-   pip install --editable .
+   pip install --editable .[ssh]

# "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \
@@ -55,6 +55,7 @@ test:
tox -e pylint_tests
tox -e py$(PYTHON_VERSION)
tox -e py$(PYTHON_VERSION)e2e
+   tox -e py$(PYTHON_VERSION)ssh
 
 dist: docs
python ./setup.py sdist bdist_wheel

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/105971f8/aria/orchestrator/execution_plugin/operations.py
--
diff --git a/aria/orchestrator/execution_plugin/operations.py 
b/aria/orchestrator/execution_plugin/operations.py
index 5effa8a..0bc8083 100644
--- a/aria/orchestrator/execution_plugin/operations.py
+++ b/aria/orchestrator/execution_plugin/operations.py
@@ -15,7 +15,6 @@
 
 from aria.orchestrator import operation
 from . import local as local_operations
-from .ssh import operations as 

incubator-ariatosca git commit: ARIA-282 Make SSH capability opt-in [Forced Update!]

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-282-make-ssh-capability-opt-in f783b5323 -> 65a8e787e (forced 
update)


ARIA-282 Make SSH capability opt-in

Since the Fabric library uses Paramiko, which is a library
using a license which is incompatible with Apache's,
ARIA's SSH capabilities are now opt-in and no longer part
of the default installation.

Instead, users who would like to use SSH operations
should install ARIA's extra "[ssh]", which would install
Fabric and allow to take advantage of the execution-plugin's
SSH capabilities.

Users who won't install this extra will still be able to use
ARIA as well as the execution plugin, only without SSH.

Additional changes:

 - A new tox environment has been created for running
   SSH tests. The remaining envs only install plain ARIA.

 - requirements.in commented lines were removed -
   the bug that used to exist regarding environment markers
   has been fixed, and there's no longer the need
   to copy these manually to requirements.txt.

 - Environment-marked dependencies are now installed
   via "install_requires" rather than "extra_requires".

 - Added requirements.in to the manifest file,
   as well as fixed a bug in setup.py, which caused
   source distribution to make aria get installed
   without any dependencies before this fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/65a8e787
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/65a8e787
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/65a8e787

Branch: refs/heads/ARIA-282-make-ssh-capability-opt-in
Commit: 65a8e787eb66141caed8acc15c7913765459cc25
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 15:39:34 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 17:16:13 2017 +0300

--
 .travis.yml |  2 ++
 MANIFEST.in |  1 +
 Makefile|  5 +--
 .../orchestrator/execution_plugin/operations.py | 13 ++--
 requirements.in | 16 ++
 requirements.txt| 32 ---
 setup.py| 33 +---
 tox.ini | 18 ---
 8 files changed, 53 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/65a8e787/.travis.yml
--
diff --git a/.travis.yml b/.travis.yml
index b11ed62..de02d78 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,8 @@ env:
 - TOX_ENV=py26
 - TOX_ENV=py27e2e
 - TOX_ENV=py26e2e
+- TOX_ENV=py27ssh
+- TOX_ENV=py26ssh
 install:
   - pip install --upgrade pip
   - pip install --upgrade setuptools

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/65a8e787/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 877a7dd..020b00e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,7 @@ include NOTICE
 include VERSION
 include CHANGELOG.rst
 include README.rst
+include requirements.in
 include requirements.txt
 recursive-include docs/html *
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/65a8e787/Makefile
--
diff --git a/Makefile b/Makefile
index cb4b58f..f5f2e66 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,10 @@ clean:
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install .
+   pip install .[ssh]
 
 install-virtual:
-   pip install --editable .
+   pip install --editable .[ssh]

# "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \
@@ -55,6 +55,7 @@ test:
tox -e pylint_tests
tox -e py$(PYTHON_VERSION)
tox -e py$(PYTHON_VERSION)e2e
+   tox -e py$(PYTHON_VERSION)ssh
 
 dist: docs
python ./setup.py sdist bdist_wheel

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/65a8e787/aria/orchestrator/execution_plugin/operations.py
--
diff --git a/aria/orchestrator/execution_plugin/operations.py 
b/aria/orchestrator/execution_plugin/operations.py
index 5effa8a..0bc8083 100644
--- a/aria/orchestrator/execution_plugin/operations.py
+++ b/aria/orchestrator/execution_plugin/operations.py
@@ -15,7 +15,6 @@
 
 from aria.orchestrator import operation
 from . 

incubator-ariatosca git commit: ARIA-282 Make SSH capability opt-in

2017-06-21 Thread ran
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-282-make-ssh-capability-opt-in [created] f783b5323


ARIA-282 Make SSH capability opt-in

Since the Fabric library uses Paramiko, which is a library
using a license which is incompatible with Apache's,
ARIA's SSH capabilities are now opt-in and no longer part
of the default installation.

Instead, users who would like to use SSH operations
should install ARIA's extra "[ssh]", which would install
Fabric and allow to take advantage of the execution-plugin's
SSH capabilities.

Users who won't install this extra will still be able to use
ARIA as well as the execution plugin, only without SSH.

Additional changes:

 - A new tox environment has been created for running
   SSH tests. The remaining envs only install plain ARIA.

 - requirements.in commented lines were removed -
   the bug that used to exist regarding environment markers
   has been fixed, and there's no longer the need
   to copy these manually to requirements.txt.

 - Environment-marked dependencies are now installed
   via "install_requires" rather than "extra_requires".

 - Added requirements.in to the manifest file,
   as well as fixed a bug in setup.py, which caused
   source distribution to make aria get installed
   without any dependencies before this fix.


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/f783b532
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/f783b532
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/f783b532

Branch: refs/heads/ARIA-282-make-ssh-capability-opt-in
Commit: f783b5323e38e9e2df63fe5bfa8af31b856f7c28
Parents: 9907520
Author: Ran Ziv 
Authored: Wed Jun 21 15:39:34 2017 +0300
Committer: Ran Ziv 
Committed: Wed Jun 21 15:39:34 2017 +0300

--
 MANIFEST.in |  1 +
 Makefile|  4 +--
 .../orchestrator/execution_plugin/operations.py | 13 ++--
 requirements.in | 16 ++
 requirements.txt| 32 ---
 setup.py| 33 +---
 tox.ini | 13 +---
 7 files changed, 45 insertions(+), 67 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f783b532/MANIFEST.in
--
diff --git a/MANIFEST.in b/MANIFEST.in
index 877a7dd..020b00e 100644
--- a/MANIFEST.in
+++ b/MANIFEST.in
@@ -4,6 +4,7 @@ include NOTICE
 include VERSION
 include CHANGELOG.rst
 include README.rst
+include requirements.in
 include requirements.txt
 recursive-include docs/html *
 recursive-include examples *

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f783b532/Makefile
--
diff --git a/Makefile b/Makefile
index cb4b58f..22d6e86 100644
--- a/Makefile
+++ b/Makefile
@@ -33,10 +33,10 @@ clean:
-find . -type d -name '*.egg-info' -exec rm -rf {} \; 2>/dev/null
 
 install:
-   pip install .
+   pip install .[ssh]
 
 install-virtual:
-   pip install --editable .
+   pip install --editable .[ssh]

# "pip install --editable" will not add our extensions to the path, so 
we will patch the virtualenv
EXTENSIONS_PATH="$$(head -n 1 "$(EASY_INSTALL_PTH)")/extensions" && \

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/f783b532/aria/orchestrator/execution_plugin/operations.py
--
diff --git a/aria/orchestrator/execution_plugin/operations.py 
b/aria/orchestrator/execution_plugin/operations.py
index 5effa8a..0bc8083 100644
--- a/aria/orchestrator/execution_plugin/operations.py
+++ b/aria/orchestrator/execution_plugin/operations.py
@@ -15,7 +15,6 @@
 
 from aria.orchestrator import operation
 from . import local as local_operations
-from .ssh import operations as ssh_operations
 
 
 @operation
@@ -38,7 +37,7 @@ def run_script_with_ssh(ctx,
 use_sudo=False,
 hide_output=None,
 **kwargs):
-return ssh_operations.run_script(
+return _try_import_ssh().run_script(
 ctx=ctx,
 script_path=script_path,
 fabric_env=fabric_env,
@@ -55,9 +54,17 @@ def run_commands_with_ssh(ctx,
   use_sudo=False,
   hide_output=None,
   **_):
-return ssh_operations.run_commands(
+return _try_import_ssh().run_commands(
 ctx=ctx,
 commands=commands,
 

incubator-ariatosca git commit: fix retying mechanism

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution a66b74bf0 -> 
92773e206


fix retying mechanism


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/92773e20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/92773e20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/92773e20

Branch: refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution
Commit: 92773e206c82a961ac127c71731de2cdcf6f7f2a
Parents: a66b74b
Author: max-orlov 
Authored: Wed Jun 21 15:25:44 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 15:25:44 2017 +0300

--
 aria/orchestrator/workflows/core/engine.py | 12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/92773e20/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 8999232..8f16203 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -53,8 +53,8 @@ class Engine(logger.LoggerMixin):
 if cancel:
 break
 for task in task_tracker.ended_tasks:
-task_tracker.finished_(task)
 self._handle_ended_tasks(task)
+task_tracker.finished_(task)
 for task in task_tracker.executable_tasks:
 task_tracker.executing_(task)
 self._handle_executable_task(ctx, task)
@@ -110,7 +110,7 @@ class Engine(logger.LoggerMixin):
 raise exceptions.ExecutorException('Workflow failed')
 
 
-class _TasksTracker():
+class _TasksTracker(object):
 def __init__(self, ctx):
 self._ctx = ctx
 self._tasks = ctx.execution.tasks
@@ -123,8 +123,10 @@ class _TasksTracker():
 return len(self._executed_tasks) == len(self._tasks) and 
len(self._executing_tasks) == 0
 
 def executing_(self, task):
-self._executable_tasks.remove(task)
-self._executing_tasks.append(task)
+# Task executing could be retrying (thus removed and added earlier)
+if task not in self._executing_tasks:
+self._executable_tasks.remove(task)
+self._executing_tasks.append(task)
 
 def finished_(self, task):
 self._executing_tasks.remove(task)
@@ -139,7 +141,7 @@ class _TasksTracker():
 @property
 def executable_tasks(self):
 now = datetime.utcnow()
-for task in self._update_tasks(self._executable_tasks):
+for task in self._update_tasks(self._executing_tasks + 
self._executable_tasks):
 if all([task.is_waiting(),
 task.due_at <= now,
 all(dependency in self._executed_tasks for dependency in 
task.dependencies)



incubator-ariatosca git commit: removed _graph from workflow context entirely

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution 5cb4f86a6 -> 
a66b74bf0


removed _graph from workflow context entirely


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/a66b74bf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/a66b74bf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/a66b74bf

Branch: refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution
Commit: a66b74bf06bb3245c69a15a1f601508f697c60ca
Parents: 5cb4f86
Author: max-orlov 
Authored: Wed Jun 21 15:00:40 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 15:00:40 2017 +0300

--
 aria/orchestrator/context/workflow.py  | 12 
 .../core/test_task_graph_into_execution_graph.py   | 13 +++--
 2 files changed, 11 insertions(+), 14 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a66b74bf/aria/orchestrator/context/workflow.py
--
diff --git a/aria/orchestrator/context/workflow.py 
b/aria/orchestrator/context/workflow.py
index aa5a786..2da3d4c 100644
--- a/aria/orchestrator/context/workflow.py
+++ b/aria/orchestrator/context/workflow.py
@@ -96,18 +96,6 @@ class WorkflowContext(BaseContext):
 )
 
 @property
-def _graph(self):
-if self._execution_graph is None:
-graph = DiGraph()
-for task in self.execution.tasks:
-for dependency in task.dependencies:
-graph.add_edge(dependency, task)
-
-self._execution_graph = graph
-
-return self._execution_graph
-
-@property
 @contextmanager
 def persist_changes(self):
 yield

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/a66b74bf/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
--
diff --git 
a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py 
b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
index ef20374..3d47d54 100644
--- a/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
+++ b/tests/orchestrator/workflows/core/test_task_graph_into_execution_graph.py
@@ -13,7 +13,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-from networkx import topological_sort
+from networkx import topological_sort, DiGraph
 
 from aria.modeling import models
 from aria.orchestrator import context
@@ -68,7 +68,7 @@ def test_task_graph_into_execution_graph(tmpdir):
 graph_compiler = compile.GraphCompiler(workflow_context, 
base.StubTaskExecutor)
 graph_compiler.compile(test_task_graph)
 
-execution_tasks = topological_sort(workflow_context._graph)
+execution_tasks = 
topological_sort(_graph(workflow_context.execution.tasks))
 
 assert len(execution_tasks) == 7
 
@@ -106,3 +106,12 @@ def _assert_execution_is_api_task(execution_task, 
api_task):
 
 def _get_task_by_name(task_name, graph):
 return graph.node[task_name]['task']
+
+
+def _graph(tasks):
+graph = DiGraph()
+for task in tasks:
+for dependency in task.dependencies:
+graph.add_edge(dependency, task)
+
+return graph



incubator-ariatosca git commit: removed the usage of execution graph from the code (currently still remain in test

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution c211e1064 -> 
5cb4f86a6


removed the usage of execution graph from the code (currently still remain in 
test


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/5cb4f86a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/5cb4f86a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/5cb4f86a

Branch: refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution
Commit: 5cb4f86a6385a1085bc791bc6ce8f5dae4f36bb8
Parents: c211e10
Author: max-orlov 
Authored: Wed Jun 21 14:56:42 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 14:56:42 2017 +0300

--
 aria/orchestrator/workflows/core/engine.py | 106 +++-
 1 file changed, 66 insertions(+), 40 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/5cb4f86a/aria/orchestrator/workflows/core/engine.py
--
diff --git a/aria/orchestrator/workflows/core/engine.py 
b/aria/orchestrator/workflows/core/engine.py
index 9f0ddd7..8999232 100644
--- a/aria/orchestrator/workflows/core/engine.py
+++ b/aria/orchestrator/workflows/core/engine.py
@@ -45,18 +45,20 @@ class Engine(logger.LoggerMixin):
 """
 execute the workflow
 """
-executing_tasks = []
+task_tracker = _TasksTracker(ctx)
 try:
 events.start_workflow_signal.send(ctx)
 while True:
 cancel = self._is_cancel(ctx)
 if cancel:
 break
-for task in self._ended_tasks(ctx, executing_tasks):
-self._handle_ended_tasks(ctx, task, executing_tasks)
-for task in self._executable_tasks(ctx):
-self._handle_executable_task(ctx, task, executing_tasks)
-if self._all_tasks_consumed(ctx):
+for task in task_tracker.ended_tasks:
+task_tracker.finished_(task)
+self._handle_ended_tasks(task)
+for task in task_tracker.executable_tasks:
+task_tracker.executing_(task)
+self._handle_executable_task(ctx, task)
+if task_tracker.all_tasks_consumed:
 break
 else:
 time.sleep(0.1)
@@ -82,34 +84,7 @@ class Engine(logger.LoggerMixin):
 execution = ctx.model.execution.refresh(ctx.execution)
 return execution.status in (models.Execution.CANCELLING, 
models.Execution.CANCELLED)
 
-def _executable_tasks(self, ctx):
-now = datetime.utcnow()
-return (
-task for task in self._tasks_iter(ctx)
-if task.is_waiting() and task.due_at <= now and \
-not self._task_has_dependencies(ctx, task)
-)
-
-@staticmethod
-def _ended_tasks(ctx, executing_tasks):
-for task in executing_tasks:
-if task.has_ended() and task in ctx._graph:
-yield task
-
-@staticmethod
-def _task_has_dependencies(ctx, task):
-return len(ctx._graph.pred.get(task, [])) > 0
-
-@staticmethod
-def _all_tasks_consumed(ctx):
-return len(ctx._graph.node) == 0
-
-@staticmethod
-def _tasks_iter(ctx):
-for task in ctx.execution.tasks:
-yield ctx.model.task.refresh(task)
-
-def _handle_executable_task(self, ctx, task, executing_tasks):
+def _handle_executable_task(self, ctx, task):
 task_executor = self._executors[task._executor]
 
 # If the task is a stub, a default context is provided, else it should 
hold the context cls
@@ -125,16 +100,67 @@ class Engine(logger.LoggerMixin):
 name=task.name
 )
 
-executing_tasks.append(task)
-
 if not task._stub_type:
 events.sent_task_signal.send(op_ctx)
 task_executor.execute(op_ctx)
 
 @staticmethod
-def _handle_ended_tasks(ctx, task, executing_tasks):
-executing_tasks.remove(task)
+def _handle_ended_tasks(task):
 if task.status == models.Task.FAILED and not task.ignore_failure:
 raise exceptions.ExecutorException('Workflow failed')
-else:
-ctx._graph.remove_node(task)
+
+
+class _TasksTracker():
+def __init__(self, ctx):
+self._ctx = ctx
+self._tasks = ctx.execution.tasks
+self._executable_tasks = list(self._tasks)
+self._executing_tasks = []
+self._executed_tasks = []
+
+@property
+def all_tasks_consumed(self):
+return len(self._executed_tasks) == len(self._tasks) and 

incubator-ariatosca git commit: wip [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution 814306ba0 -> 
c211e1064 (forced update)


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/c211e106
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/c211e106
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/c211e106

Branch: refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution
Commit: c211e1064fc84236ef753783fb4367d335ab197a
Parents: 1fee85c
Author: max-orlov 
Authored: Wed Jun 21 12:41:33 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 14:00:41 2017 +0300

--
 aria/modeling/orchestration.py  |   2 -
 aria/orchestrator/workflow_runner.py|   3 +-
 aria/orchestrator/workflows/core/compile.py | 198 ++-
 tests/orchestrator/context/__init__.py  |   2 +-
 tests/orchestrator/context/test_serialize.py|   2 +-
 .../orchestrator/execution_plugin/test_local.py |   2 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   3 +-
 .../orchestrator/workflows/core/test_engine.py  |   2 +-
 .../orchestrator/workflows/core/test_events.py  |   7 +-
 .../test_task_graph_into_execution_graph.py |   6 +-
 .../executor/test_process_executor_extension.py |   2 +-
 .../test_process_executor_tracked_changes.py|   2 +-
 12 files changed, 116 insertions(+), 115 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c211e106/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 17d2476..541f4c4 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -305,7 +305,6 @@ class TaskBase(mixins.ModelMixin):
 ended_at = Column(DateTime, default=None)
 attempts_count = Column(Integer, default=1)
 
-_api_id = Column(String)
 _executor = Column(PickleType)
 _context_cls = Column(PickleType)
 _stub_type = Column(Enum(*STUB_TYPES))
@@ -441,7 +440,6 @@ class TaskBase(mixins.ModelMixin):
 'plugin': api_task.plugin,
 'function': api_task.function,
 'arguments': api_task.arguments,
-'_api_id': api_task.id,
 '_context_cls': api_task._context_cls,
 '_executor': executor,
 }

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c211e106/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 9e6b3ad..dcd8ce3 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -87,8 +87,7 @@ class WorkflowRunner(object):
 execution_inputs_dict = dict(inp.unwrapped for inp in 
self.execution.inputs.values())
 
 self._tasks_graph = workflow_fn(ctx=self._workflow_context, 
**execution_inputs_dict)
-compile.create_execution_tasks(
-self._workflow_context, self._tasks_graph, executor.__class__)
+compile.GraphCompiler(self._workflow_context, 
executor.__class__).compile(self._tasks_graph)
 
 self._engine = engine.Engine(executors={executor.__class__: executor})
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/c211e106/aria/orchestrator/workflows/core/compile.py
--
diff --git a/aria/orchestrator/workflows/core/compile.py 
b/aria/orchestrator/workflows/core/compile.py
index 932268a..83de22c 100644
--- a/aria/orchestrator/workflows/core/compile.py
+++ b/aria/orchestrator/workflows/core/compile.py
@@ -18,99 +18,105 @@ from modeling import models
 from .. import executor, api
 
 
-def create_execution_tasks(ctx, task_graph, default_executor):
-execution = ctx.execution
-_construct_execution_tasks(execution, task_graph, default_executor)
-ctx.model.execution.update(execution)
-return execution.tasks
-
-
-def _construct_execution_tasks(execution,
-   task_graph,
-   default_executor,
-   stub_executor=executor.base.StubTaskExecutor,
-   start_stub_type=models.Task.START_WORKFLOW,
-   end_stub_type=models.Task.END_WORKFLOW,
-   depends_on=()):
-"""
-Translates the user graph to the execution graph
-:param task_graph: The user's graph
-:param start_stub_type: internal use
-:param end_stub_type: internal use
-:param 

incubator-ariatosca git commit: wip

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution 1fee85c41 -> 
814306ba0


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/814306ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/814306ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/814306ba

Branch: refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution
Commit: 814306ba0be3f478f2a1d135e2e26dfd6586a620
Parents: 1fee85c
Author: max-orlov 
Authored: Wed Jun 21 12:41:33 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 12:41:33 2017 +0300

--
 aria/modeling/orchestration.py  |   2 -
 aria/orchestrator/workflow_runner.py|   3 +-
 aria/orchestrator/workflows/core/compile.py | 198 ++-
 tests/orchestrator/context/__init__.py  |   2 +-
 tests/orchestrator/context/test_serialize.py|   2 +-
 .../orchestrator/execution_plugin/test_local.py |   2 +-
 tests/orchestrator/execution_plugin/test_ssh.py |   3 +-
 .../orchestrator/workflows/core/test_engine.py  |   2 +-
 .../orchestrator/workflows/core/test_events.py  |   7 +-
 .../test_task_graph_into_execution_graph.py |   6 +-
 .../executor/test_process_executor_extension.py |   2 +-
 .../test_process_executor_tracked_changes.py|   2 +-
 12 files changed, 116 insertions(+), 115 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/814306ba/aria/modeling/orchestration.py
--
diff --git a/aria/modeling/orchestration.py b/aria/modeling/orchestration.py
index 17d2476..541f4c4 100644
--- a/aria/modeling/orchestration.py
+++ b/aria/modeling/orchestration.py
@@ -305,7 +305,6 @@ class TaskBase(mixins.ModelMixin):
 ended_at = Column(DateTime, default=None)
 attempts_count = Column(Integer, default=1)
 
-_api_id = Column(String)
 _executor = Column(PickleType)
 _context_cls = Column(PickleType)
 _stub_type = Column(Enum(*STUB_TYPES))
@@ -441,7 +440,6 @@ class TaskBase(mixins.ModelMixin):
 'plugin': api_task.plugin,
 'function': api_task.function,
 'arguments': api_task.arguments,
-'_api_id': api_task.id,
 '_context_cls': api_task._context_cls,
 '_executor': executor,
 }

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/814306ba/aria/orchestrator/workflow_runner.py
--
diff --git a/aria/orchestrator/workflow_runner.py 
b/aria/orchestrator/workflow_runner.py
index 9e6b3ad..dcd8ce3 100644
--- a/aria/orchestrator/workflow_runner.py
+++ b/aria/orchestrator/workflow_runner.py
@@ -87,8 +87,7 @@ class WorkflowRunner(object):
 execution_inputs_dict = dict(inp.unwrapped for inp in 
self.execution.inputs.values())
 
 self._tasks_graph = workflow_fn(ctx=self._workflow_context, 
**execution_inputs_dict)
-compile.create_execution_tasks(
-self._workflow_context, self._tasks_graph, executor.__class__)
+compile.GraphCompiler(self._workflow_context, 
executor.__class__).compile(self._tasks_graph)
 
 self._engine = engine.Engine(executors={executor.__class__: executor})
 

http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/814306ba/aria/orchestrator/workflows/core/compile.py
--
diff --git a/aria/orchestrator/workflows/core/compile.py 
b/aria/orchestrator/workflows/core/compile.py
index 932268a..50bd1c9 100644
--- a/aria/orchestrator/workflows/core/compile.py
+++ b/aria/orchestrator/workflows/core/compile.py
@@ -18,99 +18,105 @@ from modeling import models
 from .. import executor, api
 
 
-def create_execution_tasks(ctx, task_graph, default_executor):
-execution = ctx.execution
-_construct_execution_tasks(execution, task_graph, default_executor)
-ctx.model.execution.update(execution)
-return execution.tasks
-
-
-def _construct_execution_tasks(execution,
-   task_graph,
-   default_executor,
-   stub_executor=executor.base.StubTaskExecutor,
-   start_stub_type=models.Task.START_WORKFLOW,
-   end_stub_type=models.Task.END_WORKFLOW,
-   depends_on=()):
-"""
-Translates the user graph to the execution graph
-:param task_graph: The user's graph
-:param start_stub_type: internal use
-:param end_stub_type: internal use
-:param depends_on: internal 

incubator-ariatosca git commit: wip [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 58de7a5ef -> 2fc9896cf 
(forced update)


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/2fc9896c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/2fc9896c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/2fc9896c

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: 2fc9896cfdd7e6528e19b8bc418d4e4413e595ed
Parents: 1fee85c
Author: max-orlov 
Authored: Mon Jun 19 17:44:45 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 12:02:52 2017 +0300

--
 aria/cli/commands/executions.py |  58 ++-
 aria/cli/logger.py  |   4 +-
 aria/modeling/orchestration.py  |   3 +-
 aria/orchestrator/context/workflow.py   |   5 +
 aria/orchestrator/events.py |   1 +
 aria/orchestrator/exceptions.py |   7 +
 aria/orchestrator/workflow_runner.py|  40 +++--
 aria/orchestrator/workflows/core/engine.py  |   4 +
 .../workflows/core/events_handler.py|   7 +
 tests/mock/__init__.py  |   2 +-
 tests/mock/models.py|  14 +-
 tests/modeling/test_models.py   |   5 +-
 tests/orchestrator/test_workflow_runner.py  | 157 +--
 13 files changed, 263 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/2fc9896c/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index 6176ea2..a6f06c3 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -134,18 +134,64 @@ def start(workflow_name,
 executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
 
 workflow_runner = \
-WorkflowRunner(workflow_name, service.id, inputs,
-   model_storage, resource_storage, plugin_manager,
-   executor, task_max_attempts, task_retry_interval)
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
+
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
 
-execution_thread_name = '{0}_{1}'.format(service_name, workflow_name)
+@executions.command(name='resume',
+short_help='Resume a workflow')
+@aria.argument('execution-id')
+@aria.options.inputs(help=helptexts.EXECUTION_INPUTS)
+@aria.options.dry_execution
+@aria.options.task_max_attempts()
+@aria.options.task_retry_interval()
+@aria.options.mark_pattern()
+@aria.options.verbose()
+@aria.pass_model_storage
+@aria.pass_resource_storage
+@aria.pass_plugin_manager
+@aria.pass_logger
+def resume(execution_id,
+   inputs,
+   dry,
+   task_max_attempts,
+   task_retry_interval,
+   mark_pattern,
+   model_storage,
+   resource_storage,
+   plugin_manager,
+   logger):
+executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
+
+workflow_runner = \
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+execution_id=execution_id, executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+
+logger.info('Resuming {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+def _run_execution(workflow_runner, logger, model_storage, dry, mark_pattern):
+execution_thread_name = '{0}_{1}'.format(workflow_runner.service.name,
+ 
workflow_runner.execution.workflow_name)
 execution_thread = 
threading.ExceptionThread(target=workflow_runner.execute,
  name=execution_thread_name)
 
-logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
 execution_thread.start()
 
-log_iterator = cli_logger.ModelLogIterator(model_storage, 
workflow_runner.execution_id)
+last_task_id = workflow_runner.execution.logs[-1].id if 
workflow_runner.execution.logs else 0
+log_iterator = 

[incubator-ariatosca] Git Push Summary

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-284-Cleanup-and-optimize-the-task-execution [created] 
1fee85c41


incubator-ariatosca git commit: wip [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 82f188a02 -> 58de7a5ef 
(forced update)


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/58de7a5e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/58de7a5e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/58de7a5e

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: 58de7a5ef64b275eaed4ab33ec9ff6d311f5de8e
Parents: 1fee85c
Author: max-orlov 
Authored: Mon Jun 19 17:44:45 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 11:20:19 2017 +0300

--
 aria/cli/commands/executions.py |  58 ++-
 aria/cli/logger.py  |   4 +-
 aria/modeling/orchestration.py  |   3 +-
 aria/orchestrator/context/workflow.py   |   5 +
 aria/orchestrator/events.py |   1 +
 aria/orchestrator/exceptions.py |   7 +
 aria/orchestrator/workflow_runner.py|  40 +++--
 aria/orchestrator/workflows/core/engine.py  |   4 +
 .../workflows/core/events_handler.py|   7 +
 tests/mock/__init__.py  |   2 +-
 tests/mock/models.py|  14 +-
 tests/modeling/test_models.py   |   5 +-
 tests/orchestrator/test_workflow_runner.py  | 157 +--
 13 files changed, 263 insertions(+), 44 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/58de7a5e/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index 6176ea2..a6f06c3 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -134,18 +134,64 @@ def start(workflow_name,
 executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
 
 workflow_runner = \
-WorkflowRunner(workflow_name, service.id, inputs,
-   model_storage, resource_storage, plugin_manager,
-   executor, task_max_attempts, task_retry_interval)
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
+
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
 
-execution_thread_name = '{0}_{1}'.format(service_name, workflow_name)
+@executions.command(name='resume',
+short_help='Resume a workflow')
+@aria.argument('execution-id')
+@aria.options.inputs(help=helptexts.EXECUTION_INPUTS)
+@aria.options.dry_execution
+@aria.options.task_max_attempts()
+@aria.options.task_retry_interval()
+@aria.options.mark_pattern()
+@aria.options.verbose()
+@aria.pass_model_storage
+@aria.pass_resource_storage
+@aria.pass_plugin_manager
+@aria.pass_logger
+def resume(execution_id,
+   inputs,
+   dry,
+   task_max_attempts,
+   task_retry_interval,
+   mark_pattern,
+   model_storage,
+   resource_storage,
+   plugin_manager,
+   logger):
+executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
+
+workflow_runner = \
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+execution_id=execution_id, executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+
+logger.info('Resuming {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+def _run_execution(workflow_runner, logger, model_storage, dry, mark_pattern):
+execution_thread_name = '{0}_{1}'.format(workflow_runner.service.name,
+ 
workflow_runner.execution.workflow_name)
 execution_thread = 
threading.ExceptionThread(target=workflow_runner.execute,
  name=execution_thread_name)
 
-logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
 execution_thread.start()
 
-log_iterator = cli_logger.ModelLogIterator(model_storage, 
workflow_runner.execution_id)
+last_task_id = workflow_runner.execution.logs[-1].id if 
workflow_runner.execution.logs else 0
+log_iterator = 

incubator-ariatosca git commit: wip [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 3ba6448b9 -> 82f188a02 
(forced update)


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/82f188a0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/82f188a0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/82f188a0

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: 82f188a02d58e00802c4fcb683b0be048291282f
Parents: 1fee85c
Author: max-orlov 
Authored: Mon Jun 19 17:44:45 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 11:05:05 2017 +0300

--
 aria/cli/commands/executions.py |  55 ++-
 aria/cli/logger.py  |   4 +-
 aria/modeling/orchestration.py  |   3 +-
 aria/orchestrator/context/workflow.py   |   5 +
 aria/orchestrator/events.py |   1 +
 aria/orchestrator/exceptions.py |   7 +
 aria/orchestrator/workflow_runner.py|  40 +++--
 aria/orchestrator/workflows/core/engine.py  |   4 +
 .../workflows/core/events_handler.py|   7 +
 tests/mock/__init__.py  |   2 +-
 tests/mock/models.py|  14 +-
 tests/modeling/test_models.py   |   5 +-
 tests/orchestrator/test_workflow_runner.py  | 157 +--
 13 files changed, 261 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/82f188a0/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index 6176ea2..f2f8221 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -134,18 +134,63 @@ def start(workflow_name,
 executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
 
 workflow_runner = \
-WorkflowRunner(workflow_name, service.id, inputs,
-   model_storage, resource_storage, plugin_manager,
-   executor, task_max_attempts, task_retry_interval)
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
 
-execution_thread_name = '{0}_{1}'.format(service_name, workflow_name)
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+@executions.command(name='resume',
+short_help='Resume a workflow')
+@aria.argument('execution-id')
+@aria.options.inputs(help=helptexts.EXECUTION_INPUTS)
+@aria.options.dry_execution
+@aria.options.task_max_attempts()
+@aria.options.task_retry_interval()
+@aria.options.mark_pattern()
+@aria.options.verbose()
+@aria.pass_model_storage
+@aria.pass_resource_storage
+@aria.pass_plugin_manager
+@aria.pass_logger
+def resume(execution_id,
+   inputs,
+   dry,
+   task_max_attempts,
+   task_retry_interval,
+   mark_pattern,
+   model_storage,
+   resource_storage,
+   plugin_manager,
+   logger):
+executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
+
+workflow_runner = \
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+execution_id=execution_id, executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+def _run_execution(workflow_runner, logger, model_storage, dry, mark_pattern):
+execution_thread_name = '{0}_{1}'.format(workflow_runner.service.name,
+ 
workflow_runner.execution.workflow_name)
 execution_thread = 
threading.ExceptionThread(target=workflow_runner.execute,
  name=execution_thread_name)
 
 logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
 execution_thread.start()
 
-log_iterator = cli_logger.ModelLogIterator(model_storage, 
workflow_runner.execution_id)
+last_task_id = workflow_runner.execution.logs[-1].id if 
workflow_runner.execution.logs else 0
+log_iterator = cli_logger.ModelLogIterator(model_storage,
+   workflow_runner.execution_id,
+   offset=last_task_id)
 try:

incubator-ariatosca git commit: wip [Forced Update!]

2017-06-21 Thread mxmrlv
Repository: incubator-ariatosca
Updated Branches:
  refs/heads/ARIA-236-Resumable-workflow-executions 8fdea04ff -> 3ba6448b9 
(forced update)


wip


Project: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/commit/3ba6448b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/tree/3ba6448b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/diff/3ba6448b

Branch: refs/heads/ARIA-236-Resumable-workflow-executions
Commit: 3ba6448b9da8f8eff5d1bf3c97cd2b54961cc430
Parents: 1fee85c
Author: max-orlov 
Authored: Mon Jun 19 17:44:45 2017 +0300
Committer: max-orlov 
Committed: Wed Jun 21 10:57:20 2017 +0300

--
 aria/cli/commands/executions.py |  55 ++-
 aria/cli/logger.py  |   4 +-
 aria/modeling/orchestration.py  |   3 +-
 aria/orchestrator/context/workflow.py   |   5 +
 aria/orchestrator/events.py |   1 +
 aria/orchestrator/exceptions.py |   7 +
 aria/orchestrator/workflow_runner.py|  40 +++--
 aria/orchestrator/workflows/core/engine.py  |   4 +
 .../workflows/core/events_handler.py|   7 +
 tests/mock/__init__.py  |   2 +-
 tests/mock/models.py|  14 +-
 tests/modeling/test_models.py   |   5 +-
 tests/orchestrator/test_workflow_runner.py  | 157 +--
 13 files changed, 261 insertions(+), 43 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/incubator-ariatosca/blob/3ba6448b/aria/cli/commands/executions.py
--
diff --git a/aria/cli/commands/executions.py b/aria/cli/commands/executions.py
index 6176ea2..f2f8221 100644
--- a/aria/cli/commands/executions.py
+++ b/aria/cli/commands/executions.py
@@ -134,18 +134,63 @@ def start(workflow_name,
 executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
 
 workflow_runner = \
-WorkflowRunner(workflow_name, service.id, inputs,
-   model_storage, resource_storage, plugin_manager,
-   executor, task_max_attempts, task_retry_interval)
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+service_id=service.id, workflow_name=workflow_name, 
executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
 
-execution_thread_name = '{0}_{1}'.format(service_name, workflow_name)
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+@executions.command(name='resume',
+short_help='Resume a workflow')
+@aria.argument('execution-id')
+@aria.options.inputs(help=helptexts.EXECUTION_INPUTS)
+@aria.options.dry_execution
+@aria.options.task_max_attempts()
+@aria.options.task_retry_interval()
+@aria.options.mark_pattern()
+@aria.options.verbose()
+@aria.pass_model_storage
+@aria.pass_resource_storage
+@aria.pass_plugin_manager
+@aria.pass_logger
+def resume(execution_id,
+   inputs,
+   dry,
+   task_max_attempts,
+   task_retry_interval,
+   mark_pattern,
+   model_storage,
+   resource_storage,
+   plugin_manager,
+   logger):
+executor = DryExecutor() if dry else None  # use WorkflowRunner's default 
executor
+
+workflow_runner = \
+WorkflowRunner(
+inputs, model_storage, resource_storage, plugin_manager,
+execution_id=execution_id, executor=executor,
+task_max_attempts=task_max_attempts, 
task_retry_interval=task_retry_interval
+)
+
+_run_execution(workflow_runner, logger, model_storage, dry, mark_pattern)
+
+
+def _run_execution(workflow_runner, logger, model_storage, dry, mark_pattern):
+execution_thread_name = '{0}_{1}'.format(workflow_runner.service.name,
+ 
workflow_runner.execution.workflow_name)
 execution_thread = 
threading.ExceptionThread(target=workflow_runner.execute,
  name=execution_thread_name)
 
 logger.info('Starting {0}execution. Press Ctrl+C cancel'.format('dry ' if 
dry else ''))
 execution_thread.start()
 
-log_iterator = cli_logger.ModelLogIterator(model_storage, 
workflow_runner.execution_id)
+last_task_id = workflow_runner.execution.logs[-1].id if 
workflow_runner.execution.logs else 0
+log_iterator = cli_logger.ModelLogIterator(model_storage,
+   workflow_runner.execution_id,
+   offset=last_task_id)
 try: