Rotting Pull Requests - Detection And Actioning


Posted by Martin M. Lacey on Fri 15 November 2024

Explore the root cause of un-actioned pull-requests, how to detect and remedy (Part 1).

Rotting Pull Requests: Detection and Actioning

We have a problem, Houston, and we need to address it to ensure our ship can execute its mission. We have too many changes in-flight, waiting to be merged into our codebase to improve our systems and mission outcomes. Yet, we keep adding more features without dealing with the backlog of changes we’ve already developed!

Are you approaching this nightmare scenario? We are.

Visualizing a growing backlog in the form of an overloaded task board

The exasperation of too many pull requests in-flight clogs the workflow. The chaotic backlog and continuous arrival of new features highlight the urgency and delays in merging changes to improve system outcomes.

It’s not a good place to be. We need to get our processes back on track to deliver what the business needs and expects—at a high level of verified quality and functionality, without introducing vulnerabilities.


The Hot Seat: Addressing 900+ Rotting Pull Requests

My manager came to me today, asking: How can we promote good practices and get the 900+ rotting pull requests actioned to reduce the backlog?

This is the subject of today’s post—and the hot seat we share.

Where Did All These Pull Requests Come From?

The first questions should be:

  • Where did all these pull requests come from?
  • Why are they not being actioned?

Are teams too busy adding features to perform necessary code reviews and foster team collaboration?

Quality and the Feature Farming Trap

What happens to quality when teams act like feature farmers, focusing only on the next big functionality without seeing the big picture? Yes, Houston, we have a problem.

We have a massive codebase—over 300 applications and growing. Many of these applications are aging and of questionable utility, requiring upgrades to avoid obsolescence and unsupported components.

To address this, we’ve created automation that generates the needed upgrade changes and creates pull requests for engineers to review before committing changes to the repository. It’s an odd place to be, having code enhanced automatically and then reviewed by a human to ensure quality.


Automation and the Paradigm Shift

Typically, we write tests to verify that changes meet functional (and non-functional) requirements. However, this is different. We’re now reviewing and approving code changes generated by a program for another program—it just feels weird. It’s a mind-shift.

In the age of Artificial Intelligence (AI), our existing paradigms are shifting and evolving. We must ensure our processes are solid yet malleable, with even higher levels of quality and functionality. To achieve this, we need to step back from the feature factory we’ve become and reevaluate how we operate.

Engineers moving from old paradigm to a Software Factory using AI to get to the next level


The Path Forward: Embracing Automation and Addressing Backlogs

This paradigm shift requires us to start viewing our automation as a technical advantage—an enabler to grow beyond our current struggles. But first we must address our backlog of our <*> debt, which include technical, technology, code, test, and other classification of Software Engineering related obligations deferred or incurred through time and revisions. Awareness is the first step before meaningful change can occur.

The Challenges of Automation in Pull Requests

One drawback of automation in creating pull requests for tech upgrades and security fixes is the unnoticed accumulation of PRs due to heavy workloads. Intended to simplify processes and empower engineers, these PRs often get lost among the many others. As mentioned in previous blog posts, our automation also creates a detailed work item to help engineers track their technical debt and its remediation.

The key question remains: How can we encourage engineers to engage with automated PRs and truly empower them by automating tedious tech debt tasks?


Watch-This-Space: We are working on this issue, and our expert on the matter will blog about it in upcoming posts.

References