Skip to content

Commit 02b36c9

Browse files
committed
Remove fog-aws and fog-core gems and all fog blobstore code
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.
1 parent b007384 commit 02b36c9

65 files changed

Lines changed: 204 additions & 1849 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.rubocop_todo.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Lint/SuppressedException:
6262
- 'lib/cloud_controller/database_uri_generator.rb'
6363
- 'lib/vcap/pid_file.rb'
6464
- 'spec/unit/actions/v2/route_create_spec.rb'
65-
- 'spec/unit/lib/cloud_controller/blobstore/fog/fog_client_spec.rb'
6665
- 'spec/unit/lib/services/service_brokers/service_broker_registration_spec.rb'
6766
- 'spec/unit/models/services/service_broker_spec.rb'
6867

@@ -581,7 +580,6 @@ Style/HashSlice:
581580
- 'app/controllers/services/service_instances_controller.rb'
582581
- 'app/controllers/services/service_plans_controller.rb'
583582
- 'app/presenters/system_environment/service_binding_presenter.rb'
584-
- 'lib/cloud_controller/blobstore/fog/fog_blob.rb'
585583
- 'lib/cloud_controller/blobstore/storage_cli/storage_cli_blob.rb'
586584
- 'lib/cloud_controller/blobstore/webdav/dav_blob.rb'
587585
- 'lib/cloud_controller/telemetry_logger.rb'

Gemfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ gem 'actionview', '~> 8.1.3'
4040
gem 'activemodel', '~> 8.1.2'
4141
gem 'railties', '~> 8.1.1'
4242

43-
gem 'fog-aws'
44-
gem 'fog-core', '~> 2.6.0'
45-
4643
gem 'cf-uaa-lib', '~> 4.0.10'
4744

4845
group :db do

Gemfile.lock

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,6 @@ GEM
9090
fluent-logger (0.10.0)
9191
logger (~> 1.6)
9292
msgpack (>= 1.0.0, < 2)
93-
fog-aws (3.33.2)
94-
base64 (>= 0.2, < 0.4)
95-
fog-core (~> 2.6)
96-
fog-json (~> 1.1)
97-
fog-xml (~> 0.1)
98-
fog-core (2.6.0)
99-
builder
100-
excon (~> 1.0)
101-
formatador (>= 0.2, < 2.0)
102-
mime-types
103-
fog-json (1.3.0)
104-
fog-core
105-
multi_json (~> 1.10)
106-
fog-xml (0.1.5)
107-
fog-core
108-
nokogiri (>= 1.5.11, < 2.0.0)
10993
formatador (1.2.3)
11094
reline
11195
google-protobuf (4.35.1)
@@ -481,8 +465,6 @@ DEPENDENCIES
481465
digest-xxhash
482466
factory_bot (~> 6.5)
483467
fluent-logger
484-
fog-aws
485-
fog-core (~> 2.6.0)
486468
googleapis-common-protos (>= 1.8.0)
487469
hashdiff
488470
httpclient

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ When deployed via capi-release only:
4040
| Provider | `blobstore_type` | Backends | Notes |
4141
|----------|------------------|-----------------------------------------------|-------|
4242
| Storage CLI | `storage-cli` | S3, S3-compatible, GCS, Azure, Alibaba Cloud | |
43-
| Fog | `fog` | AWS, GCS, Alibaba Cloud, OpenStack, Local/NFS | **Default.** Local/NFS not recommended for production |
4443
| WebDAV | `webdav` | WebDAV servers | |
4544
| Local | `local`, `local-temp-storage` | Filesystem, NFS | Development and testing only |
4645

config/bosh-lite.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ resource_pool:
136136
uri:
137137
key_pair_id:
138138
private_key: ""
139-
fog_connection: {}
140139

141140
packages:
142141
blobstore_type: webdav
@@ -153,7 +152,6 @@ packages:
153152
uri:
154153
key_pair_id:
155154
private_key: ""
156-
fog_connection: {}
157155

158156
droplets:
159157
blobstore_type: webdav
@@ -168,7 +166,6 @@ droplets:
168166
uri:
169167
key_pair_id:
170168
private_key: ""
171-
fog_connection: {}
172169
max_staged_droplets_stored: 5
173170

174171
buildpacks:
@@ -184,7 +181,6 @@ buildpacks:
184181
uri:
185182
key_pair_id:
186183
private_key: ""
187-
fog_connection: {}
188184

189185
db_encryption_key: db-encryption-key
190186

config/cloud_controller.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -182,29 +182,21 @@ resource_pool:
182182
minimum_size: 1
183183
resource_directory_key: "spec-cc-resources"
184184
blobstore_type: local-temp-storage
185-
fog_connection: {}
186-
fog_aws_storage_options: {}
187185

