Page MenuHomePhabricator

CentralNotice: Add controls to purge banner content in Varnish for a specific language
Closed, ResolvedPublic2 Story Points

Description

In the most recent version of T154954, we only purge banner loader URLs for the user's language, since purging for all languages every time a banner is saved would be too harsh on our infrastructure.

For cases where a user wishes to preview a banner (in a not-logged-in context) in a language other than the one they use on-wiki, maybe we could add some controls to the banner editor page to purge for a specified language, one at a time?

Also, to prevent this from becoming a DDOS vector, would we need to limit how often this can be done?

Thanks!!

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 22 2017, 6:07 PM
DStrine renamed this task from CentralNotice: Add controls to purge banner content in Varnish for a specific lanaguage to CentralNotice: Add controls to purge banner content in Varnish for a specific language.Jun 22 2017, 8:13 PM

Thanks @AndyRussG. Yes, being able to purge a specific language other than my own would be an important use case.

DStrine set the point value for this task to 2.Jun 26 2017, 4:27 PM

Hi @ema, @BBlack! :)

Just pinging to see if you have a comment on this aspect of this task:

Also, to prevent this from becoming a DDOS vector, would we need to limit how often this can be done?

Working now on coding up this feature... I think we might do a background call to Special:CentralNoticeBanners with special params to trigger the purge. It would only be available to users with CentralNotice administration rights on Meta. (There are about 60, I think? @Jseddon, is that correct?) Each click on the UI would cause a purge of 6 URLs from Varnish. Do you think we can just suggest people not click gratuitously, or is it necessary to enforce a limit somehow? Thanks!!!! ;)

Change 364910 had a related patch set uploaded (by AndyRussG; owner: AndyRussG):
[mediawiki/extensions/CentralNotice@master] Controls to purge banner content from front-end cache for a language

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

Change 364910 merged by jenkins-bot:
[mediawiki/extensions/CentralNotice@master] Controls to purge banner content from front-end cache for a language

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

Closing, since this is working fine on production! Thanks!!! :D

AndyRussG closed this task as Resolved.Oct 21 2017, 3:55 AM