Page MenuHomePhabricator

CodeReview extension: Code stewardship review
Open, MediumPublic

Description

Background

This extension was developed in 2008 by Brion Vibber and Aaron Schulz back when our code was still hosted using Subversion (SVN). While Subversion did not accomodate a workflow to review code before committing, this MediaWiki extension was developed to make it easy to view, annotate and review code changes after committing.

This feature was used for all Wikimedia development until 2012, when the migration to Git and Gerrit started. The transition was completed by 1 August 2013. More about this at https://www.mediawiki.org/wiki/Git/Conversion.

The feature can be seen at https://www.mediawiki.org/wiki/Special:Code/MediaWiki.

Documentation: https://www.mediawiki.org/wiki/Extension:CodeReview.
Repository: https://gerrit.wikimedia.org/g/mediawiki/extensions/CodeReview/ (GitHub mirror)
Maintainer(s) (per mw.org): Jack Phoenix, Chad Horohoe, Sam Reed.
First deployed to Wikimedia production: In 2009.

Problem statement

Since Jan 2013, the "review" feature of this extension have not been in use at Wikimedia. However, the extension has remained deployed for the past 5 years for the purposes of viewing past code changes and the discussions/reviews attached to them. The availability of these discussions are important to future software development.

Commits since 12 months ago: 58 commits. (not including Localisation updates).

Commits since abandonment (September 2013): 131 commits. This is without counting Localisation updates. Including those, there were 477 commits from December 2013 to June 2018 (git log --oneline --no-merges '000b8db40fdfa8256...' | wc -l)

Developers who committed code in the last 12 months: 11 commit authors (not including Localisation updates and Libraryupgrader)

Number, severity, and age of known and confirmed security issues:
See https://phabricator.wikimedia.org/maniphest/query/zjCLOQUbrdbC/#R (not putting numbers here as this task is public)

Was it a cause of production outages or incidents?:
?

Does it have sufficient hardware resources for now and the near future?:
?

Is it a frequent cause of monitoring alerts that need action, and are they addressed timely and appropriately?:
?

Usage statistics based on audience(s) served:
?

Number and age of open patches:
Currently 1 from 2015, according to https://gerrit.wikimedia.org/r/#/q/project:mediawiki/extensions/CodeReview+status:open

Number and age of open bugs:
Currently 63 feature requests and bug reports according to https://phabricator.wikimedia.org/maniphest/query/vAuDCciI6GhY/#R

Submitter's recommendation (@Krinkle):

Undeploy the extension, but before we can do that, we should preserve the content worth preserving and set up redirects.

The most valuable content is imho the code review discussions. For example, https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103711#code-comments.

We'd need to development of a way to export these pages as static HTML, and decide how redirect the urls.

Rough notes:

  • Maybe a maintenance script to render the pages without the skin (like action=render, except that doesn't work on special pages currently).
  • Redirect urls using Apache rewrites? Remember that we support both Code/MediaWiki/r1 and Code/MediaWiki/1 as url pattern.
  • Rough proof of concept: https://codepen.io/Krinkle/full/ERbQQZ/

See also:

Event Timeline

Krinkle created this task.Sep 25 2018, 7:43 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 25 2018, 7:43 PM
Aklapper updated the task description. (Show Details)Sep 26 2018, 8:31 AM

Why not just archive it?

@Liuxinyu970226: Because it's deployed?!

Why not just archive it?

AFAIK nobody has suggested it is falling behind in maintenance (relative to other primarily third party extensions), and it is used by other people. Just because we stopped using something isn't grounds for archiving imo.

I think the concern is that it is a big component that we don't really use anymore, and we can reduce the complexity of our deployed code by converting all the comments into some other form. Ideally also we would maintain link compatibility.

Bawolff added a subscriber: ashley.Dec 13 2018, 8:19 PM
Tgr added a subscriber: Tgr.Dec 13 2018, 10:26 PM

Maybe a maintenance script to render the pages without the skin (like action=render, except that doesn't work on special pages currently).

FWIW you can use the API's null skin: https://www.mediawiki.org/wiki/Special:Code/MediaWiki/103711?useskin=apioutput

If I interpret this correctly, the reason we are looking to undeploy/sunset this extension is because it is no longer actively used for code review activities and we are looking to reduce the deployed code base in order to minimize complexity/failure points. It is however, used for historical review of past code changes. The desired outcome would then be to undeploy the extension whilst preserving access to past code review activities.

If that is the case, who would be best to involve in the data migration discussions?

Jrbranaa triaged this task as Medium priority.Feb 13 2019, 11:29 PM

@greg @Kunal, @Krinkle and I were chatting about moving this forward. Sounds like the next step is to have a discussion about what it would take to archive the data. Once we scope it out a bit we'll be in a better position to understand the effort involved and whether or not we need to get supplemental funding.

Do we want to scope this out here or create a new task to capture that?

greg added a comment.Feb 14 2019, 5:29 PM

Do we want to scope this out here or create a new task to capture that?

New task.

New task.

Task created.

Causing issues with bad performant queries on mediawiki.org (s3) databases: T218079

Aklapper updated the task description. (Show Details)Jun 8 2019, 10:49 AM

I'll be moving this task to Done on the CS work board as RelEng is taking on CS responsabilities as it's being sunsetted.

Jrbranaa added a subscriber: Jdforrester-WMF.
Jrbranaa moved this task from Blocked to Done on the Code-Stewardship-Reviews board.