generated from amazon-archives/__template_Apache-2.0
-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Expected Behaviour
The breadcrumb should direct the user to the correct location within the job template that they should be looking to correct the error.
The breadcrumb:
steps[0] -> steps[0] -> parameterSpace -> steps[0] -> parameterSpace -> steps[0] -> parameterSpace -> taskParameterDefinitions[0] -> range:
should just be:
steps[0] -> parameterSpace -> taskParameterDefinitions[0] -> range:
Current Behaviour
The validation that is happening after job instantiation (i.e. after job parameters have been evaluated for instantiation) is reporting an incorrect breadcrumb for errors in task parameter range expressions.
Reproduction Steps
Given:
specificationVersion: jobtemplate-2023-09
name: BadRangeExpr
parameterDefinitions:
- name: V
type: STRING
default: "1-10:2;10"
steps:
- name: Test
parameterSpace:
taskParameterDefinitions:
- name: P
type: INT
range: "{{Param.V}}"
script:
actions:
onRun:
command: bash
args:
- "-c"
- "echo 'Hi'"Run
% openjd run --step Test expr.template.yaml
ERROR generating Job: Could not generate Job from template and parameters: 1 validation errors for JobTemplate
steps[0] -> steps[0] -> parameterSpace -> steps[0] -> parameterSpace -> steps[0] -> parameterSpace -> taskParameterDefinitions[0] -> range:
Unexpected ';' in '1-10:2;10' after '1-10:2'Code Snippet
See the reproduction steps. The likely place that this error is coming from is in the instantiate_model method here.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working