fix(storage): replace retired azure-storage-blob with maintained azure-blob - #7108
Open
tacoda wants to merge 2 commits into
Open
fix(storage): replace retired azure-storage-blob with maintained azure-blob#7108tacoda wants to merge 2 commits into
tacoda wants to merge 2 commits into
Conversation
…e-blob The azure-storage-blob / azure-storage-common gems were retired by Microsoft on 13 Sep 2024 and are unmaintained. They also forced a manual `cgi ~> 0.5.1` pin under Ruby 4.0 (azure-storage-common needs CGI.parse, which Ruby 4.0's stripped stdlib omits and Rails 8 no longer pulls in transitively). Swap to testdouble/azure-blob, a maintained drop-in Active Storage adapter: - Gemfile: azure-storage-blob -> azure-blob; drop the now-redundant cgi pin (azure-blob declares cgi as a dependency, so the full library resolves again). - config/storage.yml: microsoft service AzureStorage -> AzureBlob. - Rewrite the signing regression guard to exercise the AzureBlob Active Storage service (offline URL signing for download + direct upload), replacing the old azure-storage-common internal-class assertions. Same Azure account / container / keys, so no data migration or infra change. Closes rubyforgood#7094
tacoda
requested review from
FireLemons,
compwron and
elasticspoon
as code owners
August 8, 2026 17:30
Brakeman 7.1.2's EOLRails check now fires (Rails 8.0.5.1 support ends 2026-10-07, within its warning window), failing the security workflow. Rails upgrade is tracked separately and out of scope for the Azure adapter change, so add the warning to config/brakeman.ignore with a note.
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.
What github issue is this PR for, if any?
Resolves #7094
What changed, and why?
The azure-storage-blob / azure-storage-common gems were retired by Microsoft on 13 Sep 2024 and are unmaintained. They also forced a manual
cgi ~> 0.5.1pin under Ruby 4.0 (azure-storage-common needs CGI.parse, which Ruby 4.0's stripped stdlib omits and Rails 8 no longer pulls in transitively).Swap to testdouble/azure-blob, a maintained drop-in Active Storage adapter:
Gemfile:azure-storage-blob->azure-blob; drop the now-redundant cgi pin (azure-blob declares cgi as a dependency, so the full library resolves again).config/storage.yml: microsoft serviceAzureStorage->AzureBlob.AzureBlobActive Storage service (offline URL signing for download + direct upload), replacing the old azure-storage-common internal-class assertions.Same Azure account / container / keys, so no data migration or infra change.
How is this tested? (please write rspec and jest tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
One file touched:
spec/lib/azure_storage_signing_spec.rb(rewritten). Dropped tests coupled to methods that are gone withazure-storage-blob. Same intent, re-pointed at the real Active Storage adapter. BuildsActiveStorage::Service::AzureBlobServicewith dummy credentials.Gap (unchanged, flagged earlier)
Still no real round-trip test (upload→store→download against live Azure). This path needs credentials. Covered only by staging smoke-test before merge. App test env uses Disk storage, so the Azure path is exercised nowhere else. That blind spot is exactly why #7093 stayed green.
Needs to go through integration testing through a real Heroku environment to verify a connection to the real Azure account in an environment that is production-like.
Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.
N/A - Backend only change
Feelings gif (optional)
What gif best describes your feeling working on this issue?
