Page MenuHomePhabricator

Document venues for hosting new code repositories and recommend when to use what
Closed, ResolvedPublic

Description

https://www.mediawiki.org/w/index.php?title=Template:Recommended_Steps_to_Participate_for_Outreach_Programs_Mentors (used by the GSoC/Outreachy mentors' guides) currently says:

Help host new projects created during the program under the Wikimedia umbrella on [https://github.com/wikimedia GitHub] or [http://gerrit.wikimedia.org/ Gerrit].

It looks like there are a few resources on MediaWiki.org related to this topic:
https://www.mediawiki.org/wiki/Gerrit/New_repositories
https://www.mediawiki.org/wiki/Gerrit/New_repositories/Requests
https://www.mediawiki.org/wiki/Git/Creating_new_repositories (for administrators)
https://www.mediawiki.org/wiki/Manual:Developing_libraries

But, there isn't a resource that lists all the venues in one place and recommend when to use what. Like when to use:

(Might be more venues that I am not aware of Gitlab, SourceForge, etc)

This resource might be helpful not just for outreach program candidates or newcomers but probably for the broader Wikimedia technical community, especially for folks who are into developing tools, bots, etc.

Event Timeline

But, there isn't a resource that lists all the venues in one place and recommend when to use what.

I think people either prefer Github (because "drive-by contributions" in theory, or "code base reusable outside of Wikimedia") or Wikimedia Gerrit (automated CI via Jenkins, global code search to find deprecated code to update, etc) or Phabricator Diffusion (Striker etc). That's what's on the table.
Then, the decision between these is pretty much based on personal preferences. (Someone correct me if I'm wrong.) Because bottom-up and JFDI culture.

My personal preference is Gerrit because no forking needed when a single maintainer becomes AWOL and it's easier to give people +2 if the maintainer is AWOL.

PS: Yes, Gerrit UI isn't very user friendly, more people might be used to Github workflows, etc, etc, etc. I hope this ticket won't become a "vim vs emacs" bikeshed thread.

Aklapper triaged this task as Medium priority.
Aklapper updated the task description. (Show Details)

In the 2012 VCS and code review tool evaluation, https://www.mediawiki.org/wiki/Git/Gerrit_evaluation#GitHub was created to lists pros and cons about GitHub. The decision at that time was for Gerrit.
Since an edit by WMF staff in 2015, https://www.mediawiki.org/wiki/Gerrit/GitHub states that "The authoritative repository for nearly all Wikimedia projects is https://gerrit.wikimedia.org."
Hence currently folks should preferably host their code repositories on Gerrit (which also means that we cannot force people not to use Github).

I pulled the wikitext of https://www.mediawiki.org/w/index.php?title=Google_Summer_of_Code/Past_projects&oldid=4034012 and https://www.mediawiki.org/w/index.php?title=Outreachy/Past_projects&oldid=4060758 (which unfortunately are rather free-text when trying to get code repository location URLs, plus are definitely incomplete) to check the first item in URLs after the domain name:

1See T251651
2
3$:acko\> grep -Eo 'github\.com.{0,50}' pastprojects-gsoc | sort | uniq -c | sort -n
4 1 github.com/apsdehal/WikidataAnnotationFeeder/.
5 1 github.com/balabky9 Balakarthikeyan Rajan]
6 1 github.com/cdauth/htmldiff htmldiff], a non-MediaWiki PHP li
7 1 github.com/commons-app/apps-android-commons/pull/2970 pull r
8 1 github.com/commons-app/apps-android-commons/pulls?utf8=%E2%9
9 1 github.com/Falit/CodeEditor see here]) - Student: [[User:Fal
10 1 github.com/gopavasanth/video-cut-tool-back-end/ Back-end cod
11 1 github.com/gopavasanth/video-cut-tool-front-end/ Front-end c
12 1 github.com/harshkothari410/lcmd.git here]. A demo was previo
13 1 github.com/infobliss/sibutest2/ source code on Github], [[ph
14 1 github.com/konarak/LUv2 here], though it is no longer viewab
15 1 github.com/MeghaSharma21/WorklistTool-GSoC-2018 codebase on
16 1 github.com/pravee-n/jquery.ime-chrome-extension here] and [h
17 1 github.com/pravee-n/jquery.ime-firefox-extension here].
18 1 github.com/psinghal20/626bd4bc617c70b4643ba799cac6a2d1 final
19 1 github.com/rohit-dua/bub here] and the tool can be seen in u
20 1 github.com/saurabhbatra96/wmf-fd-api main API code], [https:
21 1 github.com/saurabhbatra96/wmf-fraud-pipeline sample pipeline
22 1 github.com/shivanshbindal9/6c66380bf1dc4df820c9f0cf40e2816b
23 1 github.com/strayblues/8c22a4e3be7cbded4ab1808f8639d945/ fina
24 1 github.com/WikiEducationFoundation/apps-android-wikiedudashb
25 1 github.com/WikiEducationFoundation/WikiEduDashboard/commits?
26 1 github.com/WikiEducationFoundation/WikiEduDashboard/pulls?ut
27 1 github.com/wikimedia/ifttt/commits/gsoc?author=ch3nkula comm
28 1 github.com/wikimedia/ifttt Wikimedia web app] that provides
29 1 github.com/wikimedia/labs-tools-facebook-messenger-chatbot c
30 1 github.com/wikimedia/mediawiki-api-demos/pulls?q=is%3Apr+is%
31 1 github.com/wikimedia/mediawiki-extensions-Cargo/commits?auth
32 1 github.com/wikimedia/WikiContrib/pulls?q=is%3Apr+author%3ARa
33 1 github.com/WikipediaLibrary/hashtags/commits?author=Jain-Adi
34 2 github.com/commons-app/apps-android-commons/pulls?q=is%3Apr+
35 2 github.com/WikiEducationFoundation/WikiEduDashboard/pulls?q=
36$:acko\> grep -Eo 'github\.com.{0,50}' pastprojects-outreachy | sort | uniq -c | sort -n
37 1 github.com/AikoChou/citationdetective github repository], [h
38 1 github.com/ankitashukla/mediawiki-spelling-dictionary Availa
39 1 github.com/ephemeralwaves/Tests-for-Echo-Flow/tree/master/fe
40 1 github.com/wikimedia/MediaWiki-Action-API-Code-Samples/pulls
41 1 github.com/wikimedia/MediaWiki-Action-API-Code-Samples/tree/
42 1 github.com/wikimedia/mediawiki-api-demos/pulls?q=is%3Apr+aut
43 1 github.com/wikimedia/WikiContrib Repository:] , [[phab:T2491
44```

This data isn't too great as it also includes some previously existing projects which were and are on GitHub (legit), plus sometimes simply mirrored projects under one of the org umbrellas listed in the task description, however it gives you a very rough impression:

Either Github (or our lack of recommendations) seem to encourage folks to set up the repo under their own user account.
In my understanding, this also means that if a single individual has "control" over the repo that the only way for others when the individual might become inactive is forking. Forking requires any URLs (in external configs, or in potential external documentation like wiki pages) to be updated. The advantage of a non-individual repository (as in Gerrit, or under a GitHub org) is that URLs don't change even if code stewards or maintainers changed.

NB: Maybe some of the repos listed in the grep above have been moved later on when it comes to their canonical location. However such a move wouldn't be needed initially if Github wasn't used like this for outreach program projects. :)

Boldly resolved by https://www.mediawiki.org/w/index.php?title=Template:Recommended_Steps_to_Participate_for_Outreach_Programs_Mentors&type=revision&diff=4061395&oldid=4034136

Until the next fitter, happier, more productive code review tool comes around the corner to replace Gerrit.

Also, suspended Github accounts might be another (hopefully uncommon) reason why using self-hosted services for accounts and code might not be a bad idea. :-/