Project

General

Custom queries

Profile

Actions

Feature #12873

closed

Update Rails to 4.1.latest

Added by Dominic Cleal over 9 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
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 10 (0 open10 closed)

Related to Foreman - Refactor #13409: Remove maintain_test_schema! Rails initializerClosedDominic Cleal01/27/2016Actions
Related to Foreman Remote Execution - Bug #13666: Partials in app/overrides must be moved into a views pathClosedDavid Davis02/11/2016Actions
Related to Foreman - Bug #13710: apipie:cache fails with Missing template ../../layouts/apipie/apipieClosed02/15/2016Actions
Related to Foreman - Bug #13804: apipie:cache fails with :"en-GB" is not a valid localeClosedDominic Cleal02/19/2016Actions
Related to Foreman - Bug #13977: Upgrade rails to 4.1.14.2ClosedTomer Brisker03/01/2016Actions
Blocked by Foreman - Feature #7230: Upgrade Ruby on Rails to 4.1ClosedDaniel Lobato Garcia08/22/2014Actions
Blocked by Katello - Bug #13242: db:migrate fails under Rails 4.1.latest with "katello_key_system_groups_pkey" not foundClosedEric Helms01/15/2016Actions
Blocks Foreman - Feature #13244: Upgrade Ruby on Rails to 4.2ClosedDominic Cleal01/15/2016Actions
Blocked by foreman-tasks - Bug #13335: Tests fail on Rails 4.1.14ClosedEric Helms01/22/2016Actions
Blocked by Katello - Bug #13592: Partial ../overrides/foreman/activation_keys/_host_tab accessed outside of view pathsClosedDavid Davis02/08/2016Actions

Added by Dominic Cleal about 9 years ago

Revision fd12fc8f (diff)

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.

Actions

Also available in: Atom PDF