Skip to content

Add LocalClient for filesystem-based blobstore#4980

Open
johha wants to merge 1 commit intomainfrom
local-blostore-client
Open

Add LocalClient for filesystem-based blobstore#4980
johha wants to merge 1 commit intomainfrom
local-blostore-client

Conversation

@johha
Copy link
Copy Markdown
Contributor

@johha johha commented Mar 30, 2026

Implements a pure Ruby filesystem blobstore client as an alternative to fog-local. This provides a lightweight, dependency-free option for local development and testing environments.

Key changes:

  • Add LocalClient and LocalBlob classes in lib/cloud_controller/blobstore/local/
  • Update ClientProvider to support 'local' and 'local-temp-storage' blobstore types
  • Add 'blobstore_type' configuration option to all config schemas (api, worker, clock, deployment_updater, blobstore_benchmarks)
  • Update config/cloud_controller.yml to use local-temp-storage as default
  • Add comprehensive specs for LocalClient and LocalBlob
  • LocalClient matches fog-local behavior including parent directory cleanup

The LocalClient implementation:

  • Stores blobs as files in a configurable directory
  • Supports all standard blobstore operations (exists?, cp_to_blobstore, download_from_blobstore, delete, etc.)
  • Automatically creates parent directories and cleans up empty ones on delete
  • Uses consistent logging with 'blobstore.cp-start/finish/skip' prefixes
  • Thread-safe file operations

Config parameters:

  • blobstore_type: local or blobstore_type: local-temp-storage
  • local_blobstore_path: Base directory (only for blobstore_type: local)

This enables simpler local development workflows without requiring S3-compatible blobstore or fog-local gem.

  • I have reviewed the contributing guide

  • I have viewed, signed, and submitted the Contributor License Agreement

  • I have made this pull request to the main branch

  • I have run all the unit tests using bundle exec rake

  • I have run CF Acceptance Tests

Implements a pure Ruby filesystem blobstore client as an alternative to fog-local. This provides a lightweight, dependency-free option for local development and testing environments.

Key changes:
- Add LocalClient and LocalBlob classes in lib/cloud_controller/blobstore/local/
- Update ClientProvider to support 'local' and 'local-temp-storage' blobstore types
- Add 'blobstore_type' configuration option to all config schemas (api, worker, clock, deployment_updater, blobstore_benchmarks)
- Update config/cloud_controller.yml to use local-temp-storage as default
- Add comprehensive specs for LocalClient and LocalBlob
- LocalClient matches fog-local behavior including parent directory cleanup

The LocalClient implementation:
- Stores blobs as files in a configurable directory
- Supports all standard blobstore operations (exists?, cp_to_blobstore, download_from_blobstore, delete, etc.)
- Automatically creates parent directories and cleans up empty ones on delete
- Uses consistent logging with 'blobstore.cp-start/finish/skip' prefixes
- Thread-safe file operations

This enables simpler local development workflows without requiring S3-compatible services or fog-local gem.
@johha johha marked this pull request as ready for review March 30, 2026 15:25
@johha johha requested review from a team March 30, 2026 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant