Skip to content

Fix repos get/update/delete for Git-CLI-enabled folders - #6181

Merged
janniklasrose merged 7 commits into
mainfrom
GrantIsEaton/repos-git-cli-folders
Aug 5, 2026
Merged

Fix repos get/update/delete for Git-CLI-enabled folders#6181
janniklasrose merged 7 commits into
mainfrom
GrantIsEaton/repos-git-cli-folders

Conversation

@GrantIsEaton

Copy link
Copy Markdown
Collaborator

Changes

databricks repos get/update/delete <path> resolves the path argument to a repo ID via the workspace get-status API in repoArgumentToRepoID, then required the returned ObjectType to be exactly REPO. This drops that client-side object-type gate and uses the resolved object ID directly.

Why

Since the Git CLI rollout, Git-CLI-enabled folders are materialized as plain DIRECTORY nodes rather than REPO nodes. As a result get-status now returns ObjectType: DIRECTORY for them, and the strict != REPO check rejected valid repos with:

Error: object at path "/Workspace/Users/.../Testrepo" is not a repo

even though the underlying get repo / update repo / delete repo REST APIs still resolve those object IDs fine. The repos API is the authority on whether the target is a repo, so gating on the object type client-side is both redundant and now incorrect for Git CLI folders.

This was reported by a customer whose repos update/get broke on 2026-07-27 after the Git CLI rollout, and confirmed by the repos API owner ("remove the REPO type enforcement... whether it's a repo is enforced at the API layer anyways").

Tests

  • Updated acceptance/workspace/repos/get_errors to reflect that a non-repo path is no longer rejected client-side; the repos API returns not-found instead.
  • The testserver get-status fake now reports repos as DIRECTORY nodes (mirroring the post-rollout backend), so the existing path-based repos acceptance tests (delete_by_path, update) exercise the fix. Confirmed these fail with the old object-type gate restored and pass with it removed.

Note

Replaces #6122, which was opened from a fork. Same change, branch now in this repo so CI has full access.

This pull request and its description were written by Isaac.

GrantIsEaton and others added 5 commits July 31, 2026 21:01
repoArgumentToRepoID resolved a path via workspace get-status and then
required ObjectType == REPO. Since the Git CLI rollout, Git-CLI-enabled
folders are materialized as plain DIRECTORY nodes, so get-status returns
DIRECTORY and the gate rejected them with `object at path "..." is not a
repo` even though the repos API still resolves their object ID as a repo.

Drop the client-side object-type gate and let the repos API be the
authority, per the repos API owner's guidance. The testserver now reports
repos as DIRECTORY nodes so the path-based repos tests guard the fix.

Co-authored-by: Isaac
- testserver get-status now reports control-plane repos (under /Repos) as
  REPO and Git-CLI folders elsewhere as DIRECTORY, so both behaviors are
  covered rather than forcing every repo to DIRECTORY.
- Add acceptance test git_cli_folder covering path-based get/update/delete
  against a DIRECTORY-typed Git CLI folder; the /Repos tests keep exercising
  the REPO type.
- Trim the explanatory comment in repoArgumentToRepoID.
- Note in the changelog that Git CLI is a toggleable preview and can be
  turned off as a mitigation.

Co-authored-by: Isaac
The case existed to exercise the client-side `!= REPO` gate. With that gate
gone, it only tested that an arbitrary directory id isn't a registered repo,
which is not a behavior this change is about. The positive REPO and DIRECTORY
path-resolution tests cover the fix.

Co-authored-by: Isaac
Co-authored-by: Jan N Rose <janniklas.rose@gmail.com>
Added a reference to the related pull request for clarity.
@janniklasrose
janniklasrose enabled auto-merge August 5, 2026 20:48
@janniklasrose
janniklasrose disabled auto-merge August 5, 2026 21:24
@janniklasrose
janniklasrose merged commit 24aafba into main Aug 5, 2026
23 of 24 checks passed
@janniklasrose
janniklasrose deleted the GrantIsEaton/repos-git-cli-folders branch August 5, 2026 21:24
deco-sdk-tagging Bot added a commit that referenced this pull request Aug 6, 2026
## Release v1.11.0

### CLI

 * Fixed `databricks repos get/update/delete` failing with `object at path "..." is not a repo` for Git-CLI-enabled folders (currently in preview), which the workspace API reports as directories rather than repos ([#6181](#6181)).
 * Support `dbfs:/Skills/...` paths in `databricks fs` commands, routed to the Files API. ([#6147](#6147))

### Bundles

 * For jobs where `ai_runtime_task.code_source_path` is a relative path to a local directory, the directory is now packaged into a tarball (honoring `.gitignore` and `sync.include`/`sync.exclude`), uploaded during deployment, and `code_source_path` is rewritten to the uploaded workspace path. ([#6110](#6110))
 * Added JSON output to `bundle init`. Running `databricks bundle init <template> -o json` now reports the files the template wrote, relative to the output directory. This lets callers that pass `--output-dir` learn where the template materialized instead of assuming the output is a single directory named after the project. The default text output is unchanged. ([#6161](#6161))
 * The terraform deployment engine is deprecated and will stop working in a future version of the CLI. Setting `bundle.engine: terraform` now emits a deprecation warning. See https://docs.databricks.com/aws/en/dev-tools/bundles/direct for how to migrate to the direct deployment engine. ([#6099](#6099))
 * Fixed the direct deployment engine planning a spurious `create` for an empty `grants: []` list. Terraform records no grants resource for such a list, so `bundle plan` after `bundle deployment migrate` no longer reports an action for it. Emptying a previously deployed list still revokes the grants, after which the node is dropped from the deployment state instead of being reported as unchanged forever. ([#6039](#6039))
 * Fixed `bundle generate` downloading notebooks found inside a folder without their file extension. They are now exported like top-level notebooks, so a Python notebook lands as `notebook.py` instead of an extensionless file ([#6144](#6144)).
 * direct: `webhook_notifications.on_*` destinations on jobs, tasks, and `for_each_task` are now compared as unordered sets. Previously the Jobs API returning these lists in a different order than submitted produced a phantom diff that `bundle plan` and `bundle deploy` could never converge past, reporting `1 to change` on every run ([#6060](#6060)).
 * Fixed a pipeline with `allow_duplicate_names: true` never converging on the direct engine: the field is only accepted on create/update and is never returned by the pipelines GET API, so every subsequent `bundle plan` reported the pipeline as a perpetual update. ([#6076](#6076))
 * direct: A local change to an input-only field (one the API accepts on write but never returns on read, e.g. pipelines' `run_as` or external locations' `skip_validation`) is no longer silently skipped when the new value coincidentally matches the field's fabricated remote value. Previously such a change could hit the `remote_already_set` shortcut and be dropped from the plan. ([#6112](#6112))
 * Revert usage of RedactiveSenstiveFields (added in [#5896](#5896), released in 1.10.0) which lead to incorrect behaviour (permanent drift) for duration field in Postgres resources ([#6179](#6179)).
 * Document postgres resource fields in the json schema ([#6164](#6164), [#6163](#6163)).
 * direct: Recreating a `vector_search_indexes` resource no longer fails with "Index ... is currently pending deletion" when the backend has not yet released the index name. The create is now retried until the name becomes available. ([#6143](#6143))

### Dependency Updates

 * Bump `github.com/databricks/databricks-sdk-go` from v0.165.0 to v0.166.0. ([#6175](#6175))
 * Upgrade Terraform provider to 1.124.0. ([#6174](#6174))
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