Recognize ssh:// template URLs in bundle init - #5891
Merged
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
janniklasrose
had a problem deploying
to
test-trigger-is
July 10, 2026 07:38 — with
GitHub Actions
Failure
janniklasrose
temporarily deployed
to
test-trigger-is
July 10, 2026 07:38 — with
GitHub Actions
Inactive
janniklasrose
enabled auto-merge
July 10, 2026 07:39
Co-authored-by: Isaac
janniklasrose
temporarily deployed
to
test-trigger-is
July 10, 2026 07:43 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 10, 2026 07:43 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 10, 2026 07:46 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 10, 2026 07:46 — with
GitHub Actions
Inactive
Collaborator
Integration test reportCommit: c75c2e2
9 interesting tests: 4 RECOVERED, 4 SKIP, 1 flaky
Top 17 slowest tests (at least 2 minutes):
|
janniklasrose
temporarily deployed
to
test-trigger-is
July 12, 2026 18:37 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 12, 2026 18:37 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 12, 2026 18:43 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 12, 2026 18:43 — with
GitHub Actions
Inactive
shreyas-goenka
approved these changes
Jul 13, 2026
shreyas-goenka
left a comment
Contributor
There was a problem hiding this comment.
Did you test that this works end to end? Just to confirm that there's no missing bit needed here? Because we don't have any test coverage for this case.
Contributor
Author
|
@shreyas-goenka yes, I did but didn't add to the test section: Testing the unhappy path revealed that the unsupported protocols ( |
Collaborator
Integration test reportCommit: da7bd2b
36 interesting tests: 17 FAIL, 15 flaky, 2 SKIP, 1 KNOWN, 1 RECOVERED
Top 50 slowest tests (at least 2 minutes):
|
bradleyjamrozik-origindigital
pushed a commit
to Origin-Digital-LLC/databricks-cli
that referenced
this pull request
Jul 13, 2026
…atabricks#5902) ## Changes `databricks bundle init <url>` with an unsupported protocol previously fell through to the local-path reader and failed with a confusing error: ``` $ databricks bundle init https://github.com/databricks/cli.git Error: not a bundle template: expected to find a template schema file at databricks_template_schema.json ``` Now the deprecated/insecure transports (`http://`, `git://`, `ftp://`, `ftps://`) are recognized as Git URLs but flagged invalid, so `ResolveReader` returns an actionable error naming the supported protocols: ``` Error: unsupported protocol in Git URL "https://github.com/databricks/cli.git": only https://, ssh://, and git@ URLs are supported ``` `ResolveReader` now returns an `error`; both callers (`Resolver.Resolve` and the `render-template-schema` debug command) propagate it. ## Why Follow-up to databricks#5891. The fall-through behavior gave no hint that the protocol was the problem. ## Tests - Unit tests in `resolver_test.go` cover the invalid-protocol path in `ResolveReader`. - New acceptance test `bundle/templates-machinery/unsupported-url` asserts the CLI error. The error is raised at resolve time, before any network access, so no request mocking is needed. _This PR was written by Claude Code._
deco-sdk-tagging Bot
added a commit
that referenced
this pull request
Jul 15, 2026
## Release v1.8.0 ### Notable Changes * Auto-migrate a bundle from terraform to the direct engine when `bundle.engine` is `"direct"` (or `DATABRICKS_BUNDLE_ENGINE=direct`) and the post-deploy dry-run migration is clean; a warning is emitted if the dry-run surfaces errors or warnings so the automatic migration is skipped. ### CLI * experimental `ssh connect`: bare `python`/`pip` in an interactive session now resolve to the environment interpreter (`$DATABRICKS_VIRTUAL_ENV`) instead of the system or cluster-libraries interpreter, so packages installed in the environment are importable without extra setup. The interactive shell is now non-login (`bash -i`) and the server seeds a `~/.bashrc` snippet that re-prepends the environment's bin directory to `PATH` ([#5888](#5888)). * When Claude Code runs the CLI without the Databricks AI tooling installed, the CLI now prints a one-line recommendation on stderr to run `databricks aitools install`. The recommendation is shown at most once per hour per Claude session, and never for human callers or `aitools` commands. * Fixed `databricks auth describe` misattributing a profile selected via `DATABRICKS_CONFIG_PROFILE` as `(from bundle)` when run inside a bundle root ([#5904](#5904)). ### Bundles * `bundle generate` now warns when the generated configuration file is not matched by any pattern in the `include` section of `databricks.yml` ([#5868](#5868)). * direct: Match UC Auto Upgrade managed property defaults with a wildcard pattern instead of enumerating each key ([#5877](#5877)). * Recognize `ssh://` template URLs in `databricks bundle init` ([#5891](#5891)). * `databricks bundle init` now reports an actionable error when given a template URL with an unsupported protocol (`http://`, `git://`, `ftp://`, `ftps://`) instead of failing with a confusing "not a bundle template" message ([#5902](#5902)). * Added an `env:` section to `scripts.<name>` for declaring environment variables that may reference `${bundle.*}`, `${workspace.*}`, and `${var.*}` ([#4179](#4179), [#5299](#5299)).
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.