Override cache settings during rb-site invocation.

Review Request #12457 — Created July 12, 2022 and submitted — Latest diff uploaded

Information

Review Board
release-5.0.x

Reviewers

The change to move from MemcachedCache to PymemcacheCache broke
things when upgrading from a Python 2-based Review Board 3.0.x to Python
3-based 5.0 beta 1. The problem is that various code paths during
django.start() ended up triggering cache operations, and trying to set
up the old (pre-migrated) MemcachedCache would fail due to a missing
module. We migrate this setting during the upgrade process, but we never
got that far.

This change fixes rb-site to override any stored cache settings and just
use the local-memory cache for the duration of the command. This is
guaranteed to work regardless of what modules happen to be installed.

Ran rb-site upgrade on a site where the old environment used the
memcached package, and the new environment used the pymemcache
package.

Diff Revision 1 (Latest)

Commits

First Last Summary ID Author
Override cache settings during rb-site invocation.
The change to move from `MemcachedCache` to `PymemcacheCache` broke things when upgrading from a Python 2-based Review Board 3.0.x to Python 3-based 5.0 beta 1. The problem is that various code paths during `django.start()` ended up triggering cache operations, and trying to set up the old (pre-migrated) `MemcachedCache` would fail due to a missing module. We migrate this setting during the upgrade process, but we never got that far. This change fixes rb-site to override any stored cache settings and just use the local-memory cache for the duration of the command. This is guaranteed to work regardless of what modules happen to be installed. Testing Done: Ran rb-site upgrade on a site where the old environment used the `memcached` package, and the new environment used the `pymemcache` package.
913d015a0040d9898f3a1178b1ea7f74aea80fc8 David Trowbridge
reviewboard/cmdline/rbsite.py
Loading...