Skip to content

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

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

Recognize ssh:// template URLs in bundle init#5891
janniklasrose wants to merge 7 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

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Approval status: pending

/libs/template/ - needs approval

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

General files (require maintainer)

Files: .nextchanges/bundles/bundle-init-git-clone-url.md
Based on git history:

  • @pietern -- recent work in libs/template/

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

eng-dev-ecosystem-bot commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Integration test report

Commit: c75c2e2

Run: 29204410462

Env 🔄​flaky 💚​RECOVERED 🙈​SKIP ✅​pass 🙈​skip Time
💚​ aws linux 4 4 230 1078 9:19
💚​ aws windows 4 4 232 1076 6:52
💚​ aws-ucws linux 4 4 316 995 5:30
🔄​ aws-ucws windows 1 4 4 317 993 7:42
💚​ azure linux 4 4 230 1077 7:11
💚​ azure windows 4 4 232 1075 7:48
💚​ azure-ucws linux 4 4 318 992 14:25
💚​ azure-ucws windows 4 4 320 990 7:26
💚​ gcp linux 4 4 229 1079 9:35
💚​ gcp windows 4 4 231 1077 7:34
9 interesting tests: 4 RECOVERED, 4 SKIP, 1 flaky
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
🔄​ TestSyncIncrementalFileOverwritesFolder ✅​p ✅​p ✅​p 🔄​f ✅​p ✅​p ✅​p ✅​p ✅​p ✅​p
💚​ 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 17 slowest tests (at least 2 minutes):
duration env testname
7:32 gcp linux TestSecretsPutSecretStringValue
7:04 aws linux TestSecretsPutSecretStringValue
6:44 azure-ucws linux TestSQLExecScalar
6:40 gcp windows TestAccept
6:40 azure windows TestAccept
6:32 aws-ucws windows TestAccept
6:16 azure-ucws windows TestAccept
5:54 aws windows TestAccept
4:51 azure linux TestSecretsPutSecretStringValue
4:40 azure-ucws linux TestSecretsPutSecretStringValue
3:35 azure-ucws windows TestSQLExecScalar
3:11 gcp windows TestSecretsPutSecretStringValue
2:59 gcp linux TestAccept
2:53 azure linux TestAccept
2:51 aws linux TestAccept
2:49 azure-ucws linux TestAccept
2:48 aws-ucws linux TestAccept

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