Page MenuHomePhabricator

Review and deploy Petition extension to wikimediafoundation.org
Closed, ResolvedPublic

Description

This extension will be used for a petition to encourage mobile operators to join Wikipedia Zero. It only needs to be deployed on wikimediafoundation.org, not any other sites.

Would like to get this deployed as soon as possible, since we are aiming to launch the petition in June. The code has had some review already, but still needs a formal security and performance review.

mediawiki.org: https://www.mediawiki.org/wiki/Extension:Petition
bugzilla: https://bugzilla.wikimedia.org/buglist.cgi?component=Petition
gerrit: https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/Petition


Version: wmf-deployment
Severity: normal

Details

Reference
bz65849

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:11 AM
bzimport set Reference to bz65849.
bzimport added a subscriber: Unknown Object (MLST).
Pcoombe created this task.May 28 2014, 12:34 PM
greg added a comment.May 28 2014, 3:30 PM

Checklist

Done

  1. Create Extension: mediawiki.org page for developers and people who will install or configure the extension.
  2. Request a component in [[Bugzilla]].
  3. Get the extension code in [[Gerrit]].

Not Done

(in-progress, see dependent bugs)

  1. Request (and respond to) a performance review
  2. Request (and respond to) a security review
greg added a comment.May 28 2014, 5:29 PM

(In reply to Peter Coombe from comment #0)

Would like to get this deployed as soon as possible, since we are aiming to
launch the petition in June. The code has had some review already, but still
needs a formal security and performance review.

Do you have a target date? In 3 days or in 33 days? Somewhere in between? :)

demon added a comment.May 28 2014, 5:36 PM

Two things jumped out at me skimming this that need fixing.

  1. Since you're disabling the parser cache we end up doing a select count(*) on every render of the page. This probably isn't ok and needs some sort of caching (stash the count in memcached for some short period of time maybe?)
  1. Using $wgRequest in a parser function callback won't always work as you expect. Pages can be rendered in many contexts, not just from a web request (eg: command line jobs).

A clever way to get around (2) would be to make it an IncludableSpecialPage instead of a parser function (you can use $par for the existing title param). Then you could call the SpecialPage's getRequest() method and just embed the special page in a non-special one if you need.

Greg: We don't have a particular date (lots of other variables) but it would be good to have the extension deployed by the middle of June.

Chad: Thanks for the feedback, I'll look into these.

Okay, change of plan: we're now intending to launch the campaign the week of July 7th. Which gives a bit more time for changes, and aim to deploy late June.

Obviously this was delayed again, but we're hoping to launch next week.

As suggested by Chad, I changed from using a tag to an includable special page (https://gerrit.wikimedia.org/r/#/c/142561/). The signature count can also be stored in memcached now (https://gerrit.wikimedia.org/r/#/c/144174/)