Skip to content

fix(helm): follow directory symlinks when hashing charts#39

Merged
alindeman merged 1 commit into
chime:mainfrom
alindeman:descend-symlinks
May 6, 2026
Merged

fix(helm): follow directory symlinks when hashing charts#39
alindeman merged 1 commit into
chime:mainfrom
alindeman:descend-symlinks

Conversation

@alindeman
Copy link
Copy Markdown
Contributor

Summary

sumFiles skipped any directory symlink it encountered, so charts that share content via symlinked directories had cache keys blind to changes inside the symlink target. Reworks the walker to descend through directory symlinks while keeping behavior for symlink-free charts byte-identical.

Non-obvious context

  • Hash keys are the as-seen path, not the resolved real path. Intentional: existing exact-hash regression tests (GenerateHashOnChart, GenerateHash) stay valid and downstream stored hashes for symlink-free charts don't roll.
  • Cycle detection uses resolved real paths; cycles are skipped with a log line.
  • Broken symlinks return a hard error.

Tests

New TestHelm sub-tests cover dir-symlink follow, cycle (loop -> .), and broken-symlink error. Pre-existing exact-hash tests act as the regression gate for symlink-free input.

Fixes #35

Assisted-by: Opus 4.7 via Claude Code

sumFiles previously skipped directory symlinks, leaving the chart hash blind to content changes inside the symlink target. The new walker enqueues each directory symlink as a fresh filepath.Walk job with cycle detection on resolved real paths and a hard error on broken symlinks. Hash keys remain the as-seen path so existing exact-hash regression tests stay valid.

Fixes chime#35

Assisted-by: Opus 4.7 via Claude Code
@alindeman alindeman requested a review from a team as a code owner May 4, 2026 21:31
@alindeman alindeman merged commit 9366600 into chime:main May 6, 2026
2 checks passed
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.

Symlinks in helm charts are not handled properly

2 participants