Allow hyphens in Workflow and ad-hoc action names
In ba67b3aff8
validation of Workflow and
Action names was fixed. This had the unintended side effect of making
the validation much stricter. This change adds hyphens to the allows
characters.
Change-Id: Ib05c4988ea3dbeaf5f29f5f5674a606b3c652f2d
This commit is contained in:
parent
2852d113b1
commit
b8d94ee4b8
@ -16,6 +16,9 @@ actions:
|
||||
actionversionaction:
|
||||
base: std.noop
|
||||
|
||||
action-action:
|
||||
base: std.noop
|
||||
|
||||
workflows:
|
||||
|
||||
workflowversion:
|
||||
@ -41,3 +44,9 @@ workflows:
|
||||
tasks:
|
||||
task1:
|
||||
workflow: workflowversion
|
||||
|
||||
workflow-with-hyphen:
|
||||
description: Workflow name containing -
|
||||
tasks:
|
||||
task1:
|
||||
action: action-action
|
||||
|
@ -412,6 +412,7 @@ class WorkbookSpecValidation(base.WorkbookSpecValidationTestCase):
|
||||
"versionworkflow",
|
||||
"workflowversionworkflow",
|
||||
"version_workflow",
|
||||
"version-workflow",
|
||||
)
|
||||
|
||||
for valid in valid_names:
|
||||
|
@ -18,7 +18,7 @@ from mistral.workbook.v2 import base
|
||||
from mistral.workbook.v2 import workflows as wf
|
||||
|
||||
# We want to match any single word that isn't exactly "version"
|
||||
NON_VERSION_WORD_REGEX = "^(?!version$)\w+$"
|
||||
NON_VERSION_WORD_REGEX = "^(?!version$)[\w-]+$"
|
||||
|
||||
|
||||
class WorkbookSpec(base.BaseSpec):
|
||||
|
Loading…
Reference in New Issue
Block a user