Project

General

Profile

Refactor #21205

Replace alias_method_chain with Module prepend

Added by Ivan Necas over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

One of the reasons is to remove the rails 5 deprecation. The other is the tests
in against foreman on ruby 2.2.2 currently failing on

in HostTest.test_0100_#reload drops primary and provision interface cache
expected exactly once, invoked once: #<Host::Managed:0x1cf9a8a0>.drop_provision_interface_cache(any_parameters)
 (Minitest::Assertion)

The issues seems to be caused by super in https://github.com/theforeman/foreman/blob/715d097cbd058d171c8a2c65ad5d519d128d1123/app/models/host/base.rb#L290
calling the very same method once again, when called from `refresh_with_remote_execution`. Replacing alias_method_chain with
prepend seemed to help with the issue


Related issues

Related to Foreman Remote Execution - Bug #21242: SystemStackError (stack level too deep) when calling smart proxy features refresh with Katello 3.4Closed2017-10-09
Related to Katello - Bug #21243: Rails 5 - Replace alias_method_chain with Module prependClosed2017-10-09
Related to Boot disk - Bug #14797: Medium validation wrong with Katello and foreman_bootdiskClosed
Blocks Foreman - Tracker #20948: Rails 5.1 upgrade tasksClosed2017-09-16

Associated revisions

Revision 5d1530d6 (diff)
Added by Ivan Necas over 1 year ago

Fixes #21205 - replace alias_method_chain with prepend

History

#1 Updated by The Foreman Bot over 1 year ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/278 added

#2 Updated by Ivan Necas over 1 year ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Ivan Necas over 1 year ago

  • Related to Bug #21242: SystemStackError (stack level too deep) when calling smart proxy features refresh with Katello 3.4 added

#4 Updated by Ivan Necas over 1 year ago

  • Related to Bug #21243: Rails 5 - Replace alias_method_chain with Module prepend added

#5 Updated by Ivan Necas over 1 year ago

#6 Updated by Ivan Necas over 1 year ago

#7 Updated by Ivan Necas over 1 year ago

#8 Updated by Ivan Necas over 1 year ago

#9 Updated by Ivan Necas over 1 year ago

#10 Updated by Lukas Zapletal over 1 year ago

  • Related to Bug #14797: Medium validation wrong with Katello and foreman_bootdisk added

Also available in: Atom PDF