`bundle init` fails on a symlinked directory inside a template's `template/`
Maintainer antworten meist innerhalb von 1 Tag
@TangoEnSkai arbeitet bereits daran.
Seit 27.8.2026.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 66/100
Rechercherichtung
Beginne mit dem bundle init-Template-Walker und reproduziere den Fehler mit den im Issue angegebenen Befehlen. Verfolge, wie template/linked_dir klassifiziert wird und wie das Ausgabeverzeichnis erstellt wird, und wähle anschließend das unterstützte Verhalten für Verzeichnis-Symlinks aus und dokumentiere es. Die Aufgabe ist erledigt, wenn die Initialisierung keinen internen Lesefehler mehr meldet und kein irreführendes Teilergebnis hinterlässt und wenn Verzeichnis- und Datei-Symlinks durch Tests abgedeckt sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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
- Vorherrschende Sprache
- Go
- Sterne
- 409
- Forks
- 253
- Ø Merge
- 1 T. 14 Std.
- Gemergte PRs (30 T.)
- 184
Entwicklungsumgebung
- Enthält ein Dockerfile oder eine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus databricks/cli
-
Apps commands only accept relative path to app.ymlEvtl. vergeben @yuri-rod hat das vor 22 Tagen übernommen. OffenCLI
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
databricks/cli#6910 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
databricks/cli#6670 · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
bundle validate does not catch missing trigger.table_update.condition with multiple tablesEvtl. vergeben @yuri-rod hat das vor 7 Tagen übernommen. OffenDABs Enhancement
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 72/100
databricks/cli#7101 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7100 ·
Maintainer antworten meist innerhalb von 1 Tag
-
DABs Enhancement
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
databricks/cli#7099 ·
Maintainer antworten meist innerhalb von 1 Tag
Ähnliche Issues
-
meta
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 64/100
last9/last9-mcp-server#443 ·
Maintainer antworten meist innerhalb von 2 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 83/100
ray-project/kuberay#5454 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
FootprintAI/Containarium#3182 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug from-studio
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
esengine/DeepSeek-Reasonix#14608 ·
Maintainer antworten meist innerhalb von 1 Tag
-
triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
getarcaneapp/arcane#4590 ·
Maintainer antworten meist innerhalb von 1 Tag