Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-25177

The foreman-rake command warns that config.options[:key] = value is deprecated

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • None
    • Foreman Proxy
    • None
    • 0
    • False
    • Hide

      None

      Show
      None
    • False
    • CLOSED
    • 0
    • Platform
    • Low
    • No

      Description of problem:

      When preparing Satellite 6.14.2 for an upgrade to 6.15, a task cleanup is executed previously using foreman-rake, but the output warns about a deprecated parameter in the code, as follows:

      WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`: ["/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:103:in `sidekiq_worker?'", "/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:155:in `block in world_config'"]

      WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`: ["/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:103:in `sidekiq_worker?'", "/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:99:in `increase_db_pool_size?'"]

      Version-Release number of selected component (if applicable):

      Satellite 6.14.2

      How reproducible:

      Always, but before upgrading to 6.15

      Steps to Reproduce:

      1. Run the following command and see the output: foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' STATES='running,pending,stopped,paused' VERBOSE=true

      Actual results:

      Despite the command runs successfully, a warning message is thrown due a deprecated code.

      Expected results:

      No deprecation message should be thrown to the user when running the command.

      Additional info:

      Here's the full output:

      ===
      [root@satellite ~]# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' STATES='running,pending,stopped,paused' VERBOSE=true
      2024-05-13T19:12:15.740Z pid=3717 tid=121p WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`: ["/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:103:in `sidekiq_worker?'", "/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:155:in `block in world_config'"]
      2024-05-13T19:12:29.152Z pid=3717 tid=121p WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`: ["/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:103:in `sidekiq_worker?'", "/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:99:in `increase_db_pool_size?'"]
      2024-05-13T19:12:29.240Z pid=3717 tid=121p WARN: `config.options[:key] = value` is deprecated, use `config[:key] = value`: ["/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:103:in `sidekiq_worker?'", "/usr/share/gems/gems/dynflow-1.7.0/lib/dynflow/rails/configuration.rb:99:in `increase_db_pool_size?'"]
      About to remove 557 tasks matching filter
      0/557
      557/557
      Deleted 557 tasks matching filter
      No orphaned task locks found, skipping.
      About to remove 741 orphaned task links
      0/741
      741/741
      Deleted 741 orphaned task links
      No orphaned execution plans found, skipping.
      No orphaned job invocations found, skipping.
      ===

      I could finish the command successfully and proceed with the upgrade with no further issues. After upgrading to Satellite 6.15, the warning message is gone, as follows:

      ===
      [root@satellite ~]# foreman-rake foreman_tasks:cleanup TASK_SEARCH='label ~ *' STATES='running,pending,stopped,paused' VERBOSE=true
      About to remove 71 tasks matching filter
      0/71
      71/71
      Deleted 71 tasks matching filter
      About to remove 13 orphaned task locks
      0/13
      13/13
      Deleted 13 orphaned task locks
      About to remove 176 orphaned task links
      0/176
      176/176
      Deleted 176 orphaned task links
      No orphaned execution plans found, skipping.
      No orphaned job invocations found, skipping.
      ===

      I suppose the issue is fixed in the newer version, but it would be good to have this fix backported to 6.14 if it's possible.

              jira-bugzilla-migration RH Bugzilla Integration
              jira-bugzilla-migration RH Bugzilla Integration
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: