Project

General

Profile

Feature #12873

Update Rails to 4.1.latest

Added by Dominic Cleal over 3 years ago. Updated about 1 year ago.

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

Description

#7230 updates Rails to 4.1.5, but this should be updated again to 4.1.latest (currently 4.1.14), either pinned specifically or ~> 4.1.5.

There are changes to how test DB schemas are maintained between 4.1.5 and 4.1.14 (db:test:prepare is no longer deprecated), so this will need revising.

1.11.0 blocker, as 4.1.5 contains known security vulnerabilities.


Related issues

Related to Foreman - Refactor #13409: Remove maintain_test_schema! Rails initializerClosed2016-01-27
Related to Foreman Remote Execution - Bug #13666: Partials in app/overrides must be moved into a views pathClosed2016-02-11
Related to Foreman - Bug #13710: apipie:cache fails with Missing template ../../layouts/apipie/apipieClosed2016-02-15
Related to Foreman - Bug #13804: apipie:cache fails with :"en-GB" is not a valid localeClosed2016-02-19
Related to Foreman - Bug #13977: Upgrade rails to 4.1.14.2Closed2016-03-01
Blocked by Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1Closed2014-08-22
Blocked by Katello - Bug #13242: db:migrate fails under Rails 4.1.latest with "katello_key_system_groups_pkey" not foundClosed2016-01-15
Blocks Foreman - Feature #13244: Upgrade Ruby on Rails to 4.2Closed2016-01-15
Blocked by foreman-tasks - Bug #13335: Tests fail on Rails 4.1.14Closed2016-01-22
Blocked by Katello - Bug #13592: Partial ../overrides/foreman/activation_keys/_host_tab accessed outside of view pathsClosed2016-02-08

Associated revisions

Revision fd12fc8f (diff)
Added by Dominic Cleal over 3 years ago

fixes #12873 - update Rails to 4.1.14.1

maintain_test_schema! changed behaviour and now launches db:test:prepare
in the background, causing the environment to be loaded again. A check
in the initializer prevents this from happening recursively.

Ideally this call would be removed from the initializers and leave it to
rails/test_help, but requires one of three solutions:

1. validates_lengths_from_database and validate_inclusion_in_families
must be lazier, not checking the database during class
initialisation. The Rails environment and even some models could be
loaded but only start working after the DB is available, instead of
not setting up their validators.

2. Remove all model class loading from the environment setup. The
apipie initializer can be made lazier, the HostObserver can be
refactored, but many plugins still cause models to be loaded through
to_prepare hooks.

3. Ignore the problem, always set up the test DB schema externally
before using rake tasks, without relying on rails/test_help and
maintain_test_schema.

Any of these would allow for the Rails environment to be loaded either
before the test DB schema is maintained without an effect on behaviour.

Test failures in the pagelets tests are fixed, which previously
referenced partials stored outside of the known view paths. These are
blocked by Rails in the Action View CVE-2016-0752 fix, so instead the
static fixtures directory is added to the view search paths.

History

#1 Updated by Dominic Cleal over 3 years ago

#2 Updated by Dominic Cleal over 3 years ago

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

#3 Updated by Dominic Cleal over 3 years ago

  • Blocked by Bug #13242: db:migrate fails under Rails 4.1.latest with "katello_key_system_groups_pkey" not found added

#4 Updated by The Foreman Bot over 3 years ago

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

#5 Updated by Dominic Cleal over 3 years ago

#6 Updated by Eric Helms over 3 years ago

  • Blocked by Bug #13335: Tests fail on Rails 4.1.14 added

#7 Updated by Dominic Cleal over 3 years ago

  • Related to Refactor #13409: Remove maintain_test_schema! Rails initializer added

#8 Updated by Dominic Cleal over 3 years ago

  • Blocked by Bug #13592: Partial ../overrides/foreman/activation_keys/_host_tab accessed outside of view paths added

#9 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13666: Partials in app/overrides must be moved into a views path added

#10 Updated by Dominic Cleal over 3 years ago

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

#11 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13710: apipie:cache fails with Missing template ../../layouts/apipie/apipie added

#12 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #13804: apipie:cache fails with :"en-GB" is not a valid locale added

#13 Updated by Tomer Brisker over 3 years ago

  • Related to Bug #13977: Upgrade rails to 4.1.14.2 added

#14 Updated by Tomer Brisker over 3 years ago

  • Bugzilla link set to 1325632

Also available in: Atom PDF