Skip to content

CI red on main and every PR: committed dcam ioc.schema.json files are stale, ibek-ioc-schema hook regenerates them #178

Closed

Description

@gilesknap

.github/workflows/verify.yml → job verify_ioc_instances → step run IOC checks (bash ci_verify.sh) fails on every push, including pushes to main. ci_verify.sh runs uvx pre-commit run --all-files --show-diff-on-failure, and the local hook ibek-ioc-schema regenerates two committed schemas, so pre-commit reports "files were modified by this hook" and the job exits 1.

Evidence

Latest main run — 35720978746 (job 106723551635):

check for added large files....................................................Passed
check yaml.....................................................................Passed
check for merge conflicts......................................................Passed
generate and validate the synoptic and component screens.......................Passed
generate per-instance ioc.schema.json..........................................Failed
- hook id: ibek-ioc-schema
- files were modified by this hook
check vendored runtime-support against runtime-lock.yaml.......................Passed
pre-commit hook(s) made changes.
...
diff --git a/services/bl47p-ea-dcam-01/ioc.schema.json b/services/bl47p-ea-dcam-01/ioc.schema.json
diff --git a/services/bl47p-ea-dcam-02/ioc.schema.json b/services/bl47p-ea-dcam-02/ioc.schema.json
##[error]Process completed with exit code 1.

Only those two files are regenerated; every other hook passes.

Not PR-specific

Renovate's untouched PR #169 ("Update tiled Docker tag to v0.2.18") fails the same way — run 35956141709 shows the identical ibek-ioc-schema failure on the same two files, and PR #169 touches neither. The same is true of the other open Renovate PRs (#136, #168, #170, #171, #174). Sibling repos p46-services, p48-services and p49-services are green on main.

Cause

main went red at dbfdece "Move the camera IOCs to ioc-adaravis-runtime R2-3ec1" (run 35708211956, 2026-09-22 09:03). That commit bumped image: in both dcam values.yaml files from ioc-adaravis-runtime:2026.4.3 to R2-3ec1 but did not regenerate the per-instance ioc.schema.json, which is derived from the image's ibek-support definitions. The last green main run was 34974748083 on 2026-09-15, so the window is 2026-09-22 onwards, not 2026-08-22.

Regeneration diff

Reproduced locally at origin/main with the hook's own command:

uvx --python 3.13 --from ibek --constraints requirements.txt ibek pattern schema services/bl47p-ea-dcam-01

Each file gets +123 / -3 lines, identical in both:

  • new $defs: Wait4IPEntity (ibek.wait_ip), Wait4USBEntity (ibek.wait_usb), epics_PreBootCommandSet (epics.PreBootCommandSet), plus their discriminator-map and anyOf entries;
  • ADAravis.aravisCamera.CLASS gains "default": "AutoADGenICam" and drops out of required;
  • ADCore.NDAttributes.name gains "default": "{{ port }}.{{ attrname }}" and drops out of required.

That is catch-up only — pure additions plus two fields becoming optional, i.e. strictly more permissive. Nothing is removed and no new field becomes required, so no existing config/ioc.yaml can be invalidated. Regeneration is deterministic (re-running produces a byte-identical file) and after it pre-commit run --all-files passes clean.

PR to follow.

Side note (not the failure)

The same hook prints, on every run:

Schema not found for sr03c-va-ioc-01 (image gitlab.diamond.ac.uk:5050/controls/containers/iocs/ioc-dlslinuxvac/ioc-dlslinuxvac-linux-runtime:2026.4.2): cannot parse org/repo from image '...'; skipping schema generation

That is ibek's deliberate soft-skip for non-GitHub images (exit 0) and is not part of this failure, but it does mean sr03c-va-ioc-01 is never schema-checked.

Activity

  1. gilesknap commented on Sep 24, 2026

    @gilesknap
    MemberAuthor

    Verified end to end. PR #179 regenerates the two schemas and the pre-commit stage is now clean in CI — run 35971426241:

    check for added large files....................................................Passed
    check yaml.....................................................................Passed
    check for merge conflicts......................................................Passed
    generate and validate the synoptic and component screens.......................Passed
    generate per-instance ioc.schema.json..........................................Passed
    check vendored runtime-support against runtime-lock.yaml.......................Passed
    

    However that PR's CI is still red, for a second and unrelated reason that was masked by this one (ci_verify.sh is set -e, so it never reached the later stage). Once pre-commit passes, the per-service container validation of the dcam instances fails with FileNotFoundError: /epics/pvi-defs/ADAravis-BL47P-EA-DET-01.pvi.device.yaml, because the sed s/AutoADGenICam/ADGenICam/ workaround in ci_verify.sh is obsolete against ioc-adaravis-runtime:R2-3ec1. Filed separately as #180 — it needs a human decision, so I have not attempted it.

    #179 is still worth merging on its own: it is a strict prerequisite (nothing else can go green until the schemas are current) and it is generated-file-only. But merging it alone will not turn main green; #180 has to be settled too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions