Project

General

Profile

Actions

Bug #37273

closed

Invalid kwargs handling in FindCommon

Added by Ewoud Kohl van Wijngaarden 9 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Category:
Database
Target version:
Fixed in Releases:
Found in Releases:

Description

foreman_salt fails its unit test. The code it uses doesn't override related parts.

/home/runner/work/foreman_salt/foreman_salt/app/controllers/concerns/find_common.rb:50: warning: Using the last argument as keyword parameters is deprecated; maybe ** should be added to the call
/home/runner/work/foreman_salt/foreman_salt/app/models/host.rb:2: warning: The called method `method_missing' is defined here
[MinitestRetry] retry 'test_0006_salt variable matching host with hostgroup specific value' count: 1,  msg: NoMethodError: undefined method `empty?' for #<ActiveRecord::QueryMethods::WhereChain:0x00005e8b1602df28>
    app/controllers/concerns/find_common.rb:12:in `resource_finder'
    app/controllers/concerns/find_common.rb:8:in `find_resource'
    app/controllers/concerns/foreman/controller/timezone.rb:10:in `set_timezone'
    app/models/concerns/foreman/thread_session.rb:32:in `clear_thread'
    app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in `set_topbar_sweeper_controller'
    foreman_salt/test/functional/minions_controller_test.rb:99:in `block in <class:MinionsControllerTest>'

There appears to be a difference in calling resource.where([]) and resource.where(*[]).

Actions #1

Updated by The Foreman Bot 9 months ago

  • Status changed from New to Ready For Testing
  • Assignee set to Ewoud Kohl van Wijngaarden
  • Pull request https://github.com/theforeman/foreman/pull/10097 added
Actions #2

Updated by The Foreman Bot 9 months ago

  • Fixed in Releases 3.11.0 added
Actions #3

Updated by Ewoud Kohl van Wijngaarden 9 months ago

  • Status changed from Ready For Testing to Closed
Actions #4

Updated by The Foreman Bot 9 months ago

  • Pull request https://github.com/theforeman/foreman/pull/10103 added
Actions #5

Updated by The Foreman Bot 9 months ago

  • Fixed in Releases 3.10.0 added
Actions #6

Updated by Ewoud Kohl van Wijngaarden 6 months ago

  • Triaged changed from No to Yes
  • Fixed in Releases deleted (3.11.0)
Actions

Also available in: Atom PDF