Skip to content

Remove fog-aws and fog-core, complete fog removal - #5288

Merged
kathap merged 1 commit into
mainfrom
remove-fog-aws
Jul 28, 2026
Merged

Remove fog-aws and fog-core, complete fog removal#5288
kathap merged 1 commit into
mainfrom
remove-fog-aws

Conversation

@kathap

@kathap kathap commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Remove the last remaining fog gems (fog-aws, fog-core) and all fog blobstore code. All other fog gems (fog-azure-rm, fog-google, fog-aliyun) were previously removed. storage-cli is the default blobstore backend and has fully replaced fog. Removing fog-aws and fog-core also drops their transitive deps (fog-json, fog-xml), completing the fog removal and reducing Dependabot maintenance burden.

A short explanation of the proposed change

This change removes the last two fog gems (fog-aws, fog-core) and deletes all remaining fog-based blobstore code from the Cloud Controller. The fog client, blob, CDN, and provider classes under lib/cloud_controller/blobstore/fog/ are deleted, and the fog branch is removed from the blobstore ClientProvider so storage-cli is now the sole blobstore backend. All fog_connection / fog_aws_storage_options config keys are dropped from the config schemas and YAML fixtures, and the legacy fog-provider translation (AWS→s3, webdav→dav) is removed from StorageCliClient.

The test suite is migrated off fog accordingly: Fog.mock! and AWS credential fixtures are replaced with a real local blobstore, blob test-doubles that pointed at the deleted FogBlob now use LocalBlob, and two shared contexts ('a remote blobstore', 'a seeded empty-file resource') centralize the setup that fog's global mock used to provide implicitly. A few local-blobstore correctness fixes surfaced during the migration are included (LocalBlob#content_length returns an Integer, LocalClient#delete_all respects root_dir).

An explanation of the use cases your change solves

  • Completes the fog removal effort. fog-azure-rm, fog-google, and fog-aliyun were already removed; this drops the final fog-aws/fog-core dependencies (and their transitive fog-json/fog-xml), so the codebase no longer ships or loads any fog code.
  • Reduces maintenance and security burden. Eliminating the fog gems removes a recurring source of Dependabot/CVE churn from unmaintained transitive dependencies.
  • Single, consistent blobstore backend. With storage-cli as the only backend, operators no longer configure fog_connection; blobstore behavior is uniform across AWS/GCS/Azure/WebDAV via storage-cli, simplifying configuration and the code paths that had to branch on fog vs. storage-cli.
  • Keeps the test suite honest. Tests now exercise the real local blobstore instead of fog's in-memory mock, so blobstore behavior under test matches what actually ships.

Changes:

  • Remove fog-aws and fog-core from Gemfile/Gemfile.lock (drops transitive fog-json, fog-xml)
  • Delete lib/cloud_controller/blobstore/fog/ entirely (FogClient, FogBlob, Cdn, providers)
  • Remove the fog branch and require from blobstore ClientProvider
  • Remove fog_connection / fog_aws_storage_options config keys from all schemas (api, worker, clock, deployment_updater, blobstore_benchmarks) and YAML
    fixtures (cloud_controller.yml, bosh-lite.yml, port_8181_config.yml)
  • Remove legacy fog provider translation from StorageCliClient (AWS→s3, webdav→dav)
  • Fix LocalBlob#content_length to return Integer instead of String
  • Fix LocalClient#delete_all to respect root_dir
  • Add require 'null_blob' to null_client.rb (fog specs previously loaded it transitively)
  • Update README and ADR-0014; drop deleted fog paths from .rubocop_todo.yml

Test infrastructure (fog → local blobstore):

  • Replace Fog.mock! and AWS fog_connection credentials with local blobstore config in spec_helper_helper.rb and test_config.rb
  • Add spec/support/blobstore/shared_contexts.rb — 'a remote blobstore' (non-local blobstore stub for redirect tests) and 'a seeded empty-file resource'
    (resource-pool SHA seed)
  • Update blob doubles from the deleted FogBlob to LocalBlob across affected specs
  • Delete all fog specs under spec/unit/lib/cloud_controller/blobstore/fog/

@kathap
kathap force-pushed the remove-fog-aws branch 5 times, most recently from 731f1cd to d4349f3 Compare July 14, 2026 15:21
@kathap kathap changed the title Remove fog-aws gem and all fog AWS blobstore support Remove fog gems and all fog blobstore support Jul 16, 2026
@kathap kathap changed the title Remove fog gems and all fog blobstore support Remove fog-aws and fog-core, complete fog removal Jul 17, 2026
@johha
johha self-requested a review July 20, 2026 09:32
@kathap
kathap marked this pull request as draft July 21, 2026 13:22
@kathap
kathap force-pushed the remove-fog-aws branch 2 times, most recently from 711500f to 2900756 Compare July 27, 2026 10:55
@kathap
kathap marked this pull request as ready for review July 27, 2026 12:25

@johha johha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

storage-cli is now the sole blobstore backend. Delete the fog blobstore
classes, remove the fog branch from ClientProvider, and drop fog_connection
config keys and the transitive fog-json/fog-xml deps. Migrate tests off
Fog.mock! to a real local blobstore.
@kathap
kathap merged commit 8d562d8 into main Jul 28, 2026
11 checks passed
ari-wg-gitbot added a commit to cloudfoundry/capi-release that referenced this pull request Jul 28, 2026
Changes in cloud_controller_ng:

- Remove fog-aws and fog-core gems and all fog blobstore code
    PR: cloudfoundry/cloud_controller_ng#5288
    Author: Katharina Przybill <30441792+kathap@users.noreply.github.com>
@moleske
moleske deleted the remove-fog-aws branch July 28, 2026 15:12
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.

2 participants