Back to blog

GSoC GitLab Plugin Modernization Project

Harsh Pratap Singh
Harsh Pratap Singh
August 24, 2023

The goal of this blog is to showcase the work done on GitLab Plugin during the Google Summer of Code 2023. For a detailed description of the project, please refer to the project page.

About Project

Plugins grow old and become difficult to maintain with time. GitLab Plugin was one such plugin that needed some love and care. The GitLab Plugin Modernization project thus aimed to modernize the GitLab Plugin by replacing the (RESTEasy) library with modern (GitLab4J-API) library via Jenkins (GitLab API plugin). The replacement normalizes the use of the GitLab API with regard to the (GitLab Authentication), (GitLab Branch Source), and (GitLab Logo) plugins. This modernization reduces future maintenance burden and improves the overall quality of the plugin by making it more lightweight due to reduced dependencies and enhanced documentation.

The migration was performed in the following 2 coding phases:

Phase 1

In this phase, the following tasks were completed:

  • Migration of GitLab Plugin from RESTEasy to GitLab4J-API via the GitLab-API plugin, without affecting the webhook functionality of the plugin. (PR)

  • Interactive testing of partially migrated plugin.

The achievements of this phase were demonstrated in the Midterm Presentation.

Phase 2

In this phase, the following tasks were completed:

  • Adapting webhooks implementation to GitLab4J-API.(PR)

  • Migrating the Proxy Settings from RESTEasy to GitLab4J-API.(PR)

  • Partially adapting the Unit and Integration tests.

  • Improving the documentation of the plugin.(PR)

  • Interactive testing of the fully migrated plugin.

The results of this phase will be showcased in in the Final Presentation in the future.

Future Improvements

  • As GitLab has discontinued the GitLab API V3, the plugin should only support GitLab API V4 and above. Thus the plugin will be updated to support GitLab API V4 and above only.

  • The plugin lacks the test coverage, thus the plugin’s Unit, Integrations as well as Docker-based Tests will have to be updated.

  • GitLab 16.0 has introduced some breaking changes which will have to be handled in the plugin.

Acknowledgments

My gratitude knows no bounds that I got the opportunity to contribute to such impactful project under Google Summer of Code with such kind mentors. I would like to thank my mentors, Kris Stern and Mark Waite for their constant support and guidance throughout the project. They put in a lot of effort in interactively testing the migrated plugin and providing me with valuable feedback. They never let me be stuck in any difficulty for too long and always helped me in finding the solution to the problem. I would also like to thank Basil Crow for the guidance he provided me with during the initial phase of the project, which helped the team shape the project.

Also, thanks to the org admins, Jean-Marc Meessen, Alyssa Tong, Kris Stern, and Bruno Verachten, for always keeping me and other contributors on our toes and assisting us with any blockers and concerns by organizing weekly stand-up calls and personal 1-to-1 meets every phase.

About the author

Harsh Pratap Singh

Harsh Pratap Singh

Harsh is currently a Freshman at the Indian Institute of Technology, Kanpur, whose interests lies in rapidly evolving Computer Science fields like DevSecOps, Blockchain and more. He is an avid open-source contributor and is inspired by the idea of developing useful open-source software for the masses to use. Other than software development, his interest lies in economics, philosophy, and psychology. He is a Jenkins Google Summer of Code (GSoC) contributor in 2023, participating in the GitLab Plugin Modernization project. He started his journey of contributing to Jenkins in February 2023 and got hooked since.