Skip to content

Commit 66f460b

Browse files
authored
Merge pull request #166 from StackStorm/unreachable-task-error-msg
Rephrased error message for unreachable join task
2 parents c96500e + 903867c commit 66f460b

File tree

3 files changed

+19
-2
lines changed

3 files changed

+19
-2
lines changed

CHANGELOG.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Changelog
44
0.6
55
---
66

7+
Changed
8+
~~~~~~~
9+
10+
* Rephrased the error message for the unreachable join task. Fixes #162 (improvement)
11+
712
Fixed
813
~~~~~
914

orquesta/specs/native/v1/models.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,15 @@ def detect_unreachable_tasks(self, parent=None):
465465
meta['reachable'] = (meta['splits'] == staging[prev_task_name]['splits'])
466466

467467
if not meta['reachable']:
468+
msg = (
469+
'The join task "%s" is unreachable. A join task is determined to be '
470+
'unreachable if there are nested forks from multi-referenced tasks '
471+
'that join on the said task. This is ambiguous to the workflow engine '
472+
'because it does not know at which level should the join occurs.'
473+
)
474+
468475
entry = {
469-
'message': 'The join task "%s" is unreachable.' % task_name,
476+
'message': msg % task_name,
470477
'spec_path': meta['spec_path'],
471478
'schema_path': meta['schema_path']
472479
}

orquesta/tests/unit/specs/native/test_workflow_spec_validate.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,12 @@ def test_unreachable_task(self):
412412
expected_errors = {
413413
'semantics': [
414414
{
415-
'message': 'The join task "task5" is unreachable.',
415+
'message': (
416+
'The join task "task5" is unreachable. A join task is determined to be '
417+
'unreachable if there are nested forks from multi-referenced tasks '
418+
'that join on the said task. This is ambiguous to the workflow engine '
419+
'because it does not know at which level should the join occurs.'
420+
),
416421
'spec_path': 'tasks.task5',
417422
'schema_path': 'properties.tasks.patternProperties.^\\w+$'
418423
}

0 commit comments

Comments
 (0)