Heads up!
Ivan merged my patch that changes behavior of how orchestration is
logged. Previously it was logging everything into sql logger which is
usually turned off by default as it is flooding logs. Since
orchestration logs are very important I made a change which made
possible to redirect orchestration logs into "app" logger.
The patch which was merged introduces new class ApplicationRecord
(inherits from ActiveRecord::Base) which is something that will be in
Rails 5 anyway and adds Foreman custom logger so all our logs from
ActiveRecord objects goes into app logger but all SQL related stuff
goes through ActiveSupport notifications into logger called sql. This
is what we want.
So new models must inherit now from ApplicationRecord rather than from
ActiveRecord::Base. I filed a PR into Katello and Discovery, please
update your plugins. It's not a breaking change so if you keep using
ActiveRecord::Base plugin will usually work just fine but logs will
keep ending up in the wrong logger making debugging more difficult.
Unit tests passed locally and on jenkins
(http://ci.theforeman.org/job/test_develop/2772/) but Ori reported
this error after pull:
PG::UndefinedTable: ERROR: relation "application_records" does not exist
It looks like some gems are not compatible with ApplicationRecord,
looks like it must be some old or custom gem or Foreman plugin that
has some kind of dependency. ApplicationRecord is an abstract class,
it must be treatened differently. More details here:
Report here if you encounter issues after git pull, bundle update and
migration. In that case I recommend cleaning RVM environment and
installing just the gems which are required by Foreman. You need to
identify which gem is breaking it, unfortunately this is a bit hard to
track down.