discourse/plugins
Alan Guo Xiang Tan bf3e121323
DEV: Set config.eager_load = true on CI (#25032)
Why this change?

When running system tests on our CI, we have been occasionally seeing
server errors like:

```
Error encountered while proccessing /stylesheets/desktop_e58cf7f686aab173f9b778797f241913c2833c39.css
  NoMethodError: undefined method `+' for nil:NilClass
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/path/pattern.rb:139:in `[]'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:127:in `block (2 levels) in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each_with_index'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `block in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `map!'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:32:in `serve'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/routing/route_set.rb:852:in `call'
```

While looking through various Rails issues related to the error above, I
came across https://github.com/rails/rails/pull/27647 which is a fix to
fully initialize routes before the first request is handled. However,
the routes are only fully initialize only if `config.eager_load` is set
to `true`. There is no reason why `config.eager_load` shouldn't be `true` in the
CI environment and this is what a new Rails 7.1 app is generated with.

What does this change do?

Enable `config.eager_load` when `env["CI"]` is present
2023-12-26 13:05:55 +08:00
..
chat DEV: Set config.eager_load = true on CI (#25032) 2023-12-26 13:05:55 +08:00
checklist Update translations (#24599) 2023-11-29 10:41:27 +01:00
discourse-details UX:; scope details change (#24715) 2023-12-05 13:56:17 +01:00
discourse-lazy-videos FIX: Add rel=0 to youtube lazy videos url (#24173) 2023-10-31 08:04:23 -03:00
discourse-local-dates DEV: Convert min_trust_to_flag_posts setting to groups (#24864) 2023-12-13 17:18:42 +08:00
discourse-narrative-bot DEV: Fix various rubocop lints (#24749) 2023-12-06 23:25:00 +01:00
discourse-presence DEV: Convert min_trust_to_edit_wiki_post to groups (#24766) 2023-12-12 15:20:37 +11:00
footnote FEATURE: Admin plugin list redesign (#24363) 2023-11-21 09:37:11 +10:00
poll DEV: Remove usage of min_trust_to_create_topic SiteSetting (#24887) 2023-12-18 13:39:53 +11:00
spoiler-alert DEV: Fix "no-empty" lint (#24588) 2023-11-28 10:55:02 +01:00
styleguide Update translations (#24848) 2023-12-12 14:23:51 +01:00