config: aggregate validation diagnostics - #207
Merged
Merged
Conversation
Collect independent structural and semantic configuration failures before returning, with deterministic public paths and source lines. This lets operators fix a complete set of actionable node-specific problems in one validation run without exposing compiler representation details.
Zariel
enabled auto-merge (squash)
August 5, 2026 23:18
Greptile SummaryThe PR changes ClusterConfig validation from fail-fast behavior to deterministic aggregation of independent structural and semantic diagnostics.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking defects identified. The new validation pass preserves the existing full BuildArchive pipeline while aggregating source and effective-node errors, suppressing dependent cascades, and deterministically presenting public diagnostics.
|
| Filename | Overview |
|---|---|
| internal/installer/configbundle/validation.go | Introduces source-aware issue aggregation, cascade suppression, deterministic sorting, public-path extraction, and YAML line indexing. |
| internal/installer/configbundle/bundle.go | Refactors normalization and resolved-node validation to collect independent semantic failures rather than returning the first error. |
| internal/installer/configbundle/schema.go | Extends reflected YAML validation to aggregate unsupported fields and structural type mismatches. |
| internal/installer/configbundle/source_layering.go | Aggregates storage, host configuration, extension, access, disk, label, and taint validation across effective node layers. |
| cmd/katlctl/main.go | Adds the source-only diagnostic pass before the existing full archive validation pipeline. |
| internal/installer/manifest/manifest.go | Makes label validation deterministic and exposes a safe helper for validating operator-authored labels and taints. |
| cmd/katlctl/main_test.go | Covers stable public-path ordering, source lines, type diagnostics, node naming, and suppression of internal implementation names. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[ClusterConfig YAML] --> B[Parse YAML node tree]
B --> C[Collect structural and type issues]
B --> D[Decode SourceConfig]
D --> E[Normalize and collect semantic issues]
E --> F[Resolve node layers]
F --> G[Collect effective per-node issues]
C --> H[Suppress dependent cascades]
D --> H
E --> H
G --> H
H --> I[Deduplicate and sort by public path]
I --> J{Any issues?}
J -- Yes --> K[Return aggregated diagnostics with source lines]
J -- No --> L[Continue BuildArchive validation]
Reviews (1): Last reviewed commit: "config: aggregate validation diagnostics" | Re-trigger Greptile
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.
Collect independent structural and semantic ClusterConfig failures in one validation pass. Diagnostics are deterministically ordered, use public named-node paths, include YAML source lines where available, suppress cascades from malformed values, and avoid exposing internal compiler names.