Feat #3: ucm validate + schema (M0) - #4
Merged
Conversation
Closes#3. Wire up real `ucm validate` and `ucm schema` verbs on a minimal UC resource set (catalogs, schemas, grants, tag_validation_rules). Adds the ucm engine scaffolding (config loader, mutator chain, phases) and a fixture-driven test harness. Why: M0 milestone — first end-to-end slice of the fork that can load a ucm.yml, apply the mutator chain (including tag validation), and fail CI on policy violations. No interpolation, cloud resources, or TF wiring yet — those land in M1+. No upstream files modified; `cmd/cmd.go` already wires the ucm subtree from issue #1. Co-authored-by: Isaac
This was referenced Apr 20, 2026
Uh oh!
There was an error while loading. Please reload this page.
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 freeto 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.
Closes#3.
Summary
ucm/engine scaffolding:configloader (dyn-backed Root, target merge), mutator chain (DefineDefaultTarget,SelectDefaultTarget,SelectTarget,ValidateTags), phases (Load*,Validate,PolicyCheck), and a minimalUcmstruct trackingRootPath,Config, and the selectedTarget.resources/types for the M0 slice:Catalog,Schema,Grant,TagValidationRule.ucm validateanducm schemaverbs undercmd/ucm/, replacing the stubs from Scaffold ucm subcommand with verb stubs and gitops workflow #1.validateruns the full mutator chain, returnsErrAlreadyPrintedon diagnostics, and supports--strictto fail on warnings.schemaprints the JSON schema generated from the typedconfig.Rootvialibs/jsonschema.FromType.cmd/ucm/testdata/(valid/,missing_tag/) plus unit tests per mutator. Mutator coverage is 94.6%.Why
This is the M0 slice of the fork: the first end-to-end path that can load a
ucm.yml, apply mutators (including tag policy enforcement), and fail CI on violations. Interpolation, cloud resources, and TF wiring are deliberately out of scope and land in M1+.Test plan
go build ./...go vet ./...go test ./ucm/... ./cmd/ucm/...(all pass;ucm/config/mutatorat 94.6% coverage)./databricks ucm validateoncmd/ucm/testdata/valid→Validation OK!./databricks ucm validateoncmd/ucm/testdata/missing_tag→ exits non-zero with file:line:col diagnosticclassification→ diagnostic points to the offending path./databricks ucm schema→ valid JSON describingresources.Catalog,resources.TagValidationRule, etc.cmd/cmd.goor other upstream filesThis pull request and its description were written by Isaac.