sciencehistory / chf-sufia

sufia-based hydra app
Other
9 stars 4 forks source link

Prepare for upgrade to RDF2 #235

Closed hackartisan closed 7 years ago

hackartisan commented 7 years ago

Current versions of our upstream codebases depend on RDF2 which takes away the ordering guarantee (since RDF is explicitly non-ordered, the maintainer of that gem decided to get rid of ordering in favor of performance improvements).

This means data entries in any metadata field with multiple entries may be presented in any order. Where this will be an issue, we should either:

  1. adjust our model, e.g. use preferred_title and alternate_titles instead of just title.
  2. Default to an alphabetical sort.

To implement true ordering would be complex and make things slower, however it is possible if required.

Preliminary discussion indicates that title is the primary concern. Other fields should be fine with alphasort.

@catlu I think we've discussed description as a potential issue in the past?

child tickets:

catlu commented 7 years ago

@hackmastera yep, I'm thinking description would be a case like preferred/alternate, or making it non-repeatable? I've gotten feedback that curators have found the repeatable description field confusing.

hackartisan commented 7 years ago

required for upgrade to active fedora 11

MDiMeo commented 7 years ago

Curators agreed to drop current order of collections and preferred alpha-sort or model changes discussed in DCC meeting on Dec. 2 2016: https://chemheritage.atlassian.net/wiki/display/HDC/DCC+Minutes+2016.12.2

We're good to go!

hackartisan commented 7 years ago

When we push the code, the UI will appear to lose the values on title / description fields after the first value. However, that's just the UI. Once we run the rake tasks the data will be migrated over and everything will look right.

hackartisan commented 7 years ago
  1. Activate maintenance mode
  2. deploy the new code
  3. run the rake task
    1. RAILS_ENV=production bundle exec rake chf:single_value_migration
  4. turn off maintenance mode
hackartisan commented 7 years ago

staging migration started around 3:20. here are some works we can look at for description combination:

and title reshuffling:

hackartisan commented 7 years ago

it took just under an hour, but I have since made optimization which will help (it was saving when there were no descriptions)

hackartisan commented 7 years ago

Pushed the new ordering code and ran the update this morning.