Mentorship post originally published on dev.to by Magnim Thibaut Freedisch Batale

The Linux Foundation Mentorship Program offers a dynamic three-month internship where participants engage in hands-on projects while receiving a stipend. When I first applied for the LFX mentorship program, I was a novice in the field and had no idea how this experience would impact my professional growth. Looking back now, I can confidently say that my journey within the LFX program has been transformative, teaching me the power of perseverance and learning.

One of the main reasons I was drawn to the LFX mentorship program was the fact that the project on which the mentee will be working was already set before the beginning of the application process. This allowed me to choose a project that aligned with my interests and skill set.

Screenshot showing LFX Mentorship: CNCF-LitmusChaos: Improve Chaoscenter Web and Authentication Server: Add Unit Test Cases, Enhance page

*Early Challenges and Overcoming Them*

My initial applications to the LFX program were unsuccessful, which served as a stark reminder of the competitive nature of the field. However, I refused to let the setbacks deter me and immersed myself in various open-source communities. This period was crucial for me as I honed my skills, expanded my understanding, and became more comfortable diving into any codebase quickly. It was this groundwork that enabled me to craft a compelling proposal for the LFX program in Fall 2023, leading to my acceptance into my first-choice project – a perfect match for a skill I was looking forward to improving.

Screenshot showing LFX email t congratulate Magnim to be accepted as a mentee to the CNCF - LitmusChaos: Improve Chaoscenter Web and Authentication Server: Add Unit Test Cases, Enhance mentorship.

*The Mentorship Experience*

My mentors, Sayan Mondal, and Saranya  Jena, were instrumental in my journey, providing guidance and support throughout the program. Our weekly meetings became a cornerstone of my learning process, where I shared progress, discussed challenges, and received tasks for the upcoming week. These tasks were primarily focused on adding unit tests, which allowed me to gain hands-on experience and sharpen my skills. 

Screenshot showing 3 weeks completed tasks during September

After exploring the codebase, and setting up the project on my side, I got my first task in the second week: to modify the code architecture to interface model for the environment service package and write test cases for it. Which I successfully accomplished. The satisfaction of having my first contributions merged was unparalleled.

Screenshot showing Sayan Mondal mention to Magnim of his great work on adopting the interface structure so quickly and also writing a test suite on top of it.

October was a period of deepening involvement as I worked on adding unit tests to the authentication server’s REST and GRPC handlers. The absence of initial tests in these areas made my contributions all the more significant. The feedback from my mentors and maintainers was a critical part of my learning curve. I received crucial feedback on making my test cases as simple as possible to allow other contributors to maintain if those tests were to fail in the future.

November saw a shift in focus to the frontend, where I added test cases and developed new documentation for the auth API. Writing frontend test cases were new to me therefore, while I was writing my proposal, I was learning how to use the react testing library to be ready if I was selected, which I was 😉

During that time, I learned a lot about using test wapper to make testing simple and understandable.

*Achievements and Realizations*

Throughout the program, I raised nine PRs, with eight successfully merged and one under review. My work not only increased the backend coverage from 0 to 25.48% and enhanced the frontend coverage from 0 to 14.56%. One of my essential suggestions was the implementation of a new workflow to track test coverage in the Chaoscenter auth server. My contributions laid a foundation for future enhancements by other contributors. 

Screenshot showing litmus coverage chart at 20%

Moreover, I added a new documentation page for authentication using OPENAPI spec, which enables contributors to easily update the documentation page when a new endpoint is created just by modifying the annotations. For this, I used the go-swagger library to generate the doc and another library, swaggo, to write annotations and generate the API spec file. This simplified the documentation process and made it more accessible for newcomers and existing contributors. Click here to learn more about the new API documentation of Litmus Chaoscenter

Screenshot showing Magnim's post mentioning he has just completed updating the Chaoscenter doc, and got great positive response from Saranya and Sayan

*Challenges Faced*

The journey was not without its challenges. One of the major issues I encountered during that time was writing positive test cases. I struggled to write positive tests for the GRPC and environment handler. I tried different approaches to mocking most of the services used by the handler, but after doing unsuccessful research on the internet, I asked for help from the community. I got referred to different resources on how to mock handlers using GIN. All these resources were super helpful and helped write positive test cases and close this PR. That taught me how asking for help is OKAY. It was my first time writing unit tests at this scale for a large project, but I learned, researched, and asked for help from my mentors.

*What’s Next?*

After spending the whole fall working on this project, I plan to continue contributing to the testing strategy of LimusChaoscenter by helping new contributors who want to contribute to the project. I currently have one PR pending and a testing strategies documentation for Chaoscenter frontend to add. After that, I will maintain existing test cases and work on new ones.

**Conclusion**

The LFX mentorship program has been the most rewarding experience of my year. It has transformed me from a beginner in open-source to a confident contributor capable of making meaningful improvements. This experience enhanced my technical understanding of writing test cases and helped me get insights into my code. I have learned that anything is achievable with the right amount of energy and time. Don’t hesitate to submit your proposal for the next quarter

Screenshot showing Saranya's mention to Magnim, apologising for not able to join yesterday's meeting however thank him for doing some awesome contributions to the project.

Thanks for reading.

By Magnim Thibaut Freedisch Batale

Linkedlin | Github

LFX’23 Mentee at Litmus