Open ShanaLMoore opened 1 year ago
Since these are warnings only and aren't breaking the application, these really don't need to be addressed right now. It will be important for their next upgrade.
we definitely will not be fixing the deprecation warnings for third party gems.
WIP PR: https://github.com/WGBH-MLA/ams/pull/774/files Branch: i61-deprecations can be used for future work.
User Story
Additional Information
This should be done last.
Consider using shopify tool: https://github.com/Shopify/deprecation_toolkit
Done Looks Like
Address the following deprecation warnings
Redis.current
is deprecated and will be removed in 5.0. (called from: /app/samvera/hyrax-webapp/app/services/aapb/batch_ingest/pbcore_xml_item_ingester.rb:211:in `lock_manager')Redis.current=
is deprecated and will be removed in 5.0. (called from: /app/samvera/hyrax-webapp/config/initializers/redis_config.rb:3:in `<top (required)>')should
from rspec-expectations' old:should
syntax without explicitly enabling the syntax is deprecated. Use the new:expect
syntax or explicitly enable:should
withconfig.expect_with(:rspec) { |c| c.syntax = :should }
instead. Called from /app/samvera/hyrax-webapp/spec/services/aapb/batch_ingest/zipped_pbcore_reader_spec.rb:25:in `block (4 levels) in <top (required)>'.raise_error
matcher without providing a specific error or message risks false positives, sinceraise_error
will match when Ruby raises aNoMethodError
,NameError
orArgumentError
, potentially allowing the expectation to pass without even executing the method you are intending to call. Actual error raised was #RSpec::Expectations.configuration.on_potential_false_positives = :nothing
. Called from /app/samvera/hyrax-webapp/spec/services/ams/migrations/audit/ams2_asset_spec.rb:17:in `block (4 levels) in <top (required)>'.Notes
These are other deprecation warnings found in gems installed in the application
[ ] [DEPRECATION] PCDM is deprecating 'Valkyrie::Vocab::PCDMUse#PreservationMasterFile'. Use 'Valkyrie::Vocab::PCDMUse#PreservationFile' instead. This warning does not indicate that usage of the deprecated term has been detected.
[ ]
Redis.current
is deprecated and will be removed in 5.0. (called from: /usr/local/bundle/gems/hyrax-4.0.0/lib/hyrax/redis_event_store.rb:28:in `instance')[ ]
Redis.current
is deprecated and will be removed in 5.0. (called from: /usr/local/bundle/gems/hyrax-4.0.0/lib/hyrax/redis_event_store.rb:33:in `instance')[ ]
Redis.current=
is deprecated and will be removed in 5.0. (called from: /usr/local/bundle/gems/hyrax-4.0.0/lib/hyrax/redis_event_store.rb:34:in `instance')[ ] DEPRECATION WARNING: add_facet_params is deprecated and will be removed from a future release (Use filter(field).add(item) instead). (called from block in add_facet_params_and_redirect at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/search_state.rb:145)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: after_date and exact_or_range. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: after_date and exact_or_range. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: after_date, before_date, and exact_or_range. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: before_date and exact_or_range. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: fq, id_field, and locale. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: id and locale. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: id_field, transfer, and utf8. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: id. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: locale. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: reset_password_token. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Blacklight 8 will filter out non-search parameter, including: utf8. (called from permit_search_params at /usr/local/bundle/gems/blacklight-7.33.1/lib/blacklight/parameters.rb:77)
[ ] DEPRECATION WARNING: Calling
current_ability
on scope is deprecated and will be removed in Blacklight 8. Call #to_h first if you need to use hash methods (or, preferably, use your own SearchState implementation). (called from current_ability at /usr/local/bundle/gems/hydra-access-controls-12.1.0/lib/hydra/access_controls_enforcement.rb:6)[ ] DEPRECATION WARNING: Calling
current_user
on scope is deprecated and will be removed in Blacklight 8. Call #to_h first if you need to use hash methods (or, preferably, use your own SearchState implementation). (called from current_user at /usr/local/bundle/gems/hyrax-4.0.0/app/search_builders/hyrax/search_filters.rb:30)[ ] DEPRECATION WARNING: constraint_query_label is deprecated and will be removed from a future release (Moving to Blacklight::ConstraintsComponent). (called from block in render_constraints_query at /usr/local/bundle/gems/blacklight-7.33.1/app/helpers/blacklight/render_constraints_helper_behavior.rb:56)
[ ] DEPRECATION WARNING: Constraints helpers or partials were overridden; not using components. (called from public_send at /usr/local/bundle/gems/actionview-6.1.7.4/lib/action_view/base.rb:247)
[ ] DEPRECATION WARNING: default_search_field is deprecated and will be removed from a future release (Use Blacklight::Configuration#default_search_field). (called from add_advanced_parse_q_to_solr at /usr/local/bundle/gems/blacklight_advanced_search-7.0.0/lib/blacklight_advanced_search/advanced_search_builder.rb:54)
[ ] DEPRECATION WARNING: document_has_value? is deprecated and will be removed in Blacklight 8. Use DocumentPresenter#has_value? instead. (called from should_render_index_field? at /usr/local/bundle/gems/blacklight-7.33.1/app/helpers/blacklight/blacklight_helper_behavior.rb:115)
[ ] DEPRECATION WARNING: has_facet_values? is deprecated and will be removed from blacklight 8.0. (called from has_facet_values? at /usr/local/bundle/gems/blacklight-7.33.1/app/helpers/blacklight/facets_helper_behavior.rb:15)
[ ] DEPRECATION WARNING: has_thumbnail? is deprecated and will be removed from blacklight 8.0 (use IndexPresenter#thumbnail.exists?). (called from __usr_local_bundle_gems_hyrax___app_views_hyrax_admin_admin_sets_show_html_erb__3413400834263646007_923040 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/admin/admin_sets/show.html.erb:12)
[ ] DEPRECATION WARNING: query_has_constraints? is deprecated and will be removed from blacklight 8.0 (use search_state#has_constraints?). (called from usr_local_bundle_gems_hyrax___app_views_hyrax_myconstraints_html_erb__3379405703688995882_921780 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/my/_constraints.html.erb:1)
[ ] DEPRECATION WARNING: render_facet_partials is deprecated and will be removed from blacklight 8.0. (called from render_facet_partials at /usr/local/bundle/gems/blacklight-7.33.1/app/helpers/blacklight/facets_helper_behavior.rb:39)
[ ] DEPRECATION WARNING: render_thumbnail_tag is deprecated and will be removed from blacklight 8.0 (Use IndexPresenter#thumbnail.thumbnail_tag). (called from __usr_local_bundle_gems_hyrax___app_views_hyrax_admin_admin_sets_show_html_erb__3413400834263646007_923040 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/admin/admin_sets/show.html.erb:14)
[ ] DEPRECATION WARNING: search_field_options_for_select is deprecated and will be removed from a future release (removed without replacement). (called from search_fields at /usr/local/bundle/gems/blacklight-7.33.1/app/helpers/blacklight/configuration_helper_behavior.rb:25)
[ ] DEPRECATION WARNING: Sending mail with DeliveryJob and Parameterized::DeliveryJob is deprecated and will be removed in Rails 7.0. Please use MailDeliveryJob instead. (called from block in at /usr/local/bundle/bundler/gems/hyrax-batch_ingest-7983d39c62a7/app/jobs/hyrax/batch_ingest/batch_item_processing_job.rb:25)
[ ] DEPRECATION WARNING: Sending mail with DeliveryJob and Parameterized::DeliveryJob is deprecated and will be removed in Rails 7.0. Please use MailDeliveryJob instead. (called from enqueue at /usr/local/bundle/bundler/gems/hyrax-batch_ingest-7983d39c62a7/app/services/hyrax/batch_ingest/batch_runner.rb:52)
[ ] DEPRECATION WARNING: should_show_spellcheck_suggestions? is deprecated and will be removed from a future release (moving into a private method of Blacklight::Response::SpellcheckComponent). (called from usr_local_bundle_gems_hyrax___app_views_hyrax_mydid_you_mean_html_erb__1831338209988462788_921680 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/my/_did_you_mean.html.erb:1)
[ ] DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release. (called from usr_local_bundle_gems_hyrax___app_views_hyrax_baseitems_html_erb___441852335051932214_1823240 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/base/_items.html.erb:3)
[ ] DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release. (called from usr_local_bundle_gems_hyrax___app_views_hyrax_baseitems_html_erb___441852335051932214_1823240 at /usr/local/bundle/gems/hyrax-4.0.0/app/views/hyrax/base/_items.html.erb:3)
[ ] DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release. (called from [] at /usr/local/bundle/gems/hyrax-4.0.0/app/presenters/hyrax/collection_presenter.rb:60)
[ ] DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release. (called from [] at /usr/local/bundle/gems/hyrax-4.0.0/app/presenters/hyrax/collection_presenter.rb:60)
[ ] DEPRECATION WARNING: You are using deprecated behavior which will be removed from the next major or minor release. (called from include_item_ids at /usr/local/bundle/gems/hyrax-4.0.0/app/search_builders/hyrax/parent_collection_search_builder.rb:10)
[ ] Passing 'with' command to redis as is; blind passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /usr/local/bundle/gems/redlock-1.3.2/lib/redlock/client.rb:171:in `block in lock')
[ ] Passing 'with' command to redis as is; blind passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /usr/local/bundle/gems/redlock-1.3.2/lib/redlock/client.rb:177:in `block in unlock')
[ ] Passing 'with' command to redis as is; blind passthrough has been deprecated and will be removed in redis-namespace 2.0 (at /usr/local/bundle/gems/redlock-1.3.2/lib/redlock/client.rb:201:in `block in load_scripts')
[ ] WARNING: ignoring the provided expectation message argument (ArgumentError) since it is not a string or a proc.*
This last one may be attached to WARNING: Using the
raise_error
matcher... ...Called from /app/samvera/hyrax-webapp/spec/services/ams/migrations/audit/ams2_asset_spec.rb:17...