Reject empty/control-char names and incomplete pipeline libraries at … - #6305
Draft
radakam wants to merge 5 commits into
Draft
Reject empty/control-char names and incomplete pipeline libraries at …#6305radakam wants to merge 5 commits into
radakam wants to merge 5 commits into
Conversation
…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.
Collaborator
Integration test reportCommit: 16a7c53
8 interesting tests: 4 SKIP, 3 KNOWN, 1 RECOVERED
Top 6 slowest tests (at least 2 minutes):
|
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.
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 validation, so these configs fail at initialize instead of later with API 400 / invalid-URL errors.
_nameheuristics), with OpenAPI required-field warnings kept separate.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
Found by fuzz testing.
Tests
Acceptance:
invalid_identifiers,required,empty_resources, dashboard/sql_warehouse required-name cases,volume_defaults, models validate