sanger / sequencescape

Web based LIMS
MIT License
80 stars 32 forks source link

Y24-133 - Update Rails 6.1 autoloader to Zeitwerk #4141

Open dasunpubudumal opened 2 weeks ago

dasunpubudumal commented 2 weeks ago

Describe the Housekeeping

As a developer, I need to complete Rails 6.1 migration by changing Rails default's autoloader to Zeitwerk.

We started Rails upgrade from 5.0 to 6.1 in https://github.com/sanger/sequencescape/issues/4006, and began upgrading the defaults in https://github.com/sanger/sequencescape/issues/4005. However, the defaults upgrade in https://github.com/sanger/sequencescape/issues/4005 was done incrementally, by explicitly defining the autoloader config.autoloader = :classic, but upgrading the defaults config.load_defaults to 6.1.

This story entails updating the autoloader to :zeitwerk, and updating the file structure to match Zeitwerk requirements. Also, it might be necessary to refactor the code in order to match Zeitwerk autoloading.

The process can start with a zeitwerk:check and by updating application as necessary.

Blocking issues

  1. 4138

  2. 4139

Note that #4139 might not necessarily "block" the implementation of this story but without it, it might not be able to run a regression test to verify the functionality of sequencescape.

Additional context

Related stories:

  1. 4006

  2. 4005