Outreachy Internship: Initial Experiences (First Biweekly Report)

Posted on July 28, 2020
Cover image creadits : undraw.co

This blog post is about my initial experiences as an Outreachy intern at the Wikimedia Foundation!

First Impressions

Confused and Excited.

After eagerly waiting for my outreachy internship to being, I was extremely thrilled to finally start working on the project. The first task that was assigned to me was to migrate the code repository from Github to Gerrit as the latter is the official code hosting platform for the Wikimedia Foundation.

Gerrit was something with which I had no prior experience with whatsoever. So I took the first few days to make myself comfortable with the tool. Gerrit follows a very different approach from what other platforms like github do. For example, instead of tracking new branches, it assigns a Change-Id to every new feature. This change Id is a unique identifier. Any changes made to a commit are tracked using this Change Id as the commit hash gets modified whenever there is a change. Thankfully, the documentation of Gerrit is great and the examples really helped me understand the flow.

The next task assigned to me was to set up the project with the Wikimedia CI service. Wikimedia uses jenkins job builder (JJB) to create and manage Jenkins jobs. Again, this was a completely new experience for me. I used the tox-docker template of JJB for the project and added the project to the zuul/layout.yaml file in the Integration/config repository inorder to make Jenkis track changes to the project and run the required jobs. A special thanks to the Wikimedia community as this was completely new for me and I asked way too many questions on the IRC channel. Each time I received a prompt and accurate response! I even received help for setting up permissions for my Gerrit account. Next, I set up tox for the project. It was a simple task where I ran two tests, first was the django tests to test the python code and the other was for code linting using black.

Setting up the Development Environment

Since the project requires communicating with the Wikimedia API, authenticating users and uploading images, continuously spamming the existing wikimedia deployments was not a good idea. My mentor suggested that I should set up Wikimedia Vagrant on my local machine for development. This was a complex challenge as I had to read a lot of documentation about how the vagrant works and what all roles should I enable. Since the application required OAuth, I enabled the OAuth role with suitable permissions.

Next, I created an application in my development environment, approved it and integrated it with the project locally. I initially ran into some issues with the HTTP/HTTPS connection but that was due to a third party package.

Setting the Wikimedia Vagrant has really helped me speed up my testing of the tool as I did not have to worry about exposing images without proper permission and/or licenses.

Final Thoughts

As you might notice, in the first 3 weeks of my internship, I did not work much on the project. But by setting up the CI service and the local development environment, I laid the foundation that will enable me make the upcoming months more productive, smooth and effortless.