Skip to content

Simplify bundle JSON schema annotation system#4670

Draft
shreyas-goenka wants to merge 3 commits intomainfrom
simplify-schema-annotations
Draft

Simplify bundle JSON schema annotation system#4670
shreyas-goenka wants to merge 3 commits intomainfrom
simplify-schema-annotations

Conversation

@shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Mar 5, 2026

Summary

  • Read OpenAPI descriptions directly from the spec at runtime instead of pre-extracting them into YAML files. The OpenAPI spec is now a requirement for schema generation.
  • Remove annotations_openapi.yml and annotations_openapi_overrides.yml which flip-flopped on every SDK bump. Merge manual overrides into a single annotations.yml.
  • Use bundle paths (e.g. resources.jobs.*) as annotation keys instead of Go type paths.
  • Remove bundle/docsgen. It was never used beyond the initial documentation scaffolding for our public docs.

Test plan

  • All schema tests pass
  • JSON schema output is identical (0 descriptions lost, 81 gained)
  • Schema generation is idempotent

🤖 Generated with Claude Code

Read OpenAPI descriptions directly from the spec at runtime instead of
pre-extracting them into annotation YAML files. This makes the OpenAPI
spec a requirement for schema generation and eliminates annotation files
that flip-flopped on every SDK bump.

Changes:
- Remove annotations_openapi.yml and annotations_openapi_overrides.yml
- Merge manual overrides into a single annotations.yml
- Use bundle paths (e.g. resources.jobs.*) as annotation keys instead
  of Go type paths
- Add path_mapping.go to resolve bundle paths to Go types via reflection
- Remove bundle/docsgen (was the only other consumer of annotations)
- Makefile schema targets now require DATABRICKS_OPENAPI_SPEC

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shreyas-goenka shreyas-goenka force-pushed the simplify-schema-annotations branch from 680bea6 to f79f5b0 Compare March 5, 2026 23:24
@shreyas-goenka shreyas-goenka marked this pull request as draft March 5, 2026 23:28
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Mar 5, 2026

Commit: 2f2a2d7

Run: 22742822080

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 8 7 268 779 7:35
🔄​ aws windows 3 6 7 269 777 8:29
💚​ aws-ucws linux 8 7 365 694 7:54
💚​ aws-ucws windows 8 7 367 692 7:57
16 interesting tests: 7 SKIP, 6 RECOVERED, 3 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows
🔄​ TestAccept 💚​R 🔄​f 💚​R 💚​R
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 💚​R 💚​R 💚​R 💚​R
💚​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestAccept/ssh/connection 💚​R 🔄​f 💚​R 💚​R
🔄​ TestApiGet ✅​p 🔄​f ✅​p ✅​p
Top 13 slowest tests (at least 2 minutes):
duration env testname
6:01 aws-ucws windows TestAccept/ssh/connection
5:07 aws linux TestAccept/ssh/connection
4:50 aws-ucws linux TestAccept/ssh/connection
3:52 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:14 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:09 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:53 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:48 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:47 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:43 aws-ucws linux TestAccept
2:26 aws linux TestAccept
2:15 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform

- Fix copyloopvar lint warnings in annotations.go
- Fix gofmt issue in path_mapping_test.go
- Use maps.Copy instead of manual loop
- Restore permission level enums, lifecycle descriptions,
  markdownDescription, and SDK type overrides from the deleted
  annotations_openapi_overrides.yml into annotations.yml
- Update getOpenApiAnnotations to check embedded types for
  promoted field descriptions from OpenAPI spec
- Update TestNoDetachedAnnotations to handle Go type path keys

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…qlWarehouse, and SDK types

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@shreyas-goenka shreyas-goenka deployed to test-trigger-is March 6, 2026 00:17 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants