Skip to content

Hyku db seed#1215

Merged
Janell-Huyck merged 7 commits into
hyku-oobfrom
hyku-db-seed
Jul 22, 2026
Merged

Hyku db seed#1215
Janell-Huyck merged 7 commits into
hyku-oobfrom
hyku-db-seed

Conversation

@Janell-Huyck

Copy link
Copy Markdown
Contributor

Summary

  • Adds a UC-owned sample seed path (rake uc:seed:samples / Uc::SampleSeedService) adapted from Scholar@UC develop onto Hyku OOB models (GenericWork, Image, Etd), without changing stock Hyku db/seeds.rb.
  • Uses INITIAL_ADMIN_PASSWORD for sample accounts (same as Hyku admin), refuses production/staging, and stays idempotent via a fixed Fedora completion marker (with Solr fallback); UC_SEED_FORCE=true wipes and recreates.
  • Ensures the ActiveFedora default AdminSet has Sipity workflows so seeded works can deposit cleanly; documents the flow in docs/local and covers UC-owned behavior with fast, stubbed specs.

Test plan

  • db:setup / Hyku db:seed still creates tenant + admin as before
  • First RUBYOPT="-r./config/sidekiq_redis_compat" bundle exec rake uc:seed:samples prints RESULT: OK and creates public works + Complete Works collection
  • Sample logins (manydeposits@example.com, etc., and admin@example.com) use INITIAL_ADMIN_PASSWORD from .env.local.mac
  • Re-run skips with RESULT: OK — ... already present (skipped)
  • UC_SEED_FORCE=true recreates samples; unset INITIAL_ADMIN_PASSWORD fails clearly; prod/staging refuse
  • bundle exec rspec spec/services/uc/sample_seed_service_spec.rb spec/tasks/uc_sample_seeds_rake_spec.rb

Keeps stock Hyku db:seeds intact and documents how to load public sample works locally after db:setup.
Use INITIAL_ADMIN_PASSWORD, refuse prod/staging, persist a Fedora completion marker with AF workflows, and cover UC-owned behavior in fast unit specs.
…setup.

Absolute HYKU_CACHE_ROOT, rename dependency docs, paste-friendly text fences, and a CI check so customization inventory stays current.
Move logic into lib with failure-mode specs, validate hyku_patched kinds, and fail PR enforcement when git SHAs are missing or git diff fails.
macOS accepted require 'english'; Linux GitHub Actions does not.
Clears the Node 20 deprecation warning on the UC customizations job and other ci.yml checkouts.
Clears the same deprecation warnings on RuboCop, Brakeman, and RSpec jobs.
@Janell-Huyck
Janell-Huyck merged commit 56ea83d into hyku-oob Jul 22, 2026
10 checks passed
@Janell-Huyck
Janell-Huyck deleted the hyku-db-seed branch July 22, 2026 21:37
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.

1 participant