samvera / active_fedora

A Rails interface to the Fedora repository, akin to ActiveModel
Other
54 stars 63 forks source link

Fixing the 10.3.x Solr schema to work with Solr 7.x releases #1401

Closed jrgriffiniii closed 3 years ago

jrgriffiniii commented 5 years ago

Otherwise one will encounter errors when attempting to create cores for Solr 7.x installations using the CircleCI test commands such as install_solr_core (https://github.com/samvera-labs/samvera-circleci-orb/blob/master/src/commands/install_solr_core.yml). Please see https://github.com/samvera/hydra-head/pull/488#issuecomment-522774361 for further context.

I would propose that we please follow this by either a 10.3.1 or 10.4.0 release.

jrgriffiniii commented 5 years ago

This is failing when I attempt to use solr_wrapper (as ported from the Travis CI configuration) due to errors I cannot trace:

circleci@106099a217b8:~/project$ bundle exec solr_wrapper
Starting Solr 6.5.0 on port 8985 ... bundler: failed to load command: solr_wrapper (/home/circleci/project/vendor/bundle/bin/solr_wrapper)
RuntimeError: Failed to execute solr create:
ERROR: Connection refused (Connection refused)

. Further information may be available in /tmp/solr-6.5.0/logs

...

circleci@106099a217b8:~/project$ cat /tmp/solr-6.5.0/server/logs/solr-8985-console.log
OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
Unrecognized VM option 'UseParNewGC'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

I can continue to try and get this passing for CircleCI.

jrgriffiniii commented 5 years ago

ActiveSupport methods such as remove_possible_method (introduced by https://github.com/samvera/active_fedora/pull/101/files#diff-c69d03d57f50d2a2885d370c733adb7cR80) seem to be failing when testing against Rails 5.2.x releases:

NoMethodError:
  undefined method `remove_possible_method' for #<Class:ActiveFedora::Base>
  Did you mean?  remove_method

Other builds may just be failing due to autoload/ActiveSupport issues for the Hydra Module:

3.2) Failure/Error: name.constantize

          NameError:
            uninitialized constant Hydra
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/inflector/methods.rb:269:in `const_get'
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/inflector/methods.rb:269:in `block in constantize'
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/inflector/methods.rb:267:in `each'
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/inflector/methods.rb:267:in `inject'
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/inflector/methods.rb:267:in `constantize'
          # ./vendor/bundle/gems/activesupport-5.1.7/lib/active_support/core_ext/string/inflections.rb:66:in `constantize'
          # ./lib/active_fedora/reflection.rb:241:in `compute_class'
jrgriffiniii commented 5 years ago

In order to expedite a new hydra-head release and unblock https://github.com/samvera/hyrax/pull/3915, this work is going to be temporarily postponed.

jrgriffiniii commented 4 years ago

https://github.com/samvera/hyrax/pull/3915 was merged, and I'm going to try resuming progress with this using https://github.com/samvera/hydra-head/releases/tag/v10.7.0

jrgriffiniii commented 3 years ago

This appears to have been triggered by methods which are normally present in Rails and Ruby releases for Rails 5.1 and Ruby 2.7:

NoMethodError:
  undefined method `remove_possible_method' for #<Class:ActiveFedora::Base>
  Did you mean?  remove_method

I am not quite certain why this error is being triggered, but I shall retain the branch for this PR in order to clean this repository of outdated PR's.