-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move Bulkrax field mappings to Hyku #2389
Draft
bkiahstroud
wants to merge
2
commits into
main
Choose a base branch
from
i286-move-responsibility-of-default-field-mappings-from-bulkrax-to-hyku
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Move Bulkrax field mappings to Hyku #2389
bkiahstroud
wants to merge
2
commits into
main
from
i286-move-responsibility-of-default-field-mappings-from-bulkrax-to-hyku
Conversation
This file contains 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
A recent Hyku feature introduced the ability to configure Bulkrax field mappings on a per-tenant basis. It also introduced a bug that impacted existing Hyku applications who had custom field mappings. Since the feature fell back on Bulkrax's default field mappings if an Account hadn't explicitly set their own, the existing field mapping customizations in the Bulkrax initializer were ignored. To solve that issue, as well as the question of "what if I want all my tenants to have the same field mappings, but don't want to customize them all by hand?", this commit introduces the idea of a set of default field mappings at the Hyku application level. This means that when Bulkrax looks for field mappings, it will discover them in this order (depending on presence): Account setting? -> Hyku defaults? -> Bulkrax defaults There are a couple reasons why I decided to put this in the Hyku module instead of just using Hyku's Bulkrax initializer: 1. Since they're Hyku's defaults, it makes sense to denote them as such semantically and conceptually 2. Since the ultimate fallback is Bulkrax's default field mappings, it makes sense not to alter the field mappings that Bulkrax "manages" with this feature 3. When adding hyku_knapsack into the mix, their often ends up being three separate Bulkrax config files (the knapsack's config/initializers/bulkrax.rb, Hyku's config/initializers/bulkrax.rb, and Bulkrax's lib/bulkrax.rb). This gets very muddy very quickly with how knapsack works technically Ref: - #2384
Test Results 3 files ±0 3 suites ±0 18m 41s ⏱️ +18s For more details on these failures, see this check. Results for commit ff87a91. ± Comparison against base commit 571c2de. This pull request removes 42 and adds 42 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
This can be used by a hyku_knapsack app initializer to override the default Hyku application field mappings
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.
Follow up to:
A recent Hyku feature introduced the ability to configure Bulkrax field mappings on a per-tenant basis. It also introduced a bug that impacted existing Hyku applications who had custom field mappings. Since the feature fell back on Bulkrax's default field mappings if an Account hadn't explicitly set their own, the existing field mapping customizations in the Bulkrax initializer were ignored.
To solve that issue, as well as the question of "what if I want all my tenants to have the same field mappings, but don't want to customize them all by hand?", this commit introduces the idea of a set of default field mappings at the Hyku application level.
Caution
This is a breaking change
Existing Hyku applications with custom Bulkrax field mappings will need to move them from their
config/initializers/bulkrax.rb
toHyku#default_bulkrax_field_mappings
inconfig/application.rb
Now, when Bulkrax looks for field mappings, it will discover them in this order (depending on presence):
Account setting? -> Hyku defaults? -> Bulkrax defaults
There are a couple reasons why I decided to put this in the Hyku module instead of just using Hyku's Bulkrax initializer:
@samvera/hyku-code-reviewers