Skip to content

make validate and CI have drifted apart in both directions #68

Description

@Gerrrt

scripts/validate.sh:3 says "Everything CI runs, runnable locally." It has
drifted in both directions, so neither is a superset of the other.

CI runs things make validate does not

  • actionlint (ci.yml:42-43)
  • editorconfig-checker (ci.yml:45-46)
  • yamllint --strict (ci.yml:33-34) where validate.sh:204 and
    Makefile:111 run plain yamllint. Warnings fail CI and pass locally.

make validate runs something CI does not

  • scripts/snmp-targets.sh --check (validate.sh:230), which asserts the
    device inventory agrees across targets/snmp.yaml, generator.yaml,
    render-config.sh's REQUIRED list, the secrets example and the Makefile
    flags.

That last one is the sharp edge: inventory drift can merge cleanly, because
the only thing that checks it never runs in CI. The whole point of
snmp-targets.sh being the single source of truth is undermined by the check
being optional.

seed-validation-env.sh is the model to follow — one script, both callers, so
they cannot disagree. The lint and check lists want the same treatment.

Found while verifying #12.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions