Project

General

Profile

Feature #13244

Upgrade Ruby on Rails to 4.2

Added by Dominic Cleal about 5 years ago. Updated over 2 years ago.

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

Description

This ticket covers the upgrade of core Foreman to Ruby on Rails 4.2 (i.e. Gemfile et al).


Related issues

Related to Katello - Refactor #14156: Support Ruby on Rails 4.2 without ForeignerClosed2016-03-11
Related to Foreman - Bug #14155: Tests are order dependent, should be runnable with random orderClosed2016-03-11
Related to Foreman - Bug #14253: Saving dashboard widget positions fails under Rails 4.2Closed2016-03-17
Related to Docker - Refactor #14581: Fix migrations for Rails 4.2Closed2016-04-11
Related to Foreman - Bug #15718: Hashes defined in matchers do not save properly after the first timeClosed2016-07-18
Blocks Foreman - Tracker #13243: Rails 4.2 upgrade tasksResolved2016-01-15

Blocked by Foreman - Feature #12873: Update Rails to 4.1.latestClosed2015-12-18
Blocked by Foreman - Refactor #13440: Replace Host::Base#model_name to prevent Rails 4.2 conflictClosed2016-01-28
Blocked by Foreman - Bug #13878: assets_paths initializer fails calling generate_railtie_name on Rails 4.2Closed2016-02-24
Blocked by Foreman - Refactor #13879: Load mocha/minitest integration explicitly in test_helperClosed2016-02-24
Blocked by Foreman - Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameterClosed2016-02-24
Blocked by Foreman - Refactor #13897: Explicitly set :limit on all DB migrations adding string columnsClosed2016-02-25
Blocked by Foreman - Refactor #13938: Remove reports fixturesClosed2016-02-29
Blocked by Foreman - Refactor #13978: Replace AR connection value_to_boolean method with Foreman::CastClosed2016-03-01
Blocked by Foreman - Bug #14064: Puppetclass#hostgroups_count should be excluded from auditingRejected2016-03-07
Blocked by Foreman - Refactor #14093: Remove unused roles permissions columnClosed2016-03-08
Blocked by Foreman - Refactor #14094: Replace DB migration foreign_keys calls with foreign_key_exists?Closed2016-03-08

Associated revisions

Revision 60f2c480 (diff)
Added by Dominic Cleal almost 5 years ago

refs #13244 - require Rails 4.2

Revision 85a97146 (diff)
Added by Dominic Cleal almost 5 years ago

fixes #13244 - update Rails to 4.2.6

- Add responders gem to support class-level respond_to usage
- http://edgeguides.rubyonrails.org/4_2_release_notes.html#respond-with-class-level-respond-to
- Replace foreigner with native Rails 4.2 FK support
- uses a patch from Rails 5 to support Foreigner's
`foreign_key_exists?` helper for full compatibility
- `foreign_keys` should be avoided in favour of the higher level
methods as it throws a NotImplementedError on sqlite3
- Update DB adapter versions to match ActiveRecord
- Enable exceptions from after_commit handlers to detect more errors
- Change deprecated application config settings
- Remove test:lib chaining on rake test task
- 4.2 runs lib tasks automatically now, as test:run is redefined
to all _test files within test/ rather than units+functionals.
The task is still needed for the jenkins:* tasks.
- Fix deprecation of mailer #deliver method, change to #deliver_now
- Change CSRF test to use generated, not static tokens
- 4.2 changes CSRF tokens to be different on every request and
validated against the session, so use its generator to test the
controller behaviour instead of hardcoding tokens.
- Change test execution order to random

Revision 43539b4a (diff)
Added by Dominic Cleal over 4 years ago

refs #13244 - update mysql2/sqlite3 dependencies

History

#1 Updated by Dominic Cleal about 5 years ago

#2 Updated by Dominic Cleal about 5 years ago

#3 Updated by Dominic Cleal almost 5 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal

#4 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #13440: Replace Host::Base#model_name to prevent Rails 4.2 conflict added

#5 Updated by The Foreman Bot almost 5 years ago

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

#6 Updated by Dominic Cleal almost 5 years ago

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

#7 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Bug #13878: assets_paths initializer fails calling generate_railtie_name on Rails 4.2 added

#8 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #13879: Load mocha/minitest integration explicitly in test_helper added

#9 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #13883: Host::Managed.last_report_object association uses deprecated :order parameter added

#10 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #13897: Explicitly set :limit on all DB migrations adding string columns added

#11 Updated by Dominic Cleal almost 5 years ago

A branch is available at https://github.com/domcleal/foreman/commits/13244-rails42 for anybody wanting to test against it. Apart from a couple of integration tests, it's in good working order.

#12 Updated by Dominic Cleal almost 5 years ago

#13 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #13978: Replace AR connection value_to_boolean method with Foreman::Cast added

#14 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Bug #14064: Puppetclass#hostgroups_count should be excluded from auditing added

#15 Updated by Dominic Cleal almost 5 years ago

#16 Updated by Dominic Cleal almost 5 years ago

  • Blocked by Refactor #14094: Replace DB migration foreign_keys calls with foreign_key_exists? added

#17 Updated by The Foreman Bot almost 5 years ago

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

#18 Updated by Dominic Cleal almost 5 years ago

  • Related to Refactor #14156: Support Ruby on Rails 4.2 without Foreigner added

#19 Updated by Dominic Cleal almost 5 years ago

This has been merged into the rails42 branch and not develop yet (leaving it on RfT until it is merged). Please see https://groups.google.com/forum/#!topic/foreman-dev/6ANhWVGDzNA for details.

#20 Updated by Dominic Cleal almost 5 years ago

  • Related to Bug #14155: Tests are order dependent, should be runnable with random order added

#21 Updated by Dominic Cleal almost 5 years ago

  • Related to Bug #14253: Saving dashboard widget positions fails under Rails 4.2 added

#22 Updated by David Davis almost 5 years ago

#23 Updated by Dominic Cleal almost 5 years ago

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

#24 Updated by Dominic Cleal almost 5 years ago

  • Legacy Backlogs Release (now unused) set to 136

#25 Updated by Dominic Cleal over 4 years ago

  • Related to Bug #15718: Hashes defined in matchers do not save properly after the first time added

Also available in: Atom PDF