Islandora-Devops / isle-buildkit

Provides a number of Docker images which can be used to build an Islandora site. See also https://github.com/Islandora-Devops/isle-dc
https://www.islandora.ca/
MIT License
13 stars 23 forks source link

fcrepo-upgrade-utils error #304

Closed joshdentremont closed 5 months ago

joshdentremont commented 10 months ago

When importing fcrepo in buildkit 2.x I am getting the following error:

ERROR 18:24:21.789 (UpgradeUtilDriver) Upgrade failed.
edu.wisc.library.ocfl.api.exception.OcflJavaException: Unable to map string 'ocfl_1.1' to a known OCFL version. Known versions: [ocfl_1.0]
    at edu.wisc.library.ocfl.api.model.OcflVersion.fromOcflVersionString(OcflVersion.java:90)
    at edu.wisc.library.ocfl.core.storage.filesystem.FileSystemOcflStorageInitializer.validateOcflVersion(FileSystemOcflStorageInitializer.java:134)
    at edu.wisc.library.ocfl.core.storage.filesystem.FileSystemOcflStorageInitializer.validateAndLoadExistingRepo(FileSystemOcflStorageInitializer.java:115)
    at edu.wisc.library.ocfl.core.storage.filesystem.FileSystemOcflStorageInitializer.initializeStorage(FileSystemOcflStorageInitializer.java:101)
    at edu.wisc.library.ocfl.core.storage.filesystem.FileSystemOcflStorage.doInitialize(FileSystemOcflStorage.java:522)
    at edu.wisc.library.ocfl.core.storage.AbstractOcflStorage.initializeStorage(AbstractOcflStorage.java:62)
    at edu.wisc.library.ocfl.core.storage.CachingOcflStorage.doInitialize(CachingOcflStorage.java:58)
    at edu.wisc.library.ocfl.core.storage.AbstractOcflStorage.initializeStorage(AbstractOcflStorage.java:62)
    at edu.wisc.library.ocfl.core.OcflRepositoryBuilder.buildInternal(OcflRepositoryBuilder.java:397)
    at edu.wisc.library.ocfl.core.OcflRepositoryBuilder.buildMutable(OcflRepositoryBuilder.java:387)
    at org.fcrepo.upgrade.utils.UpgradeManagerFactory.createOcflRepo(UpgradeManagerFactory.java:115)
    at org.fcrepo.upgrade.utils.UpgradeManagerFactory.createOcflObjectSessionFactory(UpgradeManagerFactory.java:87)
    at org.fcrepo.upgrade.utils.UpgradeManagerFactory.createF6MigrationTaskManager(UpgradeManagerFactory.java:70)
    at org.fcrepo.upgrade.utils.UpgradeManagerFactory.create(UpgradeManagerFactory.java:60)
    at org.fcrepo.upgrade.utils.UpgradeUtilDriver.run(UpgradeUtilDriver.java:84)
    at org.fcrepo.upgrade.utils.UpgradeUtilDriver.main(UpgradeUtilDriver.java:70)
Upgrade failed: Unable to map string 'ocfl_1.1' to a known OCFL version. Known versions: [ocfl_1.0]  -> See log for details.

I did some digging, and it looks like we need oclf-java v1.5 or higher (https://github.com/OCFL/ocfl-java/releases/tag/v1.5.0)

The most recent release of fcrepo-upgrade-utils only includes 1.4.3 (https://github.com/fcrepo-exts/fcrepo-upgrade-utils/compare/fcrepo-upgrade-utils-6.1.0...fcrepo-upgrade-utils-6.2.0)

So I think we probably need a bump to fcrepo-upgrade-utils that bumps oclf-java to 1.5 or 2.0, then we need to add that new fcrepo-upgrade-utils jar to our fcrepo image.

nigelgbanks commented 10 months ago

In the meanwhile, I've updated the tools, and the documentation on how to update them again.

In the following pull: https://github.com/Islandora-Devops/isle-buildkit/pull/305

joshdentremont commented 10 months ago

Jared and I had a conversation about this in Slack (https://islandora.slack.com/archives/CM6F4C4VA/p1700229939782089?thread_ts=1700076858.075639&cid=CM6F4C4VA). He is going to put in a PR to get fcrepo-upgrade-utils to work with ocfl 1.1.

Once that is done, we can update the tools again and this issue should be solved.

This issue comes up when we do an export/import in isle-dc, because the Makefile calls fcrepo-upgrade-utils. This is only necessary if importing from fedora 5 or lower into fedora 6.

g7morris commented 7 months ago

Hmm @joshdentremont per your comments in https://github.com/Islandora-Devops/isle-dc/pull/369#issuecomment-1922012674 Do we need to test these changes further?

joshdentremont commented 7 months ago

@g7morris I think there are a few things that need to be done.

  1. We need to figure out the process for restoring from fcrepo6 to fcrepo6 without running upgrade utils (I have this nearly figured out here: https://github.com/Islandora-Devops/isle-dc/pull/369)
  2. We should probably still update the upgrade utils when there is a new version available. I think this is still necessary for people to upgrade from fcrepo5 to fcrepo6 (This was discussed in the tech call a few weeks ago. More info here: https://github.com/Islandora-Devops/isle-dc/issues/368)

I'm hoping to get some input on step 1 at the tech call tomorrow and hopefully we can fix that soon.

Step 2 is waiting on a new release of upgrade utils (https://github.com/fcrepo-exts/fcrepo-upgrade-utils/releases/tag/fcrepo-upgrade-utils-6.2.0). I've put in an issue there asking if we can get a new release.

g7morris commented 7 months ago

Thanks @joshdentremont for that update. I'm going to assign you to this ticket just so we don't lose track of all your hardwork. Cheers for that!

I can report that testing on my side seemed fine which in the face of everything you described above is very incomplete. I effectively as originally asked by Nigel's review, tested running a new fresh isle-dc site / system with the test images.

I'm going to slide out on this one @nigelgbanks in terms of further testing as I think @joshdentremont is a better resource.

joshdentremont commented 6 months ago

For those who still want to be able to import from fedora 5 to 6 we do still need to update the upgrade-utils. They just released a new version that should work for that. https://github.com/fcrepo-exts/fcrepo-upgrade-utils/releases/tag/fcrepo-upgrade-utils-6.3.0

If we can have that upgraded in https://github.com/Islandora-Devops/isle-buildkit/pull/305 and the PR above gets approved I think we can close this issue.

nigelgbanks commented 5 months ago

The updates of the fcrepo tools went in with https://github.com/Islandora-Devops/isle-buildkit/pull/330, and as such this can be closed for now, unless someone reports a bug in the process.