Remove fog-aws and fog-core, complete fog removal#5288
Open
kathap wants to merge 22 commits into
Open
Conversation
kathap
force-pushed
the
remove-fog-aws
branch
2 times, most recently
from
July 14, 2026 11:41
2a2cc09 to
ff727cd
Compare
Replace obsolete FogClient/fog_connection test setup with LocalClient and
blobstore_type: 'local'. Job and controller specs that used FogClient as a
test double now use LocalClient directly; config-based specs switch from
fog_connection to blobstore_type/local_blobstore_path. Remove Fog::Mock.reset
calls that are no longer needed. Delete fog_client_spec.rb — it tested the
deprecated FogClient which requires fog provider gems no longer bundled.
* Tests were broken because fog-aws removal left no registered fog provider,
so Fog::Storage.new(provider: ...) raised ArgumentError at runtime.
* Blobstore behavior under test is the job/controller logic, not fog internals,
so LocalClient is the right substitute.
fog_client_spec.rb restored — rewritten to stub Fog::Storage.new with a FakeStorage in-memory backend defined in the spec itself. All provider-independent FogClient behavior (uploads, downloads, copies,
deletion, CDN, file permissions, bucket management, root dir scoping) is covered. The AWS-specific contexts (encryption, delete_multiple_objects via AWS bulk delete) are not included since those were the
AWS-only parts removed in this PR. No fog provider gem is needed.
Three job specs — blobstore_path extracted into a named let, after { FileUtils.rm_rf(blobstore_path) } added to each.
Each call to the non-memoized method returned a different proxy object, so stubs and expect().to receive() set on one proxy were never observed by FogClient which called directories on a different instance.
…tance allow_any_instance_of(LocalClient) patches the class itself, leaving RSpec mock state that fires when LocalClient at_exit hooks run after the suite ends (triggered by use_temp_storage: true instances from test_config defaults). Stubbing the specific package_blobstore instance avoids this entirely.
…ectations OutsideOfExampleError was already fixed by 92a3cca (instance-specific stub). The BLOBSTORE_PATH constant and local blobstore_type were unnecessary — revert to local-temp-storage. Restore packages_spec download expectations to 302 + Location header, matching actual blobstore URL generator behavior.
… local-temp-storage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the last remaining fog gems (fog-aws, fog-core) and all fog blobstore code. All fog gems (fog-azure-rm, fog-google, fog-aliyun) have now been fully removed. storage-cli is the default blobstore backend and has fully replaced fog. Removing fog-aws and fog-core eliminates their transitive dependencies (fog-json, fog-xml) as well, completing the fog removal and reducing ongoing Dependabot maintenance burden.
Changes:
port_8181_config.yml)
Links to any other associated PRs
Remove fog-aws legacy provider support from storage-cli config and specs capi-release#671
I have reviewed the contributing guide
I have viewed, signed, and submitted the Contributor License Agreement
I have made this pull request to the
mainbranchI have run all the unit tests using
bundle exec rakeI have run CF Acceptance Tests