Page MenuHomePhabricator

Delete a wiki from cache when it is deleted in origin files
Closed, ResolvedPublic

Description

When a wiki is deleted in origin config files, it may happen it is not deleted from the cache files.

I found it is at least the case in the 'deployments' case (when this mechanism is defined in farms.yml). This mode is aiming at delaying the update of a wiki, even if the config files say another version, until the script update.php is run, so that the wiki is not in a inconsistent state since it uses the old version until its database is updated. But the case the wiki is deleted should be anyway taken into account.

To be exhaustive, it should be checked in the various other modes.

Details

Event Timeline

Seb35 triaged this task as Medium priority.Apr 11 2017, 7:11 PM

I checked the others cases (i.e. when the deployment mode is not used) : it works correctly when there is no cache and when cache is enabled.

I saw a side bug: the cached file in /cache/wikis is not used in most cases because the URL path is appended and the file is searched with this name, which is obviously not found; I will open such a bug.

I worked on it and will send soon this patch. I rewrote the part with the mechanism 'deployment' and I’m quite happy with this new code, more clear than before.

Change 409703 had a related patch set uploaded (by Seb35; owner: Seb35):
[mediawiki/extensions/MediaWikiFarm@master] Improve the deployment mechanism

https://gerrit.wikimedia.org/r/409703

Change 409703 merged by jenkins-bot:
[mediawiki/extensions/MediaWikiFarm@master] Improve the deployment mechanism

https://gerrit.wikimedia.org/r/409703

Seb35 removed a project: Patch-For-Review.