epics-containers / edge-containers-cli

command line shortcuts for epics containers developers
Apache License 2.0
3 stars 1 forks source link

ec ioc verify is failing for bl20j-mo-brick-06 #64

Open gilesknap opened 11 months ago

gilesknap commented 11 months ago

The command line yaml validation tool does not like bl20j-mo-brick-06

It get's the following errors and I'm not clear on what it is complaining about:

(venv) (dev) [hgv27681@pc0116 bl20j]$ ec --log-level info ioc validate iocs/bl20j-mo-brick-06
INFO:   checking IOC instance bl20j-mo-brick-06 at /scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06
Validating /scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06
INFO:   Downloading schema file https://github.com/epics-containers/ioc-pmac/releases/download/2023.11.2b1/ibek.ioc.schema.json to /tmp/tmpte4o2it4/schema.json
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Additional property false is not allowed
1 of 1 failed validation
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Additional property false is not allowed
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Must validate one and only one schema (oneOf)
/scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Additional property false is not allowed

Command Failed:
podman run --rm -w /scratch/hgv27681/work/bl20j -v /scratch/hgv27681/work/bl20j:/scratch/hgv27681/work/bl20j -v /tmp:/tmp ghcr.io/epics-containers/yajsv -s /tmp/tmpte4o2it4/schema.json /scratch/hgv27681/work/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml
marcelldls commented 10 months ago

If I try reproduce this I get the following:

[esq51579@pc0146 bl20j]$ ec --log-level info ioc validate iocs/bl20j-mo-brick-06
INFO:   checking IOC instance bl20j-mo-brick-06 at /home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06
Validating /home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06
INFO:   Downloading schema file https://github.com/epics-containers/ioc-pmac/releases/download/2023.11.2b1/ibek.ioc.schema.json to /tmp/tmpmpzrfcqx/schema.json
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.15: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.15.GRP3: Invalid type. Expected: string, given: boolean
1 of 1 failed validation
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.5: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.6: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.7: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.10: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.12: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.13: Additional property false is not allowed
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.15: Must validate one and only one schema (oneOf)
/home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml: fail: entities.15.GRP3: Invalid type. Expected: string, given: boolean

Command Failed:
podman run --rm -w /home/esq51579/WIP/bl20j -v /home/esq51579/WIP/bl20j:/home/esq51579/WIP/bl20j -v /tmp:/tmp ghcr.io/epics-containers/yajsv -s /tmp/tmpmpzrfcqx/schema.json /home/esq51579/WIP/bl20j/iocs/bl20j-mo-brick-06/config/bl20j-mo-brick-06.yaml

Deleting the "OFF" entries and the "GRP3: Y" removes the error. I believe in both cases the "OFF" and "Y" are interpreted as the boolean FALSE and TRUE respectively

gilesknap commented 10 months ago

Thanks. That means I need to get builder2ibek to put quotes around those special string values.

marcelldls commented 9 months ago

This seems to be solved in YAML 1.2 Only true and false strings are parsed as booleans (including True and TRUE); y, yes, on, and their negative counterparts are parsed as strings. https://yaml.org/spec/1.2.2/ext/changes/

gilesknap commented 9 months ago

@marcelldls please can you convert bl01j to use the new project layout as demonstrated by https://github.com/epics-containers/bl47p. The new CI uses ibek to check the instance YAML. Can you see if your motion IOC passes CI?

Also you should take this sweeping changes opportunity to change your repo and IOC names to bl01c :-)

gilesknap commented 8 months ago

@marcelldls I'm hoping this problem will have gone away with the new template and totally new way of doing verify.