compose/pkg/remote
Nicolas De Loof 2fcf79b3c1 fix(oci): put back only a complete entry when the replacement of a cache entry fails
A run whose replacement of a directory that is not an entry failed put
that directory back unconditionally. Another run having set aside the
entry that took its place in the meantime, the directory put back stood
in the way of the final rename of that run, whose deferred removal then
deleted the complete entry it had set aside: the cache ended with the
incomplete directory after a run returned success.

Only a complete entry is worth restoring, so the restore is guarded.

A run that loses to another may still return an error: the concurrency
test now pins the path of the entry for the runs that succeed, and the
state of the cache once all of them are over.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-11-05 17:58:58 +01:00
..
cache.go re-implement cache folder detection 2023-11-02 11:16:35 +01:00
cache_darwin.go add a copyright notice with original author 2023-11-02 11:16:35 +01:00
cache_unix.go feat(os): add FreeBSD support 2025-07-11 10:44:45 +02:00
cache_windows.go add a copyright notice with original author 2023-11-02 11:16:35 +01:00
git.go golangci-lint: use gci formatter instead of goimports 2025-12-01 12:21:50 +01:00
git_test.go fix(git): Add validation for Git subdirectory paths to prevent traversal 2025-10-30 10:08:29 +01:00
oci.go fix(oci): put back only a complete entry when the replacement of a cache entry fails 2026-11-05 17:58:58 +01:00
oci_cache_entry_test.go fix(oci): put back only a complete entry when the replacement of a cache entry fails 2026-11-05 17:58:58 +01:00
oci_test.go Test to check writeComposeFile detects invalid OCI artifact 2025-10-22 20:09:32 +02:00