Page MenuHomeDevCentral

Validate salt-tower pillar files with JSON Schema
ClosedPublic

Authored by dereckson on Wed, Aug 5, 07:15.
Tags
None
Referenced Files
F42926056: D4145.diff
Mon, Aug 10, 02:35
F42922887: D4145.id.diff
Mon, Aug 10, 01:47
Unknown Object (File)
Sun, Aug 9, 14:10
Unknown Object (File)
Sun, Aug 9, 13:37
Unknown Object (File)
Sun, Aug 9, 13:37
Unknown Object (File)
Sun, Aug 9, 13:37
Unknown Object (File)
Sun, Aug 9, 13:37
Unknown Object (File)
Sun, Aug 9, 13:37
Subscribers
None
Tokens
"Y So Serious" token, awarded by dereckson.

Details

Summary

JSON Schema has been selected to offer validation in IDE.

The pillar files we validate are the pillar defined in tower.sls,
as we create new files for new servers or services.

Test Plan
  • New tests pass

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Errors
SeverityLocationCodeMessage
Error_tests/pillar/dbserver/test_postgresql.py:78E501flake8 E501
Unit
No Test Coverage
Branch
codex-pillar-tests
Build Status
Buildable 6795
Build 7083: arc lint + arc unit

Event Timeline

dereckson created this revision.

I wonder if T1681 couldn't host them too. If so:

"$id": "https://operations.nasqueron.org/schemas/pillar/certificates.schema.json",

should become:

"$id": "https://schema.nasqueron.org/operations/pillar/certificates.schema.json",

Models used:

  • GPT 5.5 (Codex, from JetBrains PyCharm) for the schema generation and the tests
  • Qwen 3.8 for code review

Use the schema.nasqueron.org namespace by coherence with D2532.

Declare the schema files as non versioned. The /unversioned/ URL part says
“this schema has no schema-version dimension”.

This revision is now accepted and ready to land.Mon, Aug 10, 21:45
This revision was landed with ongoing or failed builds.Mon, Aug 10, 21:45
This revision was automatically updated to reflect the committed changes.