Skip to content

Recognize ssh:// template URLs in bundle init#5891

Open
janniklasrose wants to merge 4 commits into
mainfrom
janniklasrose/bundle-init-git-clone-url
Open

Recognize ssh:// template URLs in bundle init#5891
janniklasrose wants to merge 4 commits into
mainfrom
janniklasrose/bundle-init-git-clone-url

Conversation

@janniklasrose

@janniklasrose janniklasrose commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Changes

gitUrlPrefixes in libs/template/resolver.go only recognized https:// and git@, which is incomplete relative to the git URL spec. This adds ssh:// so databricks bundle init clones templates from SSH-transport URLs. git://, http://, and ftp[s]:// are deliberately excluded as deprecated/insecure protocols.

Also renames IsRepoUrl to IsGitRepoUrl and simplifies it to return directly on the first matching prefix.

Why

Closes #5881: SSH-transport template URLs were not recognized and fell through to the local-path reader. For non git@ prefixed SSH URLs customers could not use the command.

Tests

Unit test TestBundleInitIsGitRepoUrl updated to cover the supported (https://, ssh://, git@) and unsupported (git://, http://, ftp[s]://, local paths) forms. No acceptance test exercises git-URL detection.

This PR was written by Claude Code.

gitUrlPrefixes was incomplete relative to the git URL spec
(https://git-scm.com/docs/git-clone#_git_urls). Add ssh:// so that
`databricks bundle init` clones from SSH-transport URLs. Also rename
IsRepoUrl to IsGitRepoUrl and simplify it to return directly on match.

Fixes #5881

Co-authored-by: Isaac
@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/libs/template/ - needs approval

Files: libs/template/resolver.go, libs/template/resolver_test.go
Suggested: @denik
Also eligible: @pietern, @anton-107, @andrewnester, @shreyas-goenka, @lennartkats-db

General files (require maintainer)

Files: NEXT_CHANGELOG.md
Based on git history:

  • @denik -- recent work in ./

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

@eng-dev-ecosystem-bot

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: a09fed7

Run: 29077714517

Env 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1077 5:28
💚​ aws windows 4 4 232 1075 7:15
💚​ aws-ucws linux 4 4 314 995 5:13
💚​ aws-ucws windows 4 4 316 993 7:00
💚​ azure linux 4 4 230 1076 4:59
💚​ azure windows 4 4 232 1074 7:00
💚​ azure-ucws linux 4 4 316 992 6:36
💚​ azure-ucws windows 4 4 318 990 7:12
💚​ gcp linux 4 4 229 1078 5:14
💚​ gcp windows 4 4 231 1076 6:53
8 interesting tests: 4 RECOVERED, 4 SKIP
Test Name aws linux aws windows aws-ucws linux aws-ucws windows azure linux azure windows azure-ucws linux azure-ucws windows gcp linux gcp windows
💚​ TestAccept 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
🙈​ TestAccept/bundle/invariant/no_drift 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_endpoints/drift/recreated_same_name 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/bundle/resources/vector_search_indexes/recreate/embedding_dimension 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
🙈​ TestAccept/ssh/connection 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S 🙈​S
💚​ TestFetchRepositoryInfoAPI_FromRepo 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/root 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
💚​ TestFetchRepositoryInfoAPI_FromRepo/subdir 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R 💚​R
Top 11 slowest tests (at least 2 minutes):
duration env testname
6:19 aws windows TestAccept
6:11 azure-ucws windows TestAccept
6:01 azure windows TestAccept
6:00 aws-ucws windows TestAccept
5:59 gcp windows TestAccept
3:00 gcp linux TestAccept
2:57 aws linux TestAccept
2:54 azure-ucws linux TestAccept
2:51 azure linux TestAccept
2:45 aws-ucws linux TestAccept
2:10 azure-ucws linux TestSecretsPutSecretStringValue

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.

cli bundle init ssh support

2 participants