Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`bundle init` fails on a symlinked directory inside a template's `template/`

Aperta
#6,391 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@TangoEnSkai ci sta già lavorando.

Dal 27/8/2026.

  • #6405 di @TangoEnSkai — aperta
  • #6758 di @Vivek1106-04 — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
66/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go
Ambito
cli

Direzione di ricerca

Inizia dal template walker di bundle init e riproduci il malfunzionamento usando i comandi dell’issue. Traccia come viene classificato template/linked_dir e come viene creata la directory di output, quindi scegli e documenta il comportamento supportato per i symlink di directory. Il lavoro è completato quando l’inizializzazione non segnala più un errore interno di lettura né lascia un risultato parziale fuorviante, con una copertura per i symlink di directory e di file.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
Lingua principale
Go
Stelle
404
Fork
246
Merge medio
1g 11h
PR unite (30g)
268

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di databricks/cli

Tutte le issue di databricks/cli

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.