Expose stage/release status in schema#5443
Conversation
| @@ -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 != "" { | |||
Approval status: pending
|
|
Commit: e6b64cd
22 interesting tests: 15 SKIP, 7 RECOVERED
Top 31 slowest tests (at least 2 minutes):
|
a4089fd to
1a4d7eb
Compare
Merge commits are not allowed on this repository
| case "PRIVATE_PREVIEW": | ||
| return "[PrPr]" | ||
| case "PUBLIC_BETA": | ||
| return "[Beta]" | ||
| case "PUBLIC_PREVIEW": | ||
| return "[PuPr]" |
There was a problem hiding this comment.
PrPr and PuPr aren't used in Databricks public documentation, but for space-constrained values I think it's still more appropriate. wdyt @juliacrawf-db ?
There was a problem hiding this comment.
Honestly I think those are very Databricks-internally-specific acronyms and we shouldn't be putting them in public facing content/APIs/source because the meaning isn't super obvious. Ideally it's PublicPreview and PrivatePreview, but if it's constrained maybe PrivatePr and PublicPr (imo the private/public part seems more important to expand)? (Or do you need it to be even shorter?)
There was a problem hiding this comment.
Hmm... now I'm having second thoughts about that...because "Pr" likely will get translated as PR in this context...
| // field's description. cli.json is filtered at min-stage=PRIVATE_PREVIEW | ||
| // upstream, so DEVELOPMENT never reaches here and GA yields no tag. | ||
| // | ||
| // Keep this in sync with previewTag in bundle/docsgen/main.go. |
There was a problem hiding this comment.
why two sources of truth?
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
|
|
||
| // previewTagShort is the compact counterpart to previewTag, used for per-enum- | ||
| // value labels where vertical space in the dropdown is tighter. | ||
| func previewTagShort(launchStage string) string { |
There was a problem hiding this comment.
move to annotation.PreviewTagShort
| // derivable from it (PRIVATE iff PRIVATE_PREVIEW) and is kept only for | ||
| // backwards compatibility, so PRIVATE_PREVIEW must hide the field here too. | ||
| // | ||
| // OPEN QUESTION (confirm with the team before finalizing this PR): is |
There was a problem hiding this comment.
open question
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
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:
