Project

General

Profile

Refactor #22489

UINotifications::Base lives in wrong file

Added by Marek Hulán over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Notifications
Target version:
Difficulty:
Triaged:
Bugzilla link:

Description

app/services/ui_notifications.rb should only define the namespace module, base class should be defined under ui_notifications directory


Related issues

Related to Foreman Remote Execution - Bug #22649: foreman-remote-execution plugin breaks 1.17 installClosed2018-02-21

Associated revisions

Revision 0d332ecd (diff)
Added by Marek Hulán over 2 years ago

Fixes #22489 - move the notification base class

History

#1 Updated by Marek Hulán over 2 years ago

  • Tracker changed from Bug to Refactor

#2 Updated by Marek Hulán over 2 years ago

This leads to a problem when plugin want to define its own notification builder like this

module UINotifications
  module RemoteExecutionJobs
    class BaseJobFinish < ::UINotifications::Base

That ends up with following error

/home/ares/Projekty/Zdrojaky/foreman_remote_execution/app/services/ui_notifications/remote_execution_jobs/base_job_finish.rb:3:in `<module:RemoteExecutionJobs>': uninitialized constant UINotifications::Base (NameError)
        from /home/ares/Projekty/Zdrojaky/foreman_remote_execution/app/services/ui_notifications/remote_execution_jobs/base_job_finish.rb:2:in `<module:UINotifications>'
        from /home/ares/Projekty/Zdrojaky/foreman_remote_execution/app/services/ui_notifications/remote_execution_jobs/base_job_finish.rb:1:in `<top (required)>'
        from /home/ares/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/dependencies/interlock.rb:12:in `block in loading'
        from /home/ares/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/activesupport-5.1.4/lib/active_support/concurrency/share_lock.rb:149:in `exclusive'

#3 Updated by The Foreman Bot over 2 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/5233 added

#4 Updated by Ivan Necas over 2 years ago

  • Legacy Backlogs Release (now unused) set to 330

#5 Updated by Ivan Necas over 2 years ago

  • Status changed from Ready For Testing to Closed

#6 Updated by The Foreman Bot over 2 years ago

  • Pull request https://github.com/theforeman/foreman/pull/5271 added

#7 Updated by Ondřej Pražák over 2 years ago

  • Legacy Backlogs Release (now unused) changed from 330 to 296

#8 Updated by Ondřej Pražák over 2 years ago

  • Related to Bug #22649: foreman-remote-execution plugin breaks 1.17 install added

#9 Updated by Ondřej Pražák over 2 years ago

Setting to 1.17 since it is meant to fix the related issue.

Also available in: Atom PDF