Skip to content

Hyku 7 support#45

Merged
ShanaLMoore merged 7 commits intomainfrom
hyku-7-support
Mar 4, 2026
Merged

Hyku 7 support#45
ShanaLMoore merged 7 commits intomainfrom
hyku-7-support

Conversation

@ShanaLMoore
Copy link
Copy Markdown
Contributor

Story

image

Issue:

Expected Behavior Before Changes

Repo wouldn't spin up when Hyku 7 was its submodule

Expected Behavior After Changes

Repo runs with Hyku7

Summary of changes

  • Submodule: Point hyrax-webapp at Hyku 7 (e.g. v7.0.0.rc1 or main).
  • Rails 7: Dockerfile and app use rails instead of rake where required; gemspec requires rails >= 7.2.0.
  • Flexible metadata (Hyku 7): Set HYRAX_FLEXIBLE early, use schema_loader_config_search_paths for knapsack schemas, remove SimpleSchemaLoaderDecorator in favor of config.
  • Versioning: Bump to v1.0.0; add compatibility table and downstream instructions in README.
  • Legacy support: Tag v0.0.1-hyku6-compat and branch hyku-6-support preserved for knapsacks still on Hyku 6.

Breaking change

v1.0.0 is not compatible with Hyku 6.x. Downstream knapsacks on Hyku 6 should use ref: 'v0.0.1-hyku6-compat' or branch: 'hyku-6-support' (see README).

Notes

  • Created tag v0.0.1-hyku6-compat and branch hyku-6-support before these changes.
  • No PR to Hyku is required; Hyku’s Gemfile can keep pointing at required_for_knapsack_instances; prime keeps that branch in sync with main for Hyku 7.

Comment thread lib/hyku_knapsack.rb Outdated
@ShanaLMoore ShanaLMoore requested a review from kirkkwang March 2, 2026 22:14
Copy link
Copy Markdown
Contributor

@kirkkwang kirkkwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I think this looks good, a question that I had would be is are we breaking CI for Hyku 6 apps that don't have hyku_knapsack pinned?

@ShanaLMoore
Copy link
Copy Markdown
Contributor Author

Nice, I think this looks good, a question that I had would be is are we breaking CI for Hyku 6 apps that don't have hyku_knapsack pinned?

Yes, this would be a breaking change. But I included instructions in readme that hopefully would help 🤔 I'll bring it by Rob's office hr though to talk versioning strategies again.

Comment thread README.md Outdated
- Dockerfile: use rails instead of rake (secret, assets:precompile)
- Set HYRAX_FLEXIBLE and HYRAX_DISABLE_INCLUDE_METADATA early in lib/hyku_knapsack.rb
- Engine: load knapsack initializers after host app; disable *_include_metadata in flexible mode; use schema_loader_config_search_paths.unshift instead of SimpleSchemaLoaderDecorator
- config/initializers/hyrax.rb: config.flexible from ENV, prepend schema search path
- spec/rails_helper.rb: set HYRAX_FLEXIBLE before requiring Rails
- Remove SimpleSchemaLoaderDecorator (replaced by Hyku 7 config API)
- Bump version to 1.0.0 and require rails >= 7.2.0 in gemspec
- Update hyrax-webapp submodule for Hyku 7

BREAKING: Incompatible with Hyku 6.x / Rails 6; use v0.0.1 for older stacks.

ISSUE:
- notch8/hyku-community-issues#44
- Stop setting ENV['HYRAX_FLEXIBLE'] in lib/hyku_knapsack.rb; let the app control it
- Default config.flexible and include_metadata logic to false (Hyku default)
- Specs use HYRAX_FLEXIBLE=false unless set elsewhere; set true in tests that need flexible mode

Flexible metadata remains opt-in via HYRAX_FLEXIBLE=true in .env or docker-compose.
@ShanaLMoore ShanaLMoore merged commit d0cd160 into main Mar 4, 2026
5 checks passed
@ShanaLMoore ShanaLMoore deleted the hyku-7-support branch March 4, 2026 16:24
@ShanaLMoore ShanaLMoore restored the hyku-7-support branch March 4, 2026 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants