Validate rendered cloud-init templates against official schema#63
Merged
Validate rendered cloud-init templates against official schema#63
Conversation
e7410fe to
bc121e8
Compare
Add jsonschema dev dependency and two new tests that render the Jinja2 cloud-init template (with and without Tailscale) then validate the output against canonical/cloud-init's JSON schema. Tests skip gracefully when the network is unavailable. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bc121e8 to
7a37172
Compare
ret2libc
commented
Mar 31, 2026
BradSwain
reviewed
Mar 31, 2026
Collaborator
Author
|
JFYI: ContextPR #63 (
Research findingsLowest cloud-init version on current DigitalOcean images:
Minimum: 22.4.2 (Debian 12 bookworm, which freezes packages). The schema at tag |
Replace the network-fetched schema (from cloud-init main) with a local copy pinned to version 22.4.2 — the oldest cloud-init shipped by any currently supported DigitalOcean image (Debian 12 bookworm). This addresses review feedback to avoid validating against a schema newer than what target distros actually support, and removes the network dependency so tests work offline. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
DarkaMaul
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
jsonschemaas a dev dependencyTest plan
uv run pytest tests/test_cloudinit.py -v— all 6 tests passuv run pytest -v— full suite (291 tests) passes with coverage above thresholdprek run— all pre-commit hooks pass🤖 Generated with Claude Code