Recognize ssh:// template URLs in bundle init#5891
Open
janniklasrose wants to merge 4 commits into
Open
Conversation
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
Co-authored-by: Isaac
Contributor
Approval status: pending
|
Co-authored-by: Isaac
Collaborator
Integration test reportCommit: a09fed7
8 interesting tests: 4 RECOVERED, 4 SKIP
Top 11 slowest tests (at least 2 minutes):
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
gitUrlPrefixesinlibs/template/resolver.goonly recognizedhttps://andgit@, which is incomplete relative to the git URL spec. This addsssh://sodatabricks bundle initclones templates from SSH-transport URLs.git://,http://, andftp[s]://are deliberately excluded as deprecated/insecure protocols.Also renames
IsRepoUrltoIsGitRepoUrland 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
TestBundleInitIsGitRepoUrlupdated 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.