Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions acceptance/bundle/debug/fetch-repository-info/output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
>>> [CLI] bundle debug fetch-repository-info --path /Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]
{
"worktree_root": "/Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]",
"current_branch": "main",
"current_branch": "[BRANCH]",
"latest_commit": "[COMMIT_SHA]",
"origin_url": "https://github.com/databricks/bundle-examples"
"origin_url": "https://github.com/databricks/databricks-empty-ide-project"
}

=== a subdirectory of it, which resolves to the same root

>>> [CLI] bundle debug fetch-repository-info --path /Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]/subdir
{
"worktree_root": "/Workspace/Repos/[USERNAME]/test-repo-[UNIQUE_NAME]",
"current_branch": "main",
"current_branch": "[BRANCH]",
"latest_commit": "[COMMIT_SHA]",
"origin_url": "https://github.com/databricks/bundle-examples"
"origin_url": "https://github.com/databricks/databricks-empty-ide-project"
}

=== the root of a Git folder outside /Repos

>>> [CLI] bundle debug fetch-repository-info --path /Workspace/Users/[USERNAME]/test-folder-[UNIQUE_NAME]
{
"worktree_root": "/Workspace/Users/[USERNAME]/test-folder-[UNIQUE_NAME]",
"current_branch": "main",
"current_branch": "[BRANCH]",
"latest_commit": "[COMMIT_SHA]",
"origin_url": "https://github.com/databricks/bundle-examples"
"origin_url": "https://github.com/databricks/databricks-empty-ide-project"
}

=== a path in no Git folder at all
Expand Down
6 changes: 4 additions & 2 deletions acceptance/bundle/debug/fetch-repository-info/script
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# The fake workspace reports "main", which is this repo's default branch too.
url=https://github.com/databricks/bundle-examples
# A tiny repo: Repos clones synchronously inside POST /api/2.0/repos, and
# cloning a larger one (bundle-examples) intermittently exceeded the client's
# 90s inactivity timeout, mostly on GCP.
url=https://github.com/databricks/databricks-empty-ide-project

# A Git folder under /Repos and one outside it. Once a Git folder has Git CLI
# access the workspace API reports no git metadata for it, so both resolve
Expand Down
5 changes: 5 additions & 0 deletions acceptance/bundle/debug/fetch-repository-info/test.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ Env.MSYS_NO_PATHCONV = "1"
[[Repls]]
Old = '\b[0-9a-f]{40}\b'
New = '[COMMIT_SHA]'

# The fake workspace reports "main"; the real repo's default branch is "ide".
[[Repls]]
Old = '"current_branch": "(main|ide)"'
New = '"current_branch": "[BRANCH]"'
Loading