Rails unable to initialize after downgrading from 18.0 to 17.11
Context
We've upgraded Rails cache format version in 18.0 !190024 (diffs).
When an instance is upgraded to 18.0, but then further downgraded to 17.11, the new cache format could not be read on 17.11 and would throw this error:
incompatible marshal file format (can't be read)
format version 4.8 required; 17.1 given
This has affected self-managed instances if they need to downgrade, and also developers when they are checking out an older branch. Reports on slack (internal)
This issue also affects customer's abilities to do zero-downtime upgrades (internal customer ticket).
Proposal
- Document the changes to clear their Redis cache. This would be a simple workaround if the instance could run a Rake task to clear cache, but the problem is these instances wouldn't be able to load Rails in the first place. The only way would be to run a Lua script, which is not ideal.
- The better alternative is to support the backwards compatibility on GitLab 17.11 itself by passing a custom
coderin theActiveSupport's cache store. This is attempted in !195620 (closed), and would need to be backported to 17.11.
Edited by Kate Grechishkina