"There is no real ending. It's just the place where you stop the story."~ Frank Herbert
Project Background
MediaWiki is a free and open-source Wiki application. It powers a lot of websites including Wikipedia, Wiktionary, and Wikimedia commons. It uses WebdriverIO, an open-source test automation framework, as its primary end-to-end testing framework. WebdriverIO v6 was released in late March 2020, while its previous version, v5 was released in early December, 2018. However, most of MediaWiki’s repositories use v4 which has now been deprecated while the rest are at v5, which is also not the latest version. WebdriverIO v6 brings with it a number of internal improvements that speed up test execution with lower CPU and memory usage. Upgrading to the current version would therefore be very beneficial. Unfortunately, there is no easy upgrade tool to update test suites from v4 to v5. No wonder ‘Upgrade WebdriverIO to the latest version for all repositories’ made it to the project list for GSoC 2020.
Initial Analysis
WebdriverIO Version | No of MediaWiki repositories |
---|---|
v4 | 23 |
v5 | 5 |
v6 | 2 |
Getting Familiar
Wikimedia uses Gerrit, for code review. Gerrit is a free, web-based team code collaboration tool which integrates closely with Git, a distributed version control system. MediaWiki is the collaborative editing software that runs Wikipedia and the other Wikimedia projects. It consists of a number of extensions and skins along with the core repository. To familiarize the students with the existing codebase as well as Gerrit my mentor Željko had created a set of microtasks:
- Make a trivial change to tests/selenium/README.md file of mediawiki/core repository
- Run Selenium tests on your machine
- Amend existing commit in Gerrit
- Update a simple test suite to WebdriverIO version 5
- Update package.json of mediawiki/core to use WebdriverIO version 6
Approach
Getting Started
To determine how difficult upgrading each repository to the latest version would be, we decided to track the Lines of Code and Number of Tests. To ensure that the tests don’t fail after the upgrade, running them locally was imperative. Since using Docker to set up the local development environment was fairly new, most of the repositories did not have a proper installation guide. So, as a next step we decided to create MediaWiki-Docker documentation for all repositories with Selenium tests
Progress So Far
repository | version | task |
---|---|---|
mediawiki/core | 6 | T253306 |
mediawiki/extensions/AbuseFilter | 6 | T253167 |
mediawiki/extensions/AdvancedSearch | 6 | T255382 |
mediawiki/extensions/CirrusSearch | 4 | T257525 |
mediawiki/extensions/Cite | 6 | T253343 |
mediawiki/extensions/ContentTranslation | 6 | T252521 |
mediawiki/extensions/Echo | 6 | T250610 |
mediawiki/extensions/ElectronPdfService | 6 | T250179 |
mediawiki/extensions/EntitySchema | 6 | T258639 |
mediawiki/extensions/FileImporter | 6 | T253256 |
mediawiki/extensions/GrowthExperiments | 6 | T244763 |
mediawiki/extensions/Math | 6 | T253791 |
mediawiki/extensions/MobileFrontend | 6 | T256977 |
mediawiki/extensions/Newsletter | 6 | T253260 |
mediawiki/extensions/ORES | 6 | T253261 |
mediawiki/extensions/Popups | 6 | T258620 |
mediawiki/extensions/RelatedArticles | 6 | T250685 |
mediawiki/extensions/RevisionSlider | 6 | T250601 |
mediawiki/extensions/TemplateWizard | 6 | T257340 |
mediawiki/extensions/Wikibase | 5 | T255045 |
mediawiki/extensions/WikibaseCirrusSearch | 6 | T252885 |
mediawiki/extensions/WikibaseLexeme | 5 | T255051 |
mediawiki/extensions/WikibaseMediaInfo | 6 | T253487 |
mediawiki/skins/MinervaNeue | 6 | T255447 |
phab-deployment | 6 | T255471 |
wikibase/termbox | 5 | T260942 |
wikidata/query/gui | 6 | T255055 |
wikimedia/portals/deploy | 4 | T255463 |
I still remember the day my first commit got merged in May. From that day, the graph has only gone up! Now, when I look back I see a total of 40 merged commits. Here’s a little breakdown of them.
Month | No of merged commits |
---|---|
May | 14 |
June | 12 |
July | 9 |
August | 5 |
You can find all my patches on Wikimedia Gerrit here.
Final Analysis
WebdriverIO Version | No of MediaWiki repositories |
---|---|
v4 | 2 |
v5 | 4 |
v6 | 24 |
Acknowledgements
It’s been 5 months since I first started working with the organization which gave me the opportunity to work with a lot of amazing people. It has been an unforgettable journey and an awesome learning experience.
This project would not have been possible without the support and guidance of my mentors:
- Željko Filipin, for the best on-boarding experience and teaching me about the importance of good commit messages, bug reports and small patches.
- John Bolorinos, for teaching me good bug report practices, and for his constant support and encouragement.
- Gabriel Pita, for adding the fun factor in all of the meetings with his awesome sense of humor.
A huge shoutout to Monte Hurd and Edward Tadros for all their help when Željko was on vacation.
What Lies Ahead
-
Complete my pending tasks.
- Try and be a co-mentor with Željko and introduce more students to the world of OpenSource!
I can’t wait to see what my journey as a Volunteer for the organization will have in store for me. Onwards and upwards!