Archis's Blog

August 21, 2008

Code merges are a damned dangerous affair!

Filed under: Uncategorized — Tags: , , , , — archisgore @ 6:15 pm
I learnt a valuable lesson today. Some code that I had safe-merged about 6 weeks ago, caused a strange behaviour to manifest itself in the last couple of days.The code crept in during a conflict-less merge. Who knew? We do such merges 10 times a day, 5 days a week, and then some more on weekends.

The issue crept up behind our backs – and manifested as a bug in some totally different part of code. Took a few days of back-tracing until we realised where it was coming from. Took a couple more hours to narrow down the symptoms. And then took a line-by-line code-trace to find the probable cause, and then another diff-history review to look at where it came from.

Turns out that was just a single line of code that the merge didn’t detect as a conflict. Imagine what could happen if it were just a few lines. And the nightmare worsens if it happened to multiple files.

All in all, a valuable lesson learnt. Don’t ever accept a merge without at least a quick once-over review.

Theme: Silver is the New Black. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.