`bundle init` fails on a symlinked directory inside a template's `template/`
Maintainer thường phản hồi trong vòng 1 ngày
@TangoEnSkai đang làm issue này rồi.
Từ ngày 27/8/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 66/100
Hướng nghiên cứu
Bắt đầu với template walker của bundle init và tái hiện lỗi bằng các lệnh trong issue. Theo dõi cách template/linked_dir được phân loại và cách thư mục đầu ra được tạo, sau đó chọn và ghi lại hành vi được hỗ trợ đối với symlink thư mục. Hoàn thành khi quá trình khởi tạo không còn báo lỗi đọc nội bộ hoặc để lại kết quả một phần gây hiểu nhầm, đồng thời có coverage cho symlink thư mục và symlink tệp.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
A template whose template/ tree contains a symlink to a directory fails to initialize. Symlinks to files work fine. The error comes from the template walker reading the link as a regular file.
Reproduction
mkdir -p tpl/template/shared out
cat > tpl/databricks_template_schema.json <<'JSON'
{"properties": {"name": {"type": "string", "default": "x", "description": "a name"}}}
JSON
echo 'hello' > tpl/template/shared/file.txt.tmpl
ln -s shared tpl/template/linked_dir
databricks bundle init ./tpl --config-file <(echo '{"name":"x"}') --output-dir out
Actual
Error: read /path/to/tpl/template/linked_dir: is a directory
It also leaves a partial result behind: out/linked_dir is created as an empty directory before the failure.
Expected
Either the walker follows the symlink and renders the directory's contents, or it reports that symlinked directories are unsupported in templates. The current message describes an internal read failure rather than the unsupported construct, which makes it hard to act on.
Control: file symlinks work
Replacing the directory symlink with a file symlink succeeds:
rm tpl/template/linked_dir
ln -s shared/file.txt.tmpl tpl/template/linked_file.txt.tmpl
databricks bundle init ./tpl --config-file <(echo '{"name":"x"}') --output-dir out
# ✨ Successfully initialized template
# out/linked_file.txt, out/shared/file.txt
Why it matters
template_dir resolves exactly one hop and replaces a template's local template/ rather than overlaying it, so a template that points at a shared tree cannot also contribute files of its own. Symlinks are the natural way to share machinery between sibling templates while each keeps its own content. File-level symlinks make that work, but because directory symlinks don't, a nested output path has to be recreated in every template and every shared leaf file linked individually.
Worth noting that the surrounding platform handles symlinked directories fine: Databricks Git folders materialize them as SYMLINK objects, and the /Workspace FUSE mount resolves them including directory traversal. The limitation is specific to the template walker.
Environment
- Databricks CLI v1.13.0
- macOS (darwin), also relevant on the Linux driver via
/Workspace
- Ngôn ngữ chính
- Go
- Star
- 404
- Fork
- 246
- Merge trung bình
- 1 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 281
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Không có hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của databricks/cli
-
Apps commands only accept relative path to app.ymlCó thể đã có người làm @yuri-rod đã nhận 5 ngày trước. Đang mởCLI
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
databricks/cli#6910 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
databricks/cli#6670 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 18/100
databricks/cli#7002 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
DABs
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
databricks/cli#6986 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
databricks/cli#6978 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của databricks/cli
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
open-telemetry/opentelemetry-go-compile-instrumentation#1467 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
bug: a request sent before initialize is answered with JSON-RPC error code 0 instead of -32600Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
modelcontextprotocol/go-sdk#1367 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Python 3.15 supportCó thể đã có người làm @amnesiaof đã nhận hôm nay. Đang mởL: python L: python:uv
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dependabot/dependabot-core#16524 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
duplication
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
openvibely/openvibely#1443 ·
Maintainer thường phản hồi trong vòng 2 ngày