Skip to content

Fix bundle init error for symlinked template directories - #6405

Open
TangoEnSkai wants to merge 1 commit into
databricks:mainfrom
TangoEnSkai:fix-6391-template-directory-symlink
Open

Fix bundle init error for symlinked template directories#6405
TangoEnSkai wants to merge 1 commit into
databricks:mainfrom
TangoEnSkai:fix-6391-template-directory-symlink

Conversation

@TangoEnSkai

Copy link
Copy Markdown

Changes

Detect symlinks to directories while walking bundle templates and return an actionable error before writing output. Add unit and acceptance coverage and a changelog fragment.

Why

bundle init treated a symlinked directory as a file, failed with an internal read error, and left a partial output directory behind. This change reports that symlinked directories are unsupported and avoids partial output. Fixes #6391.

Tests

  • go test ./libs/template
  • go test ./acceptance -run TestAccept/bundle/templates-machinery/symlinked-directory -v
  • ./task fmt
  • ./task lint
  • ./task checks
  • ./task test passed all 9,475 unit tests; the full acceptance run was blocked only by the unrelated existing bundle/templates-machinery/supported-url SSH timeout in this local network.

This PR was written with OpenAI Codex.

@github-actions

Copy link
Copy Markdown
Contributor

An authorized user can trigger integration tests manually by following the instructions below:

Trigger:
go/deco-tests-run/cli

Inputs:

  • PR number: 6405
  • Commit SHA: 0a781ec754d1bbdb7d078e3fed4d694d459e5cb0

Checks will be approved automatically on success.

@github-actions

Copy link
Copy Markdown
Contributor

Approval status: pending

/acceptance/bundle/ - needs approval

7 files changed
Suggested: @denik
Also eligible: @janniklasrose, @andrewnester, @pietern, @lennartkats-db, @shreyas-goenka, @anton-107

/libs/template/ - needs approval

Files: libs/template/renderer.go, libs/template/renderer_test.go
Suggested: @denik
Also eligible: @janniklasrose, @andrewnester, @pietern, @lennartkats-db, @shreyas-goenka, @anton-107

General files (require maintainer)

Files: .nextchanges/bundles/template-directory-symlink.md
Based on git history:

  • @denik -- recent work in .nextchanges/bundles/, libs/template/

Any maintainer (@andrewnester, @anton-107, @denik, @pietern, @shreyas-goenka, @simonfaltum, @renaudhartert-db, @janniklasrose, @lennartkats-db, @rugpanov, @rclarey) can approve all areas.
See OWNERS for ownership rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant