helmfile/pkg/remote
Aditya Menon c6b962dbbf
fix: include query params in HTTP getter cache key (#2399)
* fix: include query params in HTTP getter cache key (#2103)

When helmfile caches remote HTTP files fetched via the "normal" getter
(plain https:// URLs without a git:: prefix), the cache key did not
include query parameters. This caused URLs that differ only in query
params (e.g. ?ref=commit1 vs ?ref=commit2) to share the same cache
directory, silently returning the wrong file version.

The root cause was in Fetch() where the "normal" getter branch
overwrote the cache key with only scheme + host, discarding query
params that were correctly computed earlier.

Fix: extract the query-params suffix into a reusable variable and
apply it in both the default and "normal" getter cache key paths.

Signed-off-by: Aditya Menon <amenon@canarytechnologies.com>

* Update pkg/remote/remote.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aditya Menon <amenon@canarytechnologies.com>

* Update pkg/remote/remote_test.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Aditya Menon <amenon@canarytechnologies.com>

---------

Signed-off-by: Aditya Menon <amenon@canarytechnologies.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-14 09:31:53 +08:00
..
remote.go fix: include query params in HTTP getter cache key (#2399) 2026-02-14 09:31:53 +08:00
remote_test.go fix: include query params in HTTP getter cache key (#2399) 2026-02-14 09:31:53 +08:00
remote_windows_test.go fix: prevent local absolute paths from being treated as remote URLs (#2397) 2026-02-12 14:52:51 +08:00