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.

Seb35 created this task.Apr 11 2017, 7:11 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 11 2017, 7:11 PM
Seb35 triaged this task as Normal priority.Apr 11 2017, 7:11 PM
Seb35 added a comment.Sep 8 2017, 6:26 AM

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.

Seb35 claimed this task.Sep 13 2017, 5:59 PM

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 closed this task as Resolved.Feb 13 2018, 2:15 PM
Seb35 removed a project: Patch-For-Review.