Skip to content

Drop stale PLACEHOLDER annotations that shadow upstream descriptions#5588

Open
janniklasrose wants to merge 10 commits into
mainfrom
janniklasrose/sync-missing-annotations
Open

Drop stale PLACEHOLDER annotations that shadow upstream descriptions#5588
janniklasrose wants to merge 10 commits into
mainfrom
janniklasrose/sync-missing-annotations

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Changes

description: PLACEHOLDER markers are now dropped when cli.json documents the field: newAnnotationHandler strips them before the merge, so the upstream description flows into the schema, and the sync step rewrites annotations.yml without them in the same run.

  • Placeholders for genuinely undocumented fields are kept (still the TODO marker).
  • Entries that also carry hand-written data (e.g. deprecation_message) lose only the placeholder.
  • Most of the diff is regeneration: annotations.yml −484 lines (deletions only); both schema artifacts gain 128 description lines (23 of which replace a bare launch-stage tag).

Why

A PLACEHOLDER means "no documentation anywhere". It is added when a field first appears undocumented, but nothing removed it once upstream docs arrived. The annotations file overrides upstream docs in the merge and PLACEHOLDER is skipped when assigning descriptions, so the schema ended up with no description at all — the stale marker hides the real text and then discards itself. 128 fields in the published schema were affected (e.g. vector_search_endpoints.*.target_qps). The file cannot self-heal: a shadowed field never registers as missing, so the backlog only grows.

This also fixes the bare [Public Preview] prefixes from the launch-stage work (#5443): the prefix was there, but the description it should prefix was swallowed by this bug.

Tests

  • Table test for the strip plus a handler-level test asserting the merged view resolves the upstream description while preserving hand-written fields.
  • TestRequiredAnnotationsForNewFields now also records deletes/updates during regeneration (previously a nil-visitor panic) and asserts regeneration of the committed file is a no-op, enforcing idempotency.
  • Re-verified after merging main: build, the bundle/internal/schema + annotation + bundle/... unit tests, the refschema acceptance test, and lint all pass; regeneration is byte-idempotent across runs.

This pull request and its description were written by Isaac, an AI coding agent.

pietern and others added 3 commits June 12, 2026 15:49
Drop the checked-in annotations_openapi.yml: the schema generator now
derives those annotations from .codegen/cli.json in memory on every run.
Merge annotations.yml and annotations_openapi_overrides.yml into a single
annotations.yml whose structure mirrors the bundle configuration tree.
Docs absent from the file inherit from cli.json; entries override them.

The generated jsonschema.json and jsonschema_for_docs.json are unchanged.

Co-authored-by: Isaac
A `description: PLACEHOLDER` marks a field that has no documentation
anywhere. It is added when a field first appears undocumented, but was
never removed when cli.json later gained a description for the field.
Because the annotations file overrides upstream docs in the merge, the
stale marker shadowed the real description, and since PLACEHOLDER is
skipped when assigning annotations, the schema emitted no description
at all (e.g. `vector_search_endpoints.*.target_qps`).

Strip such placeholders in newAnnotationHandler before the merge: the
upstream description shows through, and because the pruned map is what
syncWithMissingAnnotations writes back, the annotations file sheds the
stale markers in the same run. Entries that carry other hand-authored
fields (e.g. deprecation_message) lose only the placeholder. Fields
that are genuinely undocumented keep their TODO marker, so the result
is idempotent.

TestRequiredAnnotationsForNewFields now also records deletes and
updates during regeneration instead of nil-panicking on them, so any
future non-idempotent rewrite of annotations.yml fails with a message
instead of a panic.

Co-authored-by: Isaac
Co-authored-by: Isaac
Base automatically changed from rethink-annotations to main June 17, 2026 07:56
PR #5574 (the annotation consolidation this branch was stacked on) landed on
main, superseding the local consolidation commit. Resolved conflicts by taking
main's consolidation wholesale and re-applying the PLACEHOLDER-shadowing fix,
adapted to main's restructured types: annotation.File is now
map[string]TypeAnnotation{Self,Fields} and Descriptor dropped Preview and gained
LaunchStage/EnumLaunchStages/EnumDescriptions. Regenerated jsonschema.json,
jsonschema_for_docs.json, and annotations.yml.

Co-authored-by: Isaac
Comment thread bundle/internal/schema/annotations_test.go
Comment thread bundle/internal/schema/annotations.go
Replace the field-by-field enumeration with reflect.DeepEqual against a zero
Descriptor, so adding a Descriptor field can no longer silently break the
"is this entry droppable?" check after a stale placeholder is cleared.

Co-authored-by: Isaac
Dropping the stale PLACEHOLDER markers restored upstream descriptions in
jsonschema.json; pydabs-codegen reads that schema, so the generated Python
model docstrings were stale and the validate-generated CI job failed.
Regenerated via `task pydabs-codegen` (uv.lock churn reverted, as CI does).

Co-authored-by: Isaac
Comment thread bundle/internal/schema/annotations_test.go
Comment thread NEXT_CHANGELOG.md
@janniklasrose janniklasrose marked this pull request as ready for review June 17, 2026 08:53
@janniklasrose janniklasrose requested a review from pietern June 17, 2026 08:53
@janniklasrose janniklasrose enabled auto-merge June 17, 2026 09:24
@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: 00e9469

Run: 27677079533

Env 🟨​KNOWN 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
🟨​ aws linux 7 15 264 994 11:30
🔄​ aws windows 4 3 15 266 992 11:10
🔄​ aws-ucws linux 2 7 15 358 908 10:23
💚​ aws-ucws windows 7 15 362 906 11:50
💚​ azure linux 1 17 267 992 7:07
💚​ azure windows 1 17 269 990 8:02
💚​ azure-ucws linux 1 17 365 904 11:36
💚​ azure-ucws windows 1 17 367 902 9:54
💚​ gcp linux 1 17 263 995 7:39
💚​ gcp windows 1 17 265 993 9:28
24 interesting tests: 15 SKIP, 7 KNOWN, 2 flaky
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
🟨​ TestAccept 🟨​K 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/permissions 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions 🟨​K 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🔄​f 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/with_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🔄​f 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions 🟨​K 💚​R 💚​R 💚​R 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=direct 🟨​K 🔄​f 💚​R 💚​R
🟨​ TestAccept/bundle/resources/permissions/jobs/destroy_without_mgmtperms/without_permissions/DATABRICKS_BUNDLE_ENGINE=terraform 🟨​K 🔄​f 💚​R 💚​R
🙈​ TestAccept/bundle/resources/postgres_branches/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/replace_existing 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/update_protected 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_branches/without_branch_id 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_endpoints/recreate 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/postgres_projects/update_display_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/synced_database_tables/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/basic 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/grants/select 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🔄​ TestFsCpDir/dbfs_to_dbfs ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
🔄​ TestFsCpDir/local_to_dbfs ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
Top 26 slowest tests (at least 2 minutes):
duration env testname
4:56 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:55 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
4:26 gcp windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
4:18 gcp linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:56 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:52 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:32 azure-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:28 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:20 gcp windows TestAccept
3:13 aws-ucws windows TestAccept
3:05 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
3:02 aws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
3:02 azure windows TestAccept
2:56 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:50 aws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:48 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:48 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:47 azure-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:45 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:44 azure linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=terraform
2:42 aws-ucws windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:39 azure-ucws windows TestAccept
2:37 aws-ucws linux TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:36 azure windows TestAccept/bundle/resources/apps/inline_config/DATABRICKS_BUNDLE_ENGINE=direct
2:11 aws linux TestAccept/bundle/deploy/mlops-stacks/DATABRICKS_BUNDLE_ENGINE=direct
2:09 aws-ucws windows TestAccept/bundle/resources/model_serving_endpoints/basic/DATABRICKS_BUNDLE_ENGINE=terraform

Comment thread bundle/internal/schema/annotations.go Outdated
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.

3 participants