[ActiveStorage for All] Enable Active Storage in test apps and install generator#7553
Draft
orangewolf wants to merge 1 commit into
Draft
[ActiveStorage for All] Enable Active Storage in test apps and install generator#7553orangewolf wants to merge 1 commit into
orangewolf wants to merge 1 commit into
Conversation
Adds the canonical Rails create_active_storage_tables migration to the .dassie and .koppie test applications and regenerates their schemas, teaches the hyrax:models generator to run active_storage:install so host applications get the active_storage_* tables alongside Hyrax's own migrations, and has the hyrax:config generator install a default config/storage.yml (local disk services plus commented S3/GCS/Azure examples) when the application does not already have one. The .dassie sample app's storage.yml is aligned with that default (.koppie's already matches). Both test apps already ship config.active_storage.service settings per environment; this fills in the missing database tables and default service declarations so upcoming work can stage uploads and store repository files through Active Storage, where switching local disk vs S3 is a single Rails storage configuration change. No behavior change: nothing in Hyrax attaches or reads Active Storage data yet. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Jul 18, 2026
Test Results 17 files ± 0 17 suites ±0 1h 22m 7s ⏱️ - 2h 7m 32s Results for commit 2322d89. ± Comparison against base commit 5cc41d6. This pull request removes 2219 and adds 280 tests. Note that renamed tests count towards both.This pull request skips 21 tests. |
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.
Summary
First step of the [ActiveStorage for All] chain moving Hyrax's non-ActiveFedora upload/storage paths onto Rails Active Storage (staging uploads now; an Active Storage-backed Valkyrie storage adapter and a modern upload UI follow in stacked PRs).
This PR only enables the plumbing; no Hyrax behavior changes:
create_active_storage_tablesmigration to the.dassieand.koppietest apps (both already shipconfig.active_storage.servicesettings for every environment) and updates theirschema.rb.hyrax:modelsgenerator to runactive_storage:installso new host applications get the tables alongside Hyrax's own migrations.hyrax:configgenerator install a defaultconfig/storage.yml(local disktest/localservices plus commented S3/GCS/Azure/mirror examples) when the application does not already have one — so generated apps always carry the storage service declarations..dassie'sstorage.ymlis aligned with that default (.koppie's already matches).documentation/developing-your-hyrax-based-app.md, and that disk↔S3 is a standardconfig/storage.yml/config.active_storage.servicechange.Why
Upcoming PRs in this chain let
Hyrax::UploadedFilestaging and (separately) Valkyrie file storage run on Active Storage, so that switching non-AF storage between local disk and S3 is one Rails config change rather than bespoke Hyrax configuration. ActiveFedora file-set storage is explicitly out of scope and unchanged throughout the chain.Dependencies
None — safe to merge first. PRs that follow are stacked on this one.
Supersedes #7547 (same change, moved from a fork branch to an in-repo branch and retitled per review convention; adds the storage.yml default).
Tests
.koppiemigration run for real against dockerized Postgres (rails db:create db:migrate, test env) —schema.rbhere is that regenerated output..dassie/db/schema.rbupdated with the identical dumper output (same migration, same Postgres); dassie's full stack (Fedora etc.) was not run locally — CI exercises it.git diff --checkclean; RuboCop clean on touched Ruby (test-appdb/is outside RuboCop's scan).🤖 Generated with Claude Code