Expose stage/release status in schema#5443
Open
janniklasrose wants to merge 16 commits into
Open
Conversation
ilyakuz-db
reviewed
Jun 5, 2026
| @@ -139,13 +139,51 @@ func assignAnnotation(s *jsonschema.Schema, a annotation.Descriptor) { | |||
| s.Deprecated = true | |||
| s.DeprecationMessage = a.DeprecationMessage | |||
| } | |||
| if a.Preview == "PRIVATE" { | |||
| s.DoNotSuggest = true | |||
| if a.Preview != "" { | |||
ilyakuz-db
approved these changes
Jun 5, 2026
Contributor
Approval status: pending
|
Collaborator
|
Commit: 7ca85f7
27 interesting tests: 15 SKIP, 7 KNOWN, 5 flaky
Top 29 slowest tests (at least 2 minutes):
|
pietern
requested changes
Jun 9, 2026
Generate the workspace and account command stubs from a checked-in .codegen/cli.json instead of reflecting over an external API spec, so codegen is reproducible from data committed to this repo. - internal/cligen: a self-contained, data-driven generator (model, templates, name/casing derivation) that renders the command stubs from cli.json - bundle/internal/schema: read API annotations (descriptions, enums, field behaviors) directly from cli.json; drop the OpenAPI pseudo-spec reconstruction and the raw-spec environment path - Taskfile: wire the cli.json-based generators into `task generate` - regenerate the committed codegen artifacts from cli.json Co-authored-by: Isaac
splitASCII drives every casing function and is a faithful port of genkit's Named.splitASCII, whose nearest-letter scanning produces several non-obvious splits (acronym head/tail handling, digits never starting a word). Pin those as a curated table so the port can't drift. Co-authored-by: Isaac
Pure move of the name-splitting engine (splitASCII and its condAtNearestLetters/searchNearest helpers) out of names.go so it sits next to split_test.go. The casing functions stay in names.go. Co-authored-by: Isaac
Co-authored-by: Isaac
Add table cases for the special-cased early returns in camelName/snakeName and the '$'-skip branch in splitASCII, bringing the pure name/casing logic to full statement coverage. Co-authored-by: Isaac
Switch the CLI to genkit's native cli_v1 producer (`genkit update-sdk`, mode cli_v1). The cli.json schema keys/refs now use the Go SDK's package.PascalName rendering and the file carries every message — including request/response wrappers, which are inert for the CLI since it reads only the schemas its commands reference. - derive DoNotSuggest from launch_stage == PRIVATE_PREVIEW instead of the dropped preview flag (cli_json.go, parser.go), sourcing the signal from the single launch-stage source of truth - Taskfile generate-cli-json: build genkit from universe HEAD and run update-sdk, since the cli_v1 producer is decoupled from the spec - regenerate annotations, jsonschema (+ for-docs), and docs; compute.Kind's description now resolves via the package.PascalName key - cli_json_test: assert the spec sha via the _openapi_sha file (genkit no longer writes it into cli.json metadata) Co-authored-by: Isaac
The cli_v1 producer emits go_v0 package.PascalName schema keys that match the Go SDK type names directly (e.g. serving.OpenAiConfig), so the Go-name-to-spec-name fixup is never reached. Regenerating the annotations, json schemas, and docs is byte-identical with it removed. Co-authored-by: Isaac
- drop the .codegen/cli.json entry from the test-task sources; cli.json changes are already covered by the dedicated cli.json/cligen tasks - restore the "Generating CLI code..." echo to match origin/main Co-authored-by: Isaac
a4089fd to
1a4d7eb
Compare
auto-merge was automatically disabled
June 9, 2026 23:04
Merge commits are not allowed on this repository
janniklasrose
commented
Jun 9, 2026
Read launch_stage, enum_launch_stages and enum_descriptions from the checked-in .codegen/cli.json and surface them in the generated bundle schema, docs and Python models: - Prefix field descriptions with [Public Preview] / [Beta] / [Private Preview] so the stage shows in editor hover tooltips and the generated docstrings. - Emit the parallel enumDescriptions array so VSCode renders a per-value stage label and description in autocomplete dropdowns. - Carry the raw x-databricks-launch-stage alongside the existing x-databricks-preview, and hide PRIVATE_PREVIEW fields via doNotSuggest. PreviewTag lives in bundle/internal/annotation as the single source of truth shared by the schema and docs generators. The PUBLIC_BETA label is "[Beta]" to match Databricks public documentation. cli.json is filtered upstream at min-stage=PRIVATE_PREVIEW, so no DEVELOPMENT surface reaches the extractor and launch_stage is already clean (GA plus the three preview stages). The OpenAPI-spec-based DEVELOPMENT filtering and preview normalization the earlier version carried are no longer needed. assignAnnotation flags an open question (in a comment) on whether either x-databricks-preview or x-databricks-launch-stage is consumed downstream of the published schema, pending confirmation with the team. Regenerated jsonschema.json, jsonschema_for_docs.json, annotations_openapi.yml, the bundle docs and the Python (pydabs) models. Co-authored-by: Isaac
Map ./bundle/schema/jsonschema.json onto databricks.yml / bundle.yml in .vscode/settings.json so the schema generated in this repo is the one the editor validates and autocompletes against. Co-authored-by: Isaac
1a4d7eb to
e69435c
Compare
janniklasrose
commented
Jun 10, 2026
Addresses review feedback: PreviewTagShort now lives alongside PreviewTag in bundle/internal/annotation, keeping the launch-stage label vocabulary in a single place. Pure refactor, no change to generated output. Co-authored-by: Isaac
Main now carries the merged 'Drive CLI codegen from a checked-in cli.json' (#5484), an evolved version of this branch's foundational commits: the cli.json contract types moved to the generated internal/clijson package, cligen consumes them via a transform, and Resolve() reports errors. Conflict resolution: - internal/cligen/*, Taskfile.yml, .codegen.json, main_test.go: took main's version; the branch carried no unique changes there. - bundle/internal/schema/cli_json.go: took main's version. The ad-hoc cliJSONField/cliJSONSchema decoding types are gone; clijson.SchemaJSON and SchemaFieldJSON already carry launch_stage, enum_launch_stages and enum_descriptions. - bundle/internal/schema/parser.go: hand-merged. Kept the launch-stage extraction (field-level launch_stage, enum launch stages/descriptions on enum schemas) on top of main's clijson types. Dropped the schema-level LaunchStage/Deprecated handling: the generated contract has no such fields, so those branches were dead. - Generated artifacts (annotations_openapi.yml, jsonschema*.json, docs, pydabs models): took main's version and regenerated with the merged code. Co-authored-by: Isaac
Drop PreviewTagShort and its [PrPr]/[PuPr] abbreviations: enum value labels in the autocomplete dropdown now use the same spelled-out [Private Preview]/[Public Preview] tags as field descriptions, keeping PreviewTag the single launch-stage formatter. With one formatter, enumDescriptionLabel reduced to the existing prefixWithPreviewTag (an empty GA tag falls through its HasPrefix guard and leaves the description untouched), so the helper is gone. Regenerated jsonschema.json and jsonschema_for_docs.json; the docs and pydabs models only ever used the long tags and are unchanged. Co-authored-by: Isaac
The pydabs-codegen run during the merge resolution re-synced the lockfile through a locally-configured pypi proxy (pypi-proxy.dev.databricks.com), swapping every registry URL and dropping the size fields. Only python/codegen/uv.lock was caught and reverted at the time; this one slipped into the merge commit staged. Co-authored-by: Isaac
Resolved the open question: neither x-databricks-preview nor x-databricks-launch-stage has external downstream consumers. In-repo, pydabs does read x-databricks-preview from jsonschema.json (experimental markers and private-field exclusion), so that extension stays. The raw launch stage had no consumer at all, so drop it from jsonschema.json and jsonschema_for_docs.json; the stage still surfaces as the description prefix and the per-value enumDescriptions labels. Both extensions originate solely from the parser-generated annotations_openapi.yml, and the parser pairs Preview PRIVATE with stage PRIVATE_PREVIEW, so the PRIVATE_PREVIEW doNotSuggest branches were redundant with the Preview ones and are gone too (doNotSuggest count in the schema is unchanged). Extension.LaunchStage had no remaining writer and is removed; the annotation Descriptor keeps its launch-stage fields as the pipeline input. Docs output is byte-identical. Co-authored-by: Isaac
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.
Stacked on #5484
Changes
Expose launch stage/release status in the bundle schema
Why
Non-GA fields should be annotated as such when viewing a bundle in IDEs.
Tests
Example vector search endpoint:
Enum with one GA, one PuPr:

PuPr field without any annotation:
