Reject empty and control-character identifiers during bundle validate - #6305
Open
radakam wants to merge 8 commits into
Open
Reject empty and control-character identifiers during bundle validate#6305radakam wants to merge 8 commits into
radakam wants to merge 8 commits into
Conversation
Collaborator
Integration test reportCommit: c74f179
Top 3 slowest tests (at least 2 minutes):
|
radakam
marked this pull request as ready for review
August 19, 2026 08:56
Contributor
Approval status: pending
|
…validate
validate --strict previously accepted empty model names, UC/serving names with
control characters, and pipeline file: {}. Those fail later with API 400 or
invalid-URL errors; fail during initialize instead.
Keep omitted UC parent fields as warnings, point diagnostics at the field path, tighten tests, and drop duplicate empty-name acceptance coverage.
Build diagnostic paths structurally with dyn.NewPath instead of parsing concatenated strings: a resource key containing a path metacharacter (e.g. "weird[0]key") made MustPathFromString panic during bundle validate. Drive the identifier checks off generated.RequiredFields rather than a hand-picked list of resource types, so control characters and blank values are caught consistently (vector search endpoints, apps, experiments and others were previously silent). Explicit empty strings on UC parent fields are now rejected too; omitted parents keep warning. Stop short-circuiting before warnForMissingFields so one validate run reports every issue, and name the offending character in the diagnostic detail since control characters are invisible in terminal output.
Collapse OpenAPI warnings, backend-only errors, and blank/control-char checks into a compiled rule set so nested fields keep accurate messages and validate stays a single config walk.
Split OpenAPI required-field warnings from identifier checks and drop the heuristic rule engine so validation policy stays readable and intentional.
radakam
force-pushed
the
fix-illegal-empty-identifiers
branch
from
August 25, 2026 08:12
16a7c53 to
810378f
Compare
denik
reviewed
Aug 27, 2026
denik
reviewed
Aug 27, 2026
GetLocations parses a string, so resource keys with '[' or '.' lose their YAML source location.
denik
reviewed
Aug 28, 2026
Keep the original warn path, HasError early return, and warehouse_id check; only use structural paths where GetLocations panics.
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.
Changes
Reject empty, blank, and control-character resource identifiers (and incomplete pipeline library paths) during bundle validate, so these configs fail at validate instead of later with API 400 / invalid-URL errors.
catalog_name,schema_name, ...): blank and control-character values error. Omitted parents are left to the existing OpenAPI required-field warnings, which still run only when validate has no errors.file/notebook/globentries without paths are rejected.dyn.NewPath(no panic on resource keys with path metacharacters) and name the offending control character in the detail.Why
These configs used to pass
databricks bundle validateand only fail later at the API.Before this fix (
databricks bundle validateon a bundle with empty names, control-character names, andfile: {}):Explicit
""on non-omitemptyparents (e.g. volumes) also errors. Onomitemptyparents (e.g. registered models),DropEmptyStringstreats""as unset before validate.Found by fuzz testing.
Tests
invalid_identifiers_test.go,pipeline_libraries_test.goinvalid_identifiers,required,empty_resources, dashboard/sql_warehouse required-name cases,volume_defaults, models validate