Make launch stage the single preview source of truth in schema codegen#5611
Open
janniklasrose wants to merge 1 commit into
Open
Make launch stage the single preview source of truth in schema codegen#5611janniklasrose wants to merge 1 commit into
janniklasrose wants to merge 1 commit into
Conversation
Two follow-ups from #5443: Introduce an annotation.LaunchStage type with the known stages as named constants and a single source-of-truth tag map. The annotation parser now validates every launch_stage read from cli.json and fails codegen on an unrecognized stage, so a stage added upstream can't slip through unmapped. Drop the x-databricks-preview remnant. The published schema now carries x-databricks-launch-stage, emitted only for private-preview fields (where it sets doNotSuggest and the Python codegen reads it to mark fields experimental). Generated pydabs models are byte-identical; only the schema key and value change. Co-authored-by: Isaac
Contributor
Approval status: pending
|
Collaborator
Integration test reportCommit: ec13b40
22 interesting tests: 15 SKIP, 7 KNOWN
Top 27 slowest tests (at least 2 minutes):
|
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
Two follow-ups requested in the review of #5443:
LaunchStagetype + enforcement (comment). Introduce anannotation.LaunchStagenamed type with the known stages (GA,PUBLIC_PREVIEW,PUBLIC_BETA,PRIVATE_PREVIEW) as constants and a single source-of-truth tag map. The annotation parser now validates everylaunch_stageread from.codegen/cli.jsonand fails codegen with an actionable error on any unrecognized stage, so a stage introduced upstream can't silently render as GA — a human has to extend the mapping.Drop the
x-databricks-previewremnant (comment).x-databricks-previewexisted only as a remnant of previous codegen. The published schema now carriesx-databricks-launch-stageinstead, and the Python (pydabs) codegen reads the launch stage exclusively.Behavior
Behavior-preserving refactor — the set of hidden/experimental fields is unchanged:
jsonschema.json/jsonschema_for_docs.json: the 144x-databricks-preview: PRIVATEentries becomex-databricks-launch-stage: PRIVATE_PREVIEW;doNotSuggestis unchanged.annotations_openapi.yml: the derivedx-databricks-previewentries are dropped (x-databricks-launch-stagewas already present).python/databricks/bundles/**are byte-identical.Design note
x-databricks-launch-stageis emitted into the published schema only for the private-preview stage — the only stage any consumer acts on (doNotSuggestand pydabsexperimental). Other stages still surface as the description prefix and the per-valueenumDescriptionslabels, matching the original rationale in #5443 for keeping the published schema lean. Happy to emit every known stage instead if that's preferred.Testing
go test ./bundle/internal/... ./bundle/schema/... ./libs/jsonschema/...go test ./acceptance -run TestAccept/bundle/refschemapython/codegen/codegen_tests/)./task generate-schema,generate-schema-docs, andpydabs-codegen; verified the diffs are exactly thex-databricks-preview→x-databricks-launch-stageswap with no other churn.Follow-up to #5443.
This pull request and its description were written by Isaac, an AI coding agent.