cloudfoundry / cloudfoundry/cloud_controller_ng

Reevaluate use of Fog

Open
#2,647 11 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

unscheduled
Dominant language
Ruby
Stars
207
Forks
373
Avg merge
2d 12h
Merged PRs (30d)
56

Description

Impetus

As part of our efforts to upgrade to Ruby 3 and to upgrade the fog-aws gem to enable IMDSv2, we discovered a lot of inter-compatibility issues between the various fog gems.

For example, here are a few contributions we had to make or are in the process of making to ensure fog is working for our purposes:

And we will likely have to contribute to https://github.com/fog/fog-google/pull/422 if it does not move forward.

Not to mention the CF-specific branch of fog-azure-rm that we have been maintaining for years.

The particular gems are not being very actively maintained and there is not much effort to maintain inter-compatibility between them by maintainers.

In addition, we primarily (only?) use Fog to interface with S3 compatible blobstores, while the gems are designed to interface with other services like compute, dns, etc. If we find ourself needing to help maintain these gems, we are taking on the burden maintenance for services we do not use.

Alternative solutions

Since we primarily interface with blobstores, could we have a limited custom solution that only implements the actions we need.

Could we utilize individual gems that are actually created by providers:

https://github.com/Azure/azure-storage-ruby
https://github.com/googleapis/google-cloud-ruby/tree/main/google-cloud-storage
https://github.com/aws/aws-sdk-ruby

Could we somehow utilize ActiveStorage? It seems like it's baked into ActiveRecord, which is unfortunate, but maybe we can extract some of the abstractions they use around file uploads and other actions.

Reasons not to do

Could be a lot of work

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Review the current Fog usage for S3-compatible blobstores, then compare the provider SDKs and ActiveStorage alternative described in the issue; done means selecting and documenting a concrete replacement or a justified decision to retain Fog.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, azure, google-cloud, rails, ruby
Domain
backend, cloud
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.