Skip to content

Conversation

@deitch
Copy link
Collaborator

@deitch deitch commented Sep 5, 2025

- What I did
Added yaml validation to lkt pkg build and lkt build. It already would report errors on required fields that were missing, and fields with wrong types. But extraneous fields that are unknown would be ignored silently.

This looked ok, except it led to people getting stuck on minor typos that are not immediately visible, wasting hours debugging; or adding fields that do not exist and wondering why it doesn't work.

There was no reason not to require only known fields, and plenty of good reasons to do so.

Added tests of course.

Added in 2 separate commits.

- How I did it
Added yaml.v3 KnownFields validation. And added tests.

- How to verify it
CI

- Description for the changelog

Full yaml validation for pkg build and build

@deitch deitch merged commit a755fd9 into linuxkit:master Sep 5, 2025
25 checks passed
@deitch deitch deleted the validate-yaml branch September 5, 2025 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant