Skip to content

Skip undeclared schema and catalog properties on plan - #7036

Open
yuri-rod wants to merge 6 commits into
databricks:mainfrom
yuri-rod:fix-6986-schema-properties
Open

yuri-rod wants to merge 6 commits into
databricks:mainfrom
yuri-rod:fix-6986-schema-properties

Conversation

@yuri-rod

@yuri-rod yuri-rod commented Oct 13, 2026 •

Copy link
Copy Markdown

Changes

Broaden the backend defaults rule for schemas and catalogs from managed default keys only to the full properties map. Add a planner test for remote-only properties on both resources.

Why

A bound schema with properties set outside the bundle and no properties in config planned an Update on every deploy. The SDK omits empty maps, so the update never cleared the remote values and the next plan showed the same diff. Skipping the map when saved state and config both declare none stops the repeat Update. Declared keys still diff and update. Fixes #6986.

Tests

Added TestSchemaCatalogRemoteOnlyPropertiesSkipped, including declared cases that must not skip. It failed before the change and passes after. Ran go test ./bundle/... and golangci-lint on bundle/direct with no failures. Ran the fixed binary on a test workspace against a schema created with properties owner root and a bundle that declares no properties. Bind succeeded, first deploy reported 1 unchanged, second deploy reported 1 unchanged, and plan reported 0 to change. Test schema was deleted after the run.

@yuri-rod
yuri-rod requested review from a team as code owners October 13, 2026 13:13
@yuri-rod
yuri-rod requested review from andrewnester and a balanced review from Copilot October 13, 2026 13:13
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! This pull request was opened from a fork.

If you're a member of the Databricks organization, please request access to the cli-contrib team and open your pull request from a branch in this repository instead of a fork — fork PRs don't run integration tests automatically and have reduced CI access.

If you're an external contributor, no action is needed; a maintainer will review your pull request.

@github-actions github-actions Bot added the DABs DABs related issues label Oct 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

A required changelog fragment is missing, and declared-property behavior needs explicit regression coverage.

3 open findings
What changed in this PR

Broadens schema and catalog backend-default handling to ignore undeclared remote properties and prevent repeated empty updates.

Changes:

  • Applies backend-default handling to entire properties maps.
  • Adds coverage for remote-only schema and catalog properties.
File Description
bundle/​direct/​dresources/​configs/​schemas.yml Broadens schema property handling.
bundle/​direct/​dresources/​configs/​catalogs.yml Broadens catalog property handling.
bundle/​direct/​bundle_plan_test.go Tests remote-only property suppression.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread bundle/direct/bundle_plan_test.go
Comment thread bundle/direct/dresources/configs/catalogs.yml
Comment thread bundle/direct/dresources/configs/schemas.yml
@yuri-rod

Copy link
Copy Markdown
Author

Changelog fragment .nextchanges/bundles/7036.md is on the current head. Local ./task check-changelog passes. The review ran on the prior commit before that file landed.

@yuri-rod

Copy link
Copy Markdown
Author

Runtime check retry on LAB: live workspace schema count is 1 (workspace.information_schema). Create still returns QUOTA_EXCEEDED with estimated count 52, limit 50. Bind and deploy steps cannot run until the estimate refreshes. Local unit and lint results in the PR description are unchanged.

@yuri-rod

Copy link
Copy Markdown
Author

Runtime check retry on LAB passed with the fixed binary. Created workspace.test6986_fixed_1791898212 with properties owner root, bound a bundle that declares no properties, first deploy reported 1 unchanged, second deploy reported 1 unchanged, plan reported 0 to change. Test schema deleted after the run. PR description Tests section updated to match.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused lifecycle-rule change matches the planner semantics and includes coverage for both affected resources.

0 open findings

3 resolved since last review

🧠 Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 7036
  • Commit SHA: 001008eed3bcbf13cbed217e3630e1f61396454d

Checks will be approved automatically on success.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DABs DABs related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bundle reports schema update for every deployment

2 participants