188186
packages:
189187
app_package_directory_key: "cc-packages"
190188
max_package_size: 42
191189
max_valid_packages_stored: 42
192190
blobstore_type: local-temp-storage
193-
fog_connection: {}
194-
fog_aws_storage_options: {}
195191

196192
droplets:
197193
droplet_directory_key: cc-droplets
198194
max_staged_droplets_stored: 42
199195
blobstore_type: local-temp-storage
200-
fog_connection: {}
201-
fog_aws_storage_options: {}
202196

203197
buildpacks:
204198
buildpack_directory_key: cc-buildpacks
205199
blobstore_type: local-temp-storage
206-
fog_connection: {}
207-
fog_aws_storage_options: {}
208200

209201
db_encryption_key: "asdfasdfasdf"
210202
database_encryption:

decisions/0014-storage-clis-for-blobstore-operations.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,19 @@
1919
- **Timeline:** Legacy fog name support to be removed May 2026
2020

2121

22+
## Update — July 2026: All Fog Gems Removed
23+
24+
Cloud Controller previously used the fog gem family to interface with blobstores like Azure, AWS, GCP, and Alibaba Cloud.
25+
26+
> **All fog gems have been fully removed** (fog-aws, fog-core, fog-azure-rm, fog-google, fog-aliyun).
27+
28+
The migration described in this ADR is complete. As a result:
29+
30+
- The `blobstore_provider` field accepts both native storage-cli type names AND the legacy WebDAV alias (`webdav``dav`)
31+
- **Legacy fog provider names** (AzureRM, AWS, Google, aliyun) are **no longer supported** — use native storage-cli type names (azurebs, s3, gcs, alioss)
32+
- ✅ Enabled the removal of all fog related gems — fog-aws, fog-core, fog-azure-rm, fog-google, and fog-aliyun have all been removed
33+
34+
2235
## Context
2336

2437
Cloud Controller uses the fog gem family to interface with blobstores like Azure, AWS, GCP, and Alibaba Cloud.
@@ -150,4 +163,4 @@ def run_cli(command, *args, allow_nonzero: false)
150163
151164
status
152165
end
153-
```
166+
```

lib/cloud_controller/blobstore/client_provider.rb

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
require 'cloud_controller/blobstore/client'
22
require 'cloud_controller/blobstore/retryable_client'
3-
require 'cloud_controller/blobstore/fog/fog_client'
43
require 'cloud_controller/blobstore/error_handling_client'
54
require 'cloud_controller/blobstore/webdav/dav_client'
65
require 'cloud_controller/blobstore/local/local_client'
@@ -18,8 +17,6 @@ def self.provide(options:, directory_key:, root_dir: nil, resource_type: nil)
1817
provide_local(options, directory_key, root_dir, use_temp_storage: true)
1918
when 'storage-cli'
2019
provide_storage_cli(options, directory_key, root_dir, resource_type)
21-
when 'fog', nil, ''
22-
provide_fog(options, directory_key, root_dir)
2320
else
2421
provide_webdav(options, directory_key, root_dir)
2522
end
@@ -28,34 +25,6 @@ def self.provide(options:, directory_key:, root_dir: nil, resource_type: nil)
2825
class << self
2926
private
3027

31-
def provide_fog(options, directory_key, root_dir)
32-
cdn_uri = HashUtils.dig(options[:cdn], :uri)
33-
cdn = CloudController::Blobstore::Cdn.make(cdn_uri)
34-
35-
client = FogClient.new(
36-
connection_config: options.fetch(:fog_connection),
37-
directory_key: directory_key,
38-
cdn: cdn,
39-
root_dir: root_dir,
40-
min_size: options[:minimum_size],
41-
max_size: options[:maximum_size],
42-
aws_storage_options: options[:fog_aws_storage_options]
43-
)
44-
45-
logger = Steno.logger('cc.blobstore')
46-
47-
# work around https://github.com/fog/fog/issues/3137
48-
# and Fog raising an EOFError SocketError intermittently
49-
# and https://github.com/fog/fog-aws/issues/264
50-
# and https://github.com/fog/fog-aws/issues/265
51-
# and intermittent GCS blobstore download errors
52-
errors = [Excon::Errors::BadRequest, Excon::Errors::SocketError, SystemCallError,
53-
Excon::Errors::InternalServerError, Excon::Errors::ServiceUnavailable, OpenSSL::OpenSSLError]
54-
retryable_client = RetryableClient.new(client:, errors:, logger:)
55-
56-
Client.new(ErrorHandlingClient.new(SafeDeleteClient.new(retryable_client, root_dir)))
57-
end
58-
5928
def provide_local(options, directory_key, root_dir, use_temp_storage:)
6029
client = LocalClient.new(
6130
directory_key: directory_key,

lib/cloud_controller/blobstore/fog/cdn.rb

Lines changed: 0 additions & 42 deletions
This file was deleted.

lib/cloud_controller/blobstore/fog/fog_blob.rb

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)