Hyku db seed#1215
Merged
Merged
Conversation
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.
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
rake uc:seed:samples/Uc::SampleSeedService) adapted from Scholar@UC develop onto Hyku OOB models (GenericWork,Image,Etd), without changing stock Hykudb/seeds.rb.INITIAL_ADMIN_PASSWORDfor sample accounts (same as Hyku admin), refuses production/staging, and stays idempotent via a fixed Fedora completion marker (with Solr fallback);UC_SEED_FORCE=truewipes and recreates.docs/localand covers UC-owned behavior with fast, stubbed specs.Test plan
db:setup/ Hykudb:seedstill creates tenant + admin as beforeRUBYOPT="-r./config/sidekiq_redis_compat" bundle exec rake uc:seed:samplesprintsRESULT: OKand creates public works + Complete Works collectionmanydeposits@example.com, etc., andadmin@example.com) useINITIAL_ADMIN_PASSWORDfrom.env.local.macRESULT: OK — ... already present (skipped)UC_SEED_FORCE=truerecreates samples; unsetINITIAL_ADMIN_PASSWORDfails clearly; prod/staging refusebundle exec rspec spec/services/uc/sample_seed_service_spec.rb spec/tasks/uc_sample_seeds_rake_spec.rb