Skip to content
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

Hyrax 2.1 upgrade #1529

Merged
merged 17 commits into from
Jul 26, 2018
Merged

Hyrax 2.1 upgrade #1529

merged 17 commits into from
Jul 26, 2018

Conversation

orangewolf
Copy link
Member

@orangewolf orangewolf commented May 24, 2018

Fixes #1518; Fixes #1517; Fixes #1512; ... more to come, just haven't had time to open them all and see yet.

Branch for work on the Hyrax 2.1 upgrade.

Currently upgraded to rc3 on the theory that we can time the 2.1 release fairly closely if we get a lot of it done up front. Right now there are 40 failing specs (thus the WIP up top ;-) ), but we wanted to get this up and visible so that there isn't any duplicate effort.

Now Hyrax 2.1 released version.

Couple of small things to point out.

  1. I did not do the RIIIF image server work from the Hyrax upgrade notes... I've opened issue Universal Viewer for Hyku? #1537 to discuss this.
  2. I had to pin rack-test to 0.7. 1.0 does not allow testing a file upload with a missing file, and ./spec/features/edit_file_spec.rb does exactly that. The validity of that test should probably be evaluated.

Here are the upgrade notes:


Upgrade to Hyrax 2.1 base

Migration Procedures from Hyrax 2.0.x to 2.1.0

These notes are cribbed from the Hyrax 2.1 release notes

Default Collection Types

An existing app will have to run a generator to add the pre-defined collection types: user_collection and admin_set

rails hyrax:default_collection_types:create

NOTE: db:migrate must be run before running the generator for default collection types.

Collection Migration

Fedora/Solr Collection Model

CE adds one property to Collections model... collection_type_gid, which identifies the type (RDF::Vocab::SCHEMA.additionalType) of each collection. The gid is generated based on the collection type id (e.g. gid://internal/hyrax-collectiontype/:id).

Migration Process

The migration process performs two updates for every collection...

store the User Collection gid as the collection type for all legacy collections
add a Permission Template and set Accesses based on sharing information in the legacy collection
NOTE: Solr and Fedora services need to be running when this script is called.

rails hyrax:migrate:add_collection_type_and_permissions_to_collections

Instructions for setting up the UniversalViewer for images in works

UniversalViewer setup is in the Management Guide in section Image Server


@samvera/hyrax-code-reviewers

@orangewolf orangewolf changed the title [WIP] Hyrax 2.1 upgrade Hyrax 2.1 upgrade Jun 28, 2018
@orangewolf
Copy link
Member Author

Worth noting that this depends on the solr_wrapper work, since I couldn't get solr_wrapper to work w/o it.

@orangewolf
Copy link
Member Author

Note the 4 failures here are the same 4 from @cjcolvar experiments in #1523 and #1522. They appear to be a problem with forks and not a real code change issue.

.gitignore Outdated
@@ -46,3 +46,4 @@ config/environments/*.local.yml

# Avatars and such
public/uploads
.DS_Store
Copy link
Member

Choose a reason for hiding this comment

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

This should be in your global ignore https://help.github.com/articles/ignoring-files/#create-a-global-gitignore as this is specific only to certain operating systems and it not part of the project.

Copy link
Member Author

Choose a reason for hiding this comment

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

no problem

@orangewolf
Copy link
Member Author

@jcoyne not sure how far you got review-wise, but rake tasks tests were added to get coveralls happy and the gitignore has been updated.

@jcoyne
Copy link
Member

jcoyne commented Jul 11, 2018

My only remaining question is why did you add rack-test as a dependency? I don't see where you've used Rack::Test anywhere in the code.

@orangewolf
Copy link
Member Author

@jcoyne great question: it was already a dependency (it is a dependency of hyrax as well), but was uncapped version wise. Newer versions are not compatible with the version of Capybara we are using. From the rack-test README:

rack-test >= 0.71 does not work with older Capybara versions (< 2.17). See #214 for more details.

Thus we needed to call that out explicitly to get the app to bundle.

@jcoyne
Copy link
Member

jcoyne commented Jul 11, 2018

@orangewolf can you add a comment to that effect to the Gemfile? Is upgrading to a newer version of Capybara not an option?

@orangewolf
Copy link
Member Author

@jcoyne sorry, finally got a chance to get back to this.

@jcoyne
Copy link
Member

jcoyne commented Jul 26, 2018

@orangewolf now this is looking good. Do you want to squash any of these commits together?

@orangewolf
Copy link
Member Author

@jcoyne I'd recommend squishing the whole thing together on the merge. Are you ok with that or would you rather have them squished incrementally?

@jcoyne
Copy link
Member

jcoyne commented Jul 26, 2018

@orangewolf If you're okay with it being one commit, that's fine.

@jcoyne jcoyne merged commit bc51174 into samvera:master Jul 26, 2018
orangewolf added a commit to notch8/hyku that referenced this pull request Aug 22, 2018
Hyrax 2.1 upgrade (samvera#1529)

* update to hyrax 2.1 proper

* solr_wrapper update, fixes the fact that apache no longer creates md5sums for releases

* dashboard layout is now called hyrax/dashboard layout

* all collections now have to have collection type

* remove mac specific ignore, prefer global ignore instead

* add spec for upgrade migration rake task

* change directory in a block so the app context is not swapped to a new directory

* fix extented

* add code comment about rack-test version

swing at fixing the s3 specs, need to see if this works

swing 2

allow s3 specs to happen on master
mankind pushed a commit to ubiquitypress/hyku that referenced this pull request Sep 25, 2019
* update to hyrax 2.1 proper

* solr_wrapper update, fixes the fact that apache no longer creates md5sums for releases

* dashboard layout is now called hyrax/dashboard layout

* all collections now have to have collection type

* remove mac specific ignore, prefer global ignore instead

* add spec for upgrade migration rake task

* change directory in a block so the app context is not swapped to a new directory

* fix extented

* add code comment about rack-test version
jeremyf added a commit that referenced this pull request Dec 20, 2023
Per https://github.com/samvera/hyku/releases/tag/v5.0.0, these importers
have been deprecated.

The "Commit History of Directories" shows that
there as been little activity, the recent activity being appeasing
Rubocop and working through upgrades.  Further, these files are
conceptually subsumed by Bulkrax.

<details><summary>Commit History of Directories</summary>

```bash
❯ git slog lib/importer
* 6a48652 — Hyrax 5 upgrade rubocop fixes & get specs running in CI (#2065) LaRita Robinson, (2023-12-16)
* 59626ef — 🧹 Rubocop'd lengths and other low hanging fruit Kirk Wang, (2023-12-13)
* fecb4e9 — 🧹 Ran `bundle exec rubocop -a` Kirk Wang, (2023-12-13)
* 0a6d047 — Upgrade to Hyrax 3.4.0 (#1811) Rob Kaufman, (2022-07-07)
* edafd85 — Rubocop fixes (#1640) Rob Kaufman, (2020-08-04)
* 9326387 — update to hyrax 2.2 (#1543) Rob Kaufman, (2018-10-04)
*   7526936 — Merge pull request #1541 from ubiquitypress/hyku-csv-importer Rob Kaufman, (2018-08-21)
|\
| * 904a369 — Remove :files from attributes Remove method to replace existing file_set Claire, (2018-07-20) (tag: v1.0.0)
| * 1cf7f5c — WIP- set uploaded_files param to use existing Actor Claire, (2018-07-19)
| * 9650e54 — Restore callbacks Claire, (2018-07-12)
| * e6a358a — Coerce UploadedFile to an array and use upstream Job Claire, (2018-07-11)
| * 93cb695 — Import files from CSV Claire, (2018-07-06)
* | bc51174 — Hyrax 2.1 upgrade (#1529) Rob Kaufman, (2018-07-26)
|/
* 116d4b9 — Upgrade Hyrax to 2.0.2 and upgrade gems with security vulnerabilities (#1519) Julie Allinson, (2018-03-22)
* d85952b — Changes necessary to get simple CSV import to run Michael J. Giarlo, (2017-08-22)
* a4024f4 — Make ObjectFactory rubocop-clean Joe Atzberger, (2017-08-22)
* 7618c3a — Refactor csv_importer and improve test accuracy Joe Atzberger, (2017-08-22)
* 21eb1e6 — Add a note about a broken method Justin Coyne, (2017-06-15)
* 86eedaa — Update Hyrax and other dependencies Justin Coyne, (2017-04-13)
* bfecea2 — Refactor importers to use Hyrax's actor stack Justin Coyne, (2017-02-23)
* 554b8a8 — Pass ability to the actor Justin Coyne, (2017-02-17)
* a8b25cd — Point at the Hyrax repo Justin Coyne, (2016-12-03)
* 5d005c9 — [WIP] Hyrax! Justin Coyne, (2016-12-02)
* fe229ca — Rename Lerna to Hyku. Fixes #461 Justin Coyne, (2016-11-07)
* 1f5fe23 — Update dependencies, Sufia to 7.0.0.rc1 Justin Coyne, (2016-07-12)
* d2c8fb1 — Rename hybox to lerna Michael J. Giarlo, (2016-06-08)
* 5de0440 — Add a CSV importer Justin Coyne, (2016-05-23)
* 5dcbb9b — Use User.batch_user instead of the deprecated batchuser Justin Coyne, (2016-05-20)
* d2a6c3c — Update to latest rubocop and rubocop-rspec Chris Beer, (2016-05-20)
* 642df79 — MODS/PURL importer Justin Coyne, (2016-05-19)
```

```bash
❯ git slog spec/lib/importer/
* 1c04b9e — 🧹 Hyrax 5 upgrade additional specs (#2067) LaRita Robinson, (2023-12-18)
* 6a48652 — Hyrax 5 upgrade rubocop fixes & get specs running in CI (#2065) LaRita Robinson, (2023-12-16)
* fecb4e9 — 🧹 Ran `bundle exec rubocop -a` Kirk Wang, (2023-12-13)
* 0a6d047 — Upgrade to Hyrax 3.4.0 (#1811) Rob Kaufman, (2022-07-07)
* edafd85 — Rubocop fixes (#1640) Rob Kaufman, (2020-08-04)
* f9a3a64 — Use paths based on Rails.root instead of pure relative paths Chris Colvard, (2020-07-08)
* 1b3c5ed — rubocop fixes nicholas, (2018-10-12)
* aeb9904 — update FactoryGirl to FactoryBot nicholas, (2018-10-09)
* 93cb695 — Import files from CSV Claire, (2018-07-06)
* 116d4b9 — Upgrade Hyrax to 2.0.2 and upgrade gems with security vulnerabilities (#1519) Julie Allinson, (2018-03-22)
* 7618c3a — Refactor csv_importer and improve test accuracy Joe Atzberger, (2017-08-22)
* 86eedaa — Update Hyrax and other dependencies Justin Coyne, (2017-04-13)
* bfecea2 — Refactor importers to use Hyrax's actor stack Justin Coyne, (2017-02-23)
* 8ecb861 — Require rails_helper in one place instead of 100 Joe Atzberger, (2017-02-14)
* 7498ecb — Update to latest hyrax Justin Coyne, (2016-12-20)
* a8b25cd — Point at the Hyrax repo Justin Coyne, (2016-12-03)
* 5d005c9 — [WIP] Hyrax! Justin Coyne, (2016-12-02)
* 5de0440 — Add a CSV importer Justin Coyne, (2016-05-23)
* d2a6c3c — Update to latest rubocop and rubocop-rspec Chris Beer, (2016-05-20)
* 642df79 — MODS/PURL importer Justin Coyne, (2016-05-19)
```

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants