Report an actionable error for unsupported bundle init template URLs - #5902
Merged
janniklasrose merged 6 commits intoJul 13, 2026
Merged
Conversation
`databricks bundle init http://...` previously fell through to the local-path reader and failed with a confusing "not a bundle template" error. Recognize the deprecated/insecure transports (http, git, ftp[s]) as Git URLs but mark them invalid, so ResolveReader returns a clear error naming the supported protocols instead. Co-authored-by: Isaac
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:11 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:11 — with
GitHub Actions
Inactive
Co-authored-by: Isaac
- Build the "supported protocols" list in the error message from gitUrlPrefixes so it stays in sync with the recognized prefixes. - Use musterr in the acceptance test and cover every rejected protocol (http, git, ftp, ftps). - Make TestResolveReader table-driven over the supported (https, ssh, git@) and unsupported URL forms. Co-authored-by: Isaac
Asserts that ssh:// and git@ URLs are recognized as Git URLs and a clone is attempted, rather than being misread as local template paths. Uses a non-resolving .invalid host so the clone fails fast without network access, routes the platform-dependent git error to LOG, and asserts the invariant with contains.py. Co-authored-by: Isaac
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:27 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:27 — with
GitHub Actions
Inactive
Co-authored-by: Isaac
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:29 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:29 — with
GitHub Actions
Inactive
The acceptance harness captures output through pipes (not a TTY), so the CLI already suppresses color; NO_COLOR was a no-op copied from sibling tests. Co-authored-by: Isaac
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:32 — with
GitHub Actions
Inactive
janniklasrose
temporarily deployed
to
test-trigger-is
July 13, 2026 09:32 — with
GitHub Actions
Inactive
Collaborator
Integration test reportCommit: 666497a
10 interesting tests: 4 RECOVERED, 4 SKIP, 2 flaky
Top 10 slowest tests (at least 2 minutes):
|
janniklasrose
marked this pull request as ready for review
July 13, 2026 13:14
pietern
approved these changes
Jul 13, 2026
Collaborator
Integration test reportCommit: 8ebdcd2
12 interesting tests: 4 flaky, 2 KNOWN, 2 RECOVERED, 2 FAIL, 2 SKIP
Top 50 slowest tests (at least 2 minutes):
|
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
databricks bundle init <url>with an unsupported protocol previously fell through to the local-path reader and failed with a confusing error:Now the deprecated/insecure transports (
http://,git://,ftp://,ftps://) are recognized as Git URLs but flagged invalid, soResolveReaderreturns an actionable error naming the supported protocols:ResolveReadernow returns anerror; both callers (Resolver.Resolveand therender-template-schemadebug command) propagate it.Why
Follow-up to #5891. The fall-through behavior gave no hint that the protocol was the problem.
Tests
resolver_test.gocover the invalid-protocol path inResolveReader.bundle/templates-machinery/unsupported-urlasserts 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.