Project

General

Profile

Actions

Feature #29991

closed

Enable Zeitwerk autoload mode for Rails 6+

Added by Lukas Zapletal over 4 years ago. Updated 19 days ago.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:
-
Difficulty:
Triaged:
No
Fixed in Releases:
Found in Releases:

Description

We should take advantage of the new and threadsafe autoloader: https://guides.rubyonrails.org/autoloading_and_reloading_constants.html#enabling-zeitwerk-mode


Subtasks 37 (6 open31 closed)

Refactor #33886: Fix early loads of constantsReady For TestingOndřej EzrActions
Refactor #33887: Postpone CacheManager recache after rails is initializedRejectedOndřej EzrActions
Refactor #33888: Postpone Setting load to after_initializationNewActions
Refactor #33889: Postpone FogExtensions after initializationNewActions
Refactor #33890: Require foreman/gettext directlyClosedActions
Refactor #33891: require Telemetry constantsDuplicateActions
Refactor #33892: Postpone setting validations to to_prepareClosedOndřej EzrActions
Refactor #33949: Fix early load of plugin fact parsersClosedLeos StejskalActions
Refactor #33950: Fix early load of ForemanInternal in initializerClosedLeos StejskalActions
Refactor #33957: Require Foreman::Util in initializersClosedLeos StejskalActions
Refactor #33964: Load Menu::Loader in 'to_prepare'ClosedLeos StejskalActions
Refactor #33967: Move basic ActiveRecord::Base custom extensions to ApplicationRecordClosedLeos StejskalActions
Refactor #33968: Fix loading of Foreman::Telemetry in initializersClosedLeos StejskalActions
Refactor #33975: Move menu loader from registries to servicesNewActions
Refactor #33989: Delay Initialization of ApiPie that depends on Model classesClosedLeos StejskalActions
Refactor #33991: Require /lib dependencies in initializers/foreman.rb ClosedLeos StejskalActions
Refactor #34005: Require middlewares properlyClosedActions
Refactor #34006: Plugin and its rbac_support are using Role and Permission models too earlyClosedOndřej EzrActions
Refactor #34009: Add plugin after_initialize hookClosedOndřej EzrActions
Refactor #34010: Add initialization method to RbacRegistryClosedOndřej EzrActions
Refactor #34011: Move add_permissions_to_default_roles to rbac_registryRejectedActions
Refactor #34012: Move add_all_permissions_to_default_roles to RbacRegistryRejectedActions
Refactor #34013: Move add_resource_permissions_to_default_roles to RbacRegistryRejectedActions
Refactor #34014: Move role creation into RbacRegistryRejectedActions
Refactor #34015: Move permission creation in DB to RbacRegistryRejectedActions
Refactor #34350: Require 'foreman/telemetry' in ldap initializerClosedLeos StejskalActions
Refactor #34353: Fix early load of fog_extensionsClosedLeos StejskalActions
Refactor #33895: setup Zeitwerk inflectorClosedEwoud Kohl van WijngaardenActions
Refactor #33896: Document how plugins can adjust Zeitwerk inflectorNewActions
Refactor #34007: Zeitwerk - remove 'foreman/provision' from init/foremanNewActions
Refactor #34137: Auto-loading & requiring /lib codeClosedActions
Refactor #34138: Autoload ProxyAPI files from /app/servicesClosedActions
Refactor #34139: Move Foreman::Renderer from lib/ to app/servicesClosedActions
Refactor #34146: Move services from lib/foreman to app/services/foremanClosedLeos StejskalActions
Refactor #34165: Require code from lib folderClosedLeos StejskalActions
Refactor #34646: Move initialization from application.rb into initializerClosedOndřej EzrActions
Bug #35419: Remove empty webpack_assets.rb fileClosedEwoud Kohl van WijngaardenActions

Related issues 5 (1 open4 closed)

Related to Foreman - Tracker #24837: Rails 6.0 TrackerClosed

Actions
Related to Foreman - Tracker #28570: Rails 6.1 TrackerClosed

Actions
Related to foreman-tasks - Bug #34917: Tasks are loading ApplicationRecord too soon and it derails RailsClosedOndřej EzrActions
Related to Foreman - Tracker #37480: Support Zeitwerk loader in pluginsClosedOleh Fedorenko

Actions
Blocks Foreman - Tracker #34647: Rails 7.0 TrackerNewEwoud Kohl van Wijngaarden

Actions
Actions #1

Updated by Lukas Zapletal over 4 years ago

Actions #2

Updated by Lukas Zapletal over 4 years ago

Actions #4

Updated by Ondřej Ezr almost 3 years ago

  • Tracker changed from Bug to Feature
Actions #5

Updated by Ondřej Ezr over 2 years ago

Actions #6

Updated by Ondřej Ezr over 2 years ago

  • Related to Bug #34917: Tasks are loading ApplicationRecord too soon and it derails Rails added
Actions #7

Updated by Oleh Fedorenko 6 months ago

  • Status changed from New to Assigned
  • Assignee set to Oleh Fedorenko
Actions #8

Updated by The Foreman Bot 6 months ago

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

Updated by Oleh Fedorenko 2 months ago

Actions #10

Updated by The Foreman Bot 2 months ago

  • Pull request https://github.com/theforeman/foreman/pull/9328 added
Actions #11

Updated by The Foreman Bot about 1 month ago

  • Pull request https://github.com/theforeman/foreman/pull/10299 added
Actions #12

Updated by The Foreman Bot 26 days ago

  • Fixed in Releases 3.13.0 added
Actions #13

Updated by Oleh Fedorenko 26 days ago

  • Status changed from Ready For Testing to Closed
Actions #14

Updated by The Foreman Bot 19 days ago

  • Pull request deleted (https://github.com/theforeman/foreman/pull/10131, https://github.com/theforeman/foreman/pull/9328, https://github.com/theforeman/foreman/pull/10299)
Actions

Also available in: Atom PDF