OpenJobDescription / openjd-model-for-python

Provides a Python implementation of the data model for Open Job Description's template schemas.
https://github.com/OpenJobDescription/openjd-specifications/wiki
Apache License 2.0
12 stars 7 forks source link

Bug: Associative task parameter combinations do not validate parameter range lengths #70

Closed ddneilson closed 5 months ago

ddneilson commented 7 months ago

Expected Behaviour

When defining a parameter space for a step that includes an associative combination of task parameters, and differing numbers of values for those task parameters then there should be a validation error.

Current Behaviour

No validation error, and

Reproduction Steps

specificationVersion: jobtemplate-2023-09
name: CombinationError
steps:
- name: CombinationError
  parameterSpace:
    taskParameterDefinitions:
    - name: Foo
      type: INT
      range: "1-5"
    - name: Bar
      type: INT
      range: "1-10"
    combination: "(Foo,Bar)"
  script:
    actions:
      onRun:
        command: echo

Run the above through the validator (e.g. via openjd check CLI) and try to run it (openjd run error.yaml --step CombinationError).

The openjd run will run 5 tasks with parameter values: (1,1), (2,2), (3,3), (4,4), (5,5)

Code Snippet

N/A

ddneilson commented 5 months ago

Resolved by: https://github.com/OpenJobDescription/openjd-model-for-python/pull/96