mirror of
https://github.com/helm/helm.git
synced 2026-02-03 20:39:45 -05:00
When DownloadTo runs in parallel for the same ref and version, both processes try to write the same target file, causing "Access Denied" errors on Windows. This change refactors the file locking mechanism based on maintainer feedback: - Add LockedAtomicWriteFile to internal/fileutil package to encapsulate locking logic - Use the new function for both chart and provenance files - Lock is cross-process safe and automatically released on process exit - Files are only written if they don't already exist (avoiding duplicate work) The TestParallelDownloadTo test verifies the fix works correctly. Fixes #31633 Signed-off-by: Orgad Shaneh <orgad.shaneh@audiocodes.com> |
||
|---|---|---|
| .. | ||
| fileutil.go | ||
| fileutil_test.go | ||
| fileutil_unix.go | ||
| fileutil_windows.go | ||