Mistral api access can be restricted base on role
by modifying /etc/mistral/policy.json file.
Change-Id: I4c78ca4cc04d25f46aea55948bce339cfe460ff0
Implements: blueprint mistral-customize-authorization
JSON API type now tries to load a string all the time, even if the data
is already decoded as part of the request. It seems easy to support
loading the data directly. We also handle TypeError so that we handle
non-dict incorrect values.
Change-Id: Ib8c21d95df96743e65bdf2bc88af5207cf78fd8f
Closes-Bug: #1590789
- Implement MagnumAction class
- Map first actions (baymodels) from Magnum
- Tests
Change-Id: Ib61bee8c3d18e1f6ef8a580e3ec3e5157926f89c
Implements: blueprint add-magnum-action-pack
* Since this parameter was removed from engine rerun() method it should
also be removed from RCP client and server
Change-Id: Ia4cc30ae20c6700d3ff1dcc83a3ad77b2a4bc68c
* There was a bug in stable/libery that occurred in case when we
had a "join" task that joined multiple branches sourced from
the same task. In this case line 302 (in the current revision)
in direct_workflow.py caused IndexError when evaluating in_t_ex[-1]
as described in the bug. This bug was implicitly fixed since then
but a test for it was missing. This patch adds a test to prevent
this bug occurrence in the future.
Change-Id: If277989cc9149b219a9c63287290daa321a3e438
Closes-Bug: #1539173
* Introduced new class Workflow that manages life-cycle of running
workflows and is responsible for managing workflow persistent state
* Moved all workflow level logic to workflow handler and Workflow class
* Changed semantics if how workflows start errors are handled.
Previously, in case of invalid user input Mistral engine would store
information about error in "state_info" field of workflow execution
and bubble up an exception to the user. This approach was incorrect
for a number of reasons including broken semantics: if an exception
was raised due to invalid input it's normal to expect that system
state has not changed. After this refactoring, engine only raises
an exception in case of bad user input. That way behavior is
consistent with the idea of exceptional situations.
* Fixed unit tests in according to the previous point
* Fixed a number of logical issues in tests. For example, in
test_default_engine.py we expected one type of errors (e.g. env not
found) but effectively received another one (invalid input).
Partially implements: blueprint mistral-engine-error-handling
Change-Id: I09070411fd833df8284cb80db69b8401a40eb6fe
In commit 6e6af3955067f5f3d8ab093580de21124f607036 AUTHORS was
added to the .gitignore but as the file was already tracked this
wont make a difference until the file is removed from the repo.
Change-Id: If3f630be705a4b791129a18ffec37d9b831869c1
This replaces usage of log.error that manually formats the
exception. It doesn't remove uses of LOG.warning with traceback
formatting as that would change the log level.
Change-Id: Ib0ab3a60496e20277e1a619dd266cccb1f8ba5b5
Now user can provide customize message for
fail/success/pause transition.
Change-Id: I84b1fbc63aaf8186c81eea9c852f5b49db93f0ff
Implements: blueprint mistral-fail-transition-message
* Introduced class hierarchies Task and Action used by Mistral engine.
Note: Action here is a different than executor Action and represents
rather actions of different types: regular python action, ad-hoc
action and workflow action (since for task action and workflow are
polymorphic)
* Refactored task_handler.py and action_handler.py with Task and Action
hierarchies
* Rebuilt a chain call so that the entire action processing would look
like a chain of calls Action -> Task -> Workflow where each level
knows only about the next level and can influence it (e.g. if adhoc
action has failed due to YAQL error in 'output' transformer action
itself fails its task)
* Refactored policies according to new object model
* Fixed some of the tests to match the idea of having two types of
exceptions, MistralException and MistralError, where the latter
is considered either a harsh environmental problem or a logical
issue in the system itself so that it must not be handled anywhere
in the code
TODO(in subsequent patches):
* Refactor WithItemsTask w/o using with_items.py
* Remove DB transaction in Scheduler when making a delayed call,
helper policy methods like 'continue_workflow'
* Refactor policies test so that workflow definitions live right
in test methods
* Refactor workflow_handler with Workflow abstraction
* Get rid of RunExistingTask workflow command, it should be just
one command with various properties
* Refactor resume and rerun with Task abstraction (same way as
other methods, e.g. on_action_complete())
* Add error handling to all required places such as
task_handler.continue_task()
* More tests for error handling
P.S. This patch is very big but it was nearly impossible to split
it into multiple smaller patches just because how entangled everything
was in Mistral Engine.
Partially implements: blueprint mistral-engine-error-handling
Implements: blueprint mistral-action-result-processing-pipeline
Implements: blueprint mistral-refactor-task-handler
Closes-Bug: #1568909
Change-Id: I0668e695c60dde31efc690563fc891387d44d6ba
Refactored to make the docker stuff self contained and removed the
unnecessary files from the root directory. Also created a readme file to
concretize how this feature works.
Also added an example script to set up Mistral with MySQL.
Closes-Bug: #1585911
Change-Id: I7fbcccb9d7ad168c5391e71326b205d074ab01ab
Signed-off-by: Andras Kovi <akovi@nokia.com>
Make sure that the error output will not be empty.
This is to avoid unexpected behavior and be more user friendly
Change-Id: I761d87dcb722216f0ce43f1171f9d3c5d0ba47c8
Closes-Bug: #1581514
Fixes the TroveActions to connect to the Trove v1 client. Also
provides the required user/pass for the fake_client.
Change-Id: I03503007a5bd71f3d58c8ad09b0eb5ffd3f9050a
Closes-bug: 1585703