if
if copied to clipboard
[If-diff] Only first array member is validated
Description of the Error
Arrays inside manifests are not validated correctly. Only the first member of an array is validated.
Expected Behaviour
All array members should be verified.
Actual Behaviour
Only the first member of an array is validated.
Steps to Reproduce
- Run the following manifest as a source.
name: basic
description: >-
a minimal manifest executing a single plugin on a single component for a
single timestep
tags: null
initialize:
plugins:
teads-curve:
path: '@grnsft/if-unofficial-plugins'
method: TeadsCurve
global-config:
interpolation: spline
outputs:
- yaml
execution:
command: a
environment:
date-time: a
if-version: v0.3.2
os: macOS
os-version: '13.2'
node-version: 18.14.2
dependencies:
- '@babel/[email protected]'
- '@babel/[email protected]'
- '@commitlint/[email protected]'
- '@commitlint/[email protected]'
- '@grnsft/[email protected] extraneous -> file:../../../../if-models'
- >-
@grnsft/[email protected] extraneous ->
file:../../../../if-unofficial-models
- '@jest/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
status: success
tree:
children:
child-0:
defaults:
cpu/thermal-design-power: 100
pipeline:
- teads-curve
inputs:
- timestamp: 2023-07-06T00:00
duration: 1
cpu/utilization: 20
- timestamp: 2023-07-06T00:01
duration: 1
cpu/utilization: 80
- timestamp: 2023-07-06T00:02
duration: 1
cpu/utilization: 20
outputs:
- timestamp: 2023-07-06T00:00
duration:
cpu/utilization: 20
cpu/thermal-design-power: 100
cpu/energy: 0.000013270071138211382
- timestamp: 2023-07-06T00:01
duration:
cpu/utilization: 80
cpu/thermal-design-power: 100
cpu/energy: 0.000025568089430894314
- timestamp: 2023-07-06T00:02
duration: 1
cpu/utilization: 20
cpu/thermal-design-power: 100
cpu/energy: 0.000013270071138211382
and this one as a target
name: basic
description: >-
a minimal manifest executing a single plugin on a single component for a
single timestep
tags: null
initialize:
plugins:
teads-curve:
path: '@grnsft/if-unofficial-plugins'
method: TeadsCurve
global-config:
interpolation: spline
outputs:
- yaml
execution:
command: a
environment:
date-time: a
if-version: v0.3.2
os: macOS
os-version: '13.2'
node-version: 18.14.2
dependencies:
- '@babel/[email protected]'
- '@babel/[email protected]'
- '@commitlint/[email protected]'
- '@commitlint/[email protected]'
- '@grnsft/[email protected] extraneous -> file:../../../../if-models'
- >-
@grnsft/[email protected] extraneous ->
file:../../../../if-unofficial-models
- '@jest/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- '@types/[email protected]'
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
- [email protected]
status: success
tree:
children:
child-0:
defaults:
cpu/thermal-design-power: 100
pipeline:
- teads-curve
inputs:
- timestamp: 2023-07-06T00:00
duration: 1
cpu/utilization: 20
- timestamp: 2023-07-06T00:01
duration: 1
cpu/utilization: 80
- timestamp: 2023-07-06T00:02
duration: 1
cpu/utilization: 20
outputs:
- timestamp: 2023-07-06T00:00
duration: 1
cpu/utilization: 20
cpu/thermal-design-power: 100
cpu/energy: 0.000013270071138211382
- timestamp: 2023-07-06T00:01
duration: 1
cpu/utilization: 80
cpu/thermal-design-power: 100
cpu/energy: 0.000025568089430894314
- timestamp: 2023-07-06T00:02
duration: 1
cpu/utilization: 20
cpu/thermal-design-power: 100
cpu/energy: 0.000013270071138211382
- See following result
> @grnsft/[email protected] if-diff
> npx ts-node src/diff.ts -s manifests/outputs/basic.yaml -t manifests/outputs/basic-1.yaml.yaml
Files match!