Project

General

Profile

Refactor #10409

Rails 4 and 3 compatible changes

Added by Daniel Lobato Garcia over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

Token tracker for all changes (deprecations, etc..) that have to be changed to upgrade to Rails 4, yet we can already add them on Rails 3.


Related issues

Blocks Foreman - Tracker #3157: Rails 4.1 upgrade tasksClosed2013-09-27

Associated revisions

Revision 868faa8f (diff)
Added by Daniel Lobato Garcia over 6 years ago

Fixes #10409 - Rails 4 compatible changes with Rails 3

Revision 996b3db5 (diff)
Added by Daniel Lobato Garcia almost 6 years ago

Refs #10409 - Rails 4 compatible changes with Rails 3

This includes some changes that can be applied to Rails 3 without
any issue and don't follow any particular pattern/deprecation, In
general these are minor things we have to change. Other PRs with
retrocompatible changes that aim to fix particular deprecations
have been submitted separately.

Sorry for the not-very-descriptive commit!

History

#1 Updated by Daniel Lobato Garcia over 6 years ago

#2 Updated by The Foreman Bot over 6 years ago

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

#3 Updated by Dominic Cleal over 6 years ago

  • Category set to Rails
  • Legacy Backlogs Release (now unused) set to 35

#4 Updated by Daniel Lobato Garcia over 6 years ago

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

#5 Updated by Lukas Zapletal over 5 years ago

I am trying to migrate Satellite 6.1 (Foreman 1.9) database but getting:

 NoMethodError: undefined method `request_uuid' for #<Audited::Adapters::ActiveRecord::Audit:0x005640d090e6d0>
/home/lzap/work/gitlab/foreman/app/models/setting.rb:201:in `block in create_existing'
/home/lzap/work/gitlab/foreman/app/models/setting.rb:210:in `bypass_readonly'
/home/lzap/work/gitlab/foreman/app/models/setting.rb:197:in `create_existing'
/home/lzap/work/gitlab/foreman/app/models/setting.rb:182:in `create!'
/home/lzap/work/gitlab/foreman/app/models/setting/general.rb:26:in `block (2 levels) in load_defaults'
/home/lzap/work/gitlab/foreman/app/models/setting/general.rb:26:in `each'
/home/lzap/work/gitlab/foreman/app/models/setting/general.rb:26:in `block in load_defaults'
/home/lzap/work/gitlab/foreman/app/models/setting/general.rb:12:in `load_defaults'
/home/lzap/work/gitlab/foreman/config/initializers/foreman.rb:21:in `each'
/home/lzap/work/gitlab/foreman/config/initializers/foreman.rb:21:in `<top (required)>'
/home/lzap/work/gitlab/foreman/config/environment.rb:5:in `<top (required)>'
Tasks: TOP => db:migrate => environment
(See full trace by running task with --trace)

Just for the record, this happens when you update autided gem first and then try to migrate database while there is also a setting change during initial boot. I wonder why we didn't see this during Foreman 1.11 RC upgrade.

#6 Updated by Lukas Zapletal over 5 years ago

Satellite 6.2 QA hit this today. I hit that as well, but only on Satellite. My Foreman instances were migrated just fine. Strange.

For the record, the related upstream commit is: https://github.com/collectiveidea/audited/commit/112daaed409adff40c2be318286a955b7113e129

Also available in: Atom PDF