Skip to content

Commit a4089fd

Browse files
committed
Address review findings: regenerate docs/pydabs, align previewTag
Follow-up to the origin/main merge, addressing review feedback on stale generated artifacts and previewTag drift. - bundle/docsgen/main.go: previewTag had drifted from the schema-side copy in bundle/internal/schema/annotations.go — it still mapped DEVELOPMENT to [Development] and lacked the legacy x-databricks-preview PUBLIC -> [Public Preview] fallback. Aligned the two and noted the keep-in-sync invariant. - bundle/docsgen/output/{reference,resources}.md: regenerated. The docsgen launch-stage prefixes added on this branch had never been applied to the committed docs; they now match jsonschema.json (e.g. budget_policy_id is tagged [Public Preview], no [Development] markers leak). - python/databricks/bundles/**: regenerated via pydabs-codegen, which reads bundle/schema/jsonschema.json. Picks up the launch-stage prefixes and drops the DEVELOPMENT enum values filtered from the schema (catalog.Privilege loses CREATE_FEATURE/READ_FEATURE/etc.; pipelines.TransformerFormat loses AVRO/PROTOBUF), keeping the Python models consistent with the Go schema. - bundle/internal/schema/parser.go: defer creating the per-type annotation map until after the DEVELOPMENT early-return, so a DEVELOPMENT root type no longer leaves an empty package entry in annotations_openapi.yml. Co-authored-by: Isaac
1 parent eb68406 commit a4089fd

71 files changed

Lines changed: 829 additions & 816 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bundle/docsgen/main.go

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,12 @@ func assignAnnotation(s *jsonschema.Schema, a annotation.Descriptor) {
168168
// previewTag returns the human-readable launch-stage prefix to prepend to a
169169
// field's description. LaunchStage is preferred over Preview because it carries
170170
// the richer signal (Beta vs. Public Preview), falling back to the legacy
171-
// Preview field when only that's available.
171+
// Preview field when only that's available. DEVELOPMENT is intentionally not
172+
// surfaced — those fields are filtered out at extraction time, so reaching
173+
// this code path with DEVELOPMENT means something is wrong; the safe default
174+
// is to emit no tag rather than leak a [Development] marker into the docs.
175+
//
176+
// Keep this in sync with previewTag in bundle/internal/schema/annotations.go.
172177
func previewTag(launchStage, preview string) string {
173178
switch launchStage {
174179
case "PRIVATE_PREVIEW":
@@ -177,11 +182,12 @@ func previewTag(launchStage, preview string) string {
177182
return "[Public Beta]"
178183
case "PUBLIC_PREVIEW":
179184
return "[Public Preview]"
180-
case "DEVELOPMENT":
181-
return "[Development]"
182185
}
183-
if preview == "PRIVATE" {
186+
switch preview {
187+
case "PRIVATE":
184188
return "[Private Preview]"
189+
case "PUBLIC":
190+
return "[Public Preview]"
185191
}
186192
return ""
187193
}

bundle/docsgen/output/reference.md

Lines changed: 9 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)