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

ValkyrieCreateDerivativesJob fails #49

Closed
Tracked by #39 ...
laritakr opened this issue Jul 5, 2024 · 2 comments
Closed
Tracked by #39 ...

ValkyrieCreateDerivativesJob fails #49

laritakr opened this issue Jul 5, 2024 · 2 comments
Assignees
Labels
allinson flex amigos bug something isn't working

Comments

@laritakr
Copy link

laritakr commented Jul 5, 2024

Job attempts to load schema attributes & passes a symbol instead of a hash of attributes.

(rdbg) attributes
:audio_mime_types
(rdbg) safe
false
(rdbg) c    # continue command
[59, 68] in /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb
    59|         raise Dry::Error, "[#{self}.new] #{e}", e.backtrace
    60|       end
    61|
    62|       ## Read the schema from the database and load the correct schemas for the instance in to the class
    63|       def load(attributes, safe = false)
=>  64| debugger
    65|         attributes[:schema_version] ||=  Hyrax::FlexibleSchema.order('id DESC').pick(:id)
    66|         struct = allocate
    67|         schema_version = attributes[:schema_version]
    68|         struct.singleton_class.attributes(Hyrax::Schema(self, schema_version:).attributes)
=>#0	Hyrax::Flexibility::ClassMethods#load(attributes=:audio_mime_types, safe=false) at /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:64
  #1	Hyrax::Flexibility::ClassMethods#new(attributes=:audio_mime_types, safe=false, block=nil) at /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:56
  # and 75 frames (use `bt' command for all frames)
(rdbg) bt    # backtrace command
=>#0	Hyrax::Flexibility::ClassMethods#load(attributes=:audio_mime_types, safe=false) at /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:64
  #1	Hyrax::Flexibility::ClassMethods#new(attributes=:audio_mime_types, safe=false, block=nil) at /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:56
Backtrace
2024-07-05T15:22:21.681Z pid=19 tid=71dv WARN: {"context":"Job raised exception","job":{"retry":true,"queue":"ingest","class":"ActiveJob::QueueAdapters::SidekiqAdapter::JobWrapper","wrapped":"ValkyrieCreateDerivativesJob","args":[{"job_class":"ValkyrieCreateDerivativesJob","job_id":"f89b1155-377b-413d-a974-67d048d44e65","provider_job_id":null,"queue_name":"ingest","priority":null,"arguments":["4e3b284b-6e9c-4380-825f-edd732ecdb0a","d78ed6eb-6d92-44d4-99d5-ffa0585e3601"],"executions":0,"exception_executions":{},"locale":"en","timezone":"UTC","enqueued_at":"2024-07-05T15:21:43Z"}],"jid":"80b2aa273af763fbbadc1a88","created_at":1720192903.3312368,"enqueued_at":1720192941.6480346,"error_message":"no implicit conversion of Symbol into Integer","error_class":"TypeError","failed_at":1720192903.3582425,"retry_count":1,"retried_at":1720192923.923421}}
2024-07-05T15:22:21.681Z pid=19 tid=71dv WARN: TypeError: no implicit conversion of Symbol into Integer
2024-07-05T15:22:21.681Z pid=19 tid=71dv WARN: /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:63:in `[]'
/app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:63:in `load'
/app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:55:in `new'
/app/bundle/ruby/3.2.0/gems/dry-struct-1.6.0/lib/dry/struct/class_interface.rb:284:in `call_unsafe'
/app/bundle/ruby/3.2.0/gems/dry-types-1.7.2/lib/dry/types/type.rb:47:in `call'
/app/bundle/ruby/3.2.0/gems/dry-struct-1.6.0/lib/dry/struct/class_interface.rb:307:in `try'
/app/samvera/hyrax-engine/lib/hyrax/configuration.rb:246:in `lookup_mimes'
/app/samvera/hyrax-engine/lib/hyrax/configuration.rb:264:in `derivative_mime_type_mappings'
/app/samvera/hyrax-engine/app/services/hyrax/file_set_derivatives_service.rb:34:in `create_derivatives'
/app/samvera/hyrax-engine/app/jobs/valkyrie_create_derivatives_job.rb:11:in `perform'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/execution.rb:48:in `block in perform_now'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/i18n-1.14.5/lib/i18n.rb:351:in `with_locale'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/translation.rb:9:in `block (2 levels) in <module:Translation>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `instance_exec'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/core_ext/time/zones.rb:66:in `use_zone'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/timezones.rb:9:in `block (2 levels) in <module:Timezones>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `instance_exec'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/instrumentation.rb:21:in `block in instrument'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `block in instrument'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/notifications/instrumenter.rb:24:in `instrument'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/notifications.rb:203:in `instrument'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/instrumentation.rb:31:in `instrument'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/instrumentation.rb:14:in `block (2 levels) in <module:Instrumentation>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `instance_exec'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/logging.rb:22:in `block in tag_logger'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/tagged_logging.rb:99:in `block in tagged'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/tagged_logging.rb:37:in `tagged'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/tagged_logging.rb:99:in `tagged'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/logging.rb:22:in `tag_logger'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/logging.rb:15:in `block (2 levels) in <module:Logging>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `instance_exec'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in `run_callbacks'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/execution.rb:47:in `perform_now'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/execution.rb:25:in `block in execute'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:117:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/railtie.rb:47:in `block (4 levels) in <class:Railtie>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/reloader.rb:72:in `block in wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:87:in `wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/reloader.rb:71:in `wrap'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/railtie.rb:46:in `block (3 levels) in <class:Railtie>'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `instance_exec'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:126:in `block in run_callbacks'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/callbacks.rb:137:in `run_callbacks'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/execution.rb:23:in `execute'
/app/bundle/ruby/3.2.0/gems/activejob-6.1.7.8/lib/active_job/queue_adapters/sidekiq_adapter.rb:42:in `perform'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:202:in `execute_job'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:170:in `block (2 levels) in process'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/middleware/chain.rb:172:in `invoke'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:169:in `block in process'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:136:in `block (6 levels) in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:113:in `local'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:135:in `block (5 levels) in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/rails.rb:14:in `block in call'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/reloader.rb:72:in `block in wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/execution_wrapper.rb:91:in `wrap'
/app/bundle/ruby/3.2.0/gems/activesupport-6.1.7.8/lib/active_support/reloader.rb:71:in `wrap'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/rails.rb:13:in `call'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:131:in `block (4 levels) in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:263:in `stats'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:126:in `block (3 levels) in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:13:in `call'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:125:in `block (2 levels) in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/job_retry.rb:80:in `global'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:124:in `block in dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/job_logger.rb:39:in `prepare'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:123:in `dispatch'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:168:in `process'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:78:in `process_one'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/processor.rb:68:in `run'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:8:in `watchdog'
/app/bundle/ruby/3.2.0/gems/sidekiq-6.5.12/lib/sidekiq/component.rb:17:in `block in safe_thread'
@laritakr laritakr changed the title ValkyrieCreateDerivativesJob fails - attempt to load schema attributes passes a symbol instead of a hash of attributes ValkyrieCreateDerivativesJob fails Jul 5, 2024
@laritakr laritakr added bug something isn't working amigos allinson flex labels Jul 5, 2024
@laritakr laritakr self-assigned this Jul 5, 2024
@laritakr
Copy link
Author

laritakr commented Jul 5, 2024

The error is in method derivative_mime_type_mappings

(ruby) Hyrax.config.derivative_mime_type_mappings[:audio]
eval error: no implicit conversion of Symbol into Integer
  /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:63:in '[]'
  /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:63:in 'load'
  /app/samvera/hyrax-engine/app/models/concerns/hyrax/flexibility.rb:55:in 'new'
  /app/bundle/ruby/3.2.0/gems/dry-struct-1.6.0/lib/dry/struct/class_interface.rb:284:in 'call_unsafe'
  /app/bundle/ruby/3.2.0/gems/dry-types-1.7.2/lib/dry/types/type.rb:47:in 'call'
  /app/bundle/ruby/3.2.0/gems/dry-struct-1.6.0/lib/dry/struct/class_interface.rb:307:in 'try'
  /app/samvera/hyrax-engine/lib/hyrax/configuration.rb:246:in 'lookup_mimes'
  /app/samvera/hyrax-engine/lib/hyrax/configuration.rb:264:in 'derivative_mime_type_mappings'

@laritakr
Copy link
Author

laritakr commented Jul 5, 2024

Appears to be fixed by commit samvera/hyrax@0538efd

@jillpe jillpe closed this as completed Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allinson flex amigos bug something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants