Skip to content

config-remote-sync: report skipped/failed status in JSON output and exit gracefully - #6383

Closed
ilyakuz-db wants to merge 2 commits into
databricks:mainfrom
ilyakuz-db:configsync-graceful-missing-state
Closed

config-remote-sync: report skipped/failed status in JSON output and exit gracefully#6383
ilyakuz-db wants to merge 2 commits into
databricks:mainfrom
ilyakuz-db:configsync-graceful-missing-state

Conversation

@ilyakuz-db

Copy link
Copy Markdown
Contributor

Changes

bundle config-remote-sync no longer hard-fails when there is nothing to sync. In JSON output mode it now emits a status field (success / skipped / failed) plus an error message and exits 0:

  • skipped — the deployment state is missing, or no --select-ids selector matched a deployed resource
  • failed — any other error
  • success — a diff was produced (possibly empty)

Text output mode is unchanged and still fails loudly (non-zero exit).

Why

The command is consumed by DABs in the Workspace through its JSON output. Treating "nothing to sync yet" (not deployed, or a stale selector) as a hard command failure is indistinguishable from a real error to the caller. Reporting it as skipped with a structured status lets the caller handle it gracefully. Telemetry still records the error message and category on every non-success path.

Tests

Added acceptance coverage for the skipped (missing state, no selector match) and failed JSON outcomes, plus a telemetry test confirming the error payload is still reported on the graceful exit-0 path. Existing JSON goldens updated.

This pull request and its description were written by Isaac.

…xit gracefully

Co-authored-by: Isaac <no-reply@databricks.com>
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

17 files changed
Suggested: @denik
Also eligible: @andrewnester, @anton-107, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

/bundle/ - needs approval

Files: bundle/configsync/output.go, bundle/configsync/select.go
Suggested: @denik
Also eligible: @andrewnester, @anton-107, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

/cmd/bundle/ - needs approval

Files: cmd/bundle/config_remote_sync.go
Suggested: @denik
Also eligible: @andrewnester, @anton-107, @janniklasrose, @lennartkats-db, @pietern, @shreyas-goenka

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

…tput

Co-authored-by: Isaac <no-reply@databricks.com>
@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: 6383
  • Commit SHA: 9cc10ec1c3eccf32e0ef5762fa011c1cf4e61fc6

Checks will be approved automatically on success.

@ilyakuz-db

Copy link
Copy Markdown
Contributor Author

Superseded by #6384 — recreated from a branch in databricks/cli (not a fork) so CI can access OIDC/JFrog secrets. Fork PRs fail setup at the OIDC token step.

@ilyakuz-db ilyakuz-db closed this Aug 26, 2026
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.

1 participant