Skip to content

Commit f75e2b6

Browse files
author
Alan Christie
committed
fix: Validator now only checks 'required' variable names
1 parent 2826d40 commit f75e2b6

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

workflow/workflow_validator.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55
from enum import Enum
66
from typing import Any
77

8-
from .decoder import get_steps, get_variable_names, validate_schema
8+
from .decoder import (
9+
get_required_variable_names,
10+
get_steps,
11+
get_variable_names,
12+
validate_schema,
13+
)
914

1015

1116
class ValidationLevel(Enum):
@@ -153,8 +158,8 @@ def _validate_run_level(
153158
error_msg=[f"Specification is missing: {', '.join(missing_keys)}"],
154159
)
155160

156-
# We must have values for all the inputs defined in the workflow.
157-
wf_variables: list[str] = get_variable_names(workflow_definition)
161+
# We must have values for all the variables defined in the workflow.
162+
wf_variables: list[str] = get_required_variable_names(workflow_definition)
158163
missing_values: list[str] = []
159164
missing_values.extend(
160165
wf_variable
@@ -164,7 +169,9 @@ def _validate_run_level(
164169
if missing_values:
165170
return ValidationResult(
166171
error_num=3,
167-
error_msg=[f"Missing input values for: {', '.join(missing_values)}"],
172+
error_msg=[
173+
f"Missing workflow variable values for: {', '.join(missing_values)}"
174+
],
168175
)
169176

170177
return _VALIDATION_SUCCESS

0 commit comments

Comments
 (0)