Skip to content

Add an opt-in Git branch freshness check for bundle deployments - #7696

Open
idelafuente-oc wants to merge 1 commit into
databricks:mainfrom
idelafuente-oc:bundle/git-branch-freshness
Open

idelafuente-oc wants to merge 1 commit into
databricks:mainfrom
idelafuente-oc:bundle/git-branch-freshness

Conversation

@idelafuente-oc

@idelafuente-oc idelafuente-oc commented Nov 16, 2026 •

Copy link
Copy Markdown

Changes

Add experimental.check_git_branch_freshness to warn and request confirmation when the current branch is behind its upstream. The check also runs for saved-plan deployments.

Why

This helps prevent accidental deployments from stale branches. While a predeploy script can provide the same check, a built-in option may be simpler to configure and more consistent across platforms.

If freshness cannot be determined, deployment continues with a warning. Non-interactive deployments can use --auto-approve, which also approves other deployment actions.

This is an exploratory PR. Looking for feedback on whether this is something the Databricks CLI team would be interested in pursuing.

Tests

  • go test ./bundle/phases -run '^TestCheckGitBranchFreshness' -count=1 — passed.
  • go test ./acceptance -run '^TestAccept/bundle/deploy/git-freshness$' -count=1 — passed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@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

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: 7696
  • Commit SHA: 1f3fc335496631207536d022e6245b66ddf5d537

Checks will be approved automatically on success.

@github-actions github-actions Bot added the DABs DABs related issues label Nov 16, 2026

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.

1 participant