Back to blog

Unreleased Production Changes Probe

Jagruti Tiwari
Jagruti Tiwari
July 16, 2023

Introduction

A bug fix, security fix, or new features are of no use unless they are released.

A production release not only provides users with an updated plugin, but also gives the developers a chance to get feedback on their work.

The "unreleased production changes" probe looks for unreleased commits in the production files.

If an unreleased file is found in the production path, the probe returns a failure message. If no unreleased file is found, it returns a success message.

For now, we are focusing on Maven production files (pom.xml and src/main folder).

This is my first probe that went live as a GSoC contributor.

Importance of the probe

The probe aims to identify unreleased production commits in Maven production files.

Finding an unreleased production file can mean one or more of the following:

  • There are unreleased security fixes that should be released as soon as possible.

  • There are unreleased features requested that would improve the usefulness of the plugin.

  • The plugin maintainer may be inactive or too busy to further develop the plugin. This could indicate the plugin needs a new maintainer and should be up for adoption.

Challenges

Learning to use JGit, a Java library that implements a Git version control system, was one of the biggest challenges I faced when working on this probe.

Since I was not familiar with Git hierarchy, I struggled to find the parent of a child commit using JGit.

In the end, my mentors suggested a pair programming session to review the thinking process involved in implementing such a probe.

I am thankful for their kindness and patience.

Outcome

When unreleased production files are found, the probe returns a failure status and the list of filenames.

When no unreleased production file is found, the probe returns a success message.

Learning

I hope there comes a day when test cases become my friends, but I don’t see this happening anytime soon.

Mentors suggested I should start with writing the test cases to reproduce the probe requirement(s), and later add code to pass each of the test cases.

This gave me an understanding of what the probe should actually do, and I learned to identify the test case scenarios.

Reading commits wasn’t possible without JGit Java library.

To implement JGit library and understand the features it provides, you should have strong understanding of Git concepts. I lacked depth in Git concepts that made me struggle with JGit.

This led me to strengthen the Git concepts along the way.

Conclusion

I once again realised the open-source world values quality.

The community is fine with fewer "quality" probes, as opposed to many "not-so-useful" probes.

Starting from ground zero is tough, whether implementing a new Java library or starting new work in another field.

However, with correct mentorship and guidance, you can rise up faster.

For more information or to find answers to any questions you might have, head to the official GSoC 2023 project Adding Probes to "Plugin Health Score" description page.

About the author

Jagruti Tiwari

Jagruti Tiwari

Jagruti works as a Senior Project Engineer in one of the reputable firms in India. Her open-source journey started in Jan 2022. She has a strong background in Java, JavaScript, and an intermediate knowledge of Python. Jagruti’s association with Jenkins started in Hacktoberfest 2022. This year (in 2023) she has been selected in the GSoC project titled "Adding Probes to Plugin Health Score System" which is her first GSoC. She hopes to continue being involved in the community and someday help mentoring new open source enthusiasts in the near future.