Fix disable_cache disabling all volumes instead of only cache
Summary
Fixes the disable_cache configuration option incorrectly disabling all Docker-managed volumes, not just cache volumes.
- When
disable_cache = true, the volume manager'saddCacheVolumemethod returnedErrCacheVolumesDisabledfor all single-destination volumes (e.g./certs/client), causing them to be skipped entirely - The fix changes
addCacheVolumeto create a non-reusable volume whenDisableCacheis true, instead of returning an error — volumes are still mounted but not persisted across builds - Removed the now-unused
ErrCacheVolumesDisablederror and its handling in the Docker executor - Updated tests to verify volumes are created (not skipped) when cache is disabled
Closes #37785 (closed)
Edited by Aaron Döppner