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's addCacheVolume method returned ErrCacheVolumesDisabled for all single-destination volumes (e.g. /certs/client), causing them to be skipped entirely
  • The fix changes addCacheVolume to create a non-reusable volume when DisableCache is true, instead of returning an error — volumes are still mounted but not persisted across builds
  • Removed the now-unused ErrCacheVolumesDisabled error 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

Merge request reports

Loading