Fix stale extraction cleanup in cache-manager
After extraction, _restore_pgdata_permissions changes ownership to postgres (UID 105) with mode 700. On subsequent runs on the same builder, tar extraction fails because the runner (different UID) can't write to these directories. Add _cleanup_stale_extraction() that detects directories with permission issues and removes them before extraction. This prevents 'Permission denied' errors when reusing cached data across pipeline runs.
Loading
Please sign in to comment