DEV Community

Sergey Shinder
Sergey Shinder

Posted on

The fix we backported to our oldest branch did nothing

A customer on 5.2 reported a settlement rounding fault that we had found, fixed and shipped in March. I checked the branch before replying, and the fix was there. The commit was there, the file was there, the changed line was there. What was not there was the guard clause three lines above it.

We install our integration platform inside customers' own networks. 5.6 is current, and two large customers sit on 5.4 and 5.2 with support we sold them. That means three branches, forty one backports in the last year, and a median of nine days for a fix to reach the oldest one against two days on main.

The March fix was cherry picked into 5.4 without incident. Into 5.2, fourteen months and roughly nine hundred commits behind, it conflicted, because the surrounding function had been restructured in the meantime. Somebody resolved the conflict by hand at six in the evening, took the changed line and dropped the condition that decides when it applies, and shipped a patch that compiled, ran, and did precisely nothing. The regression test that proves the fix was written against the new structure and lives on main. Our build matrix builds every supported branch and runs the tests each branch contains, which for 5.2 is the suite as it stood fourteen months ago, and that suite was entirely happy.

Backports are opened by a bot now, against every supported branch, at the moment the original merges, so the set lands together or stalls together where everyone can see it. The test travels with the fix and has to be shown failing on that branch before it passes, which is the only check that would have caught this one. A monthly report prints the difference in test count between branches, because that number is a decent measure of how far our oldest product has drifted from the one we think about. And each branch carries its end of support date in the build, so it stops publishing rather than quietly going on forever.

Every version you still support is a separate product with a separate memory. Three branches gave us three chances to get it wrong and one suite capable of noticing.

– Sergey Shinder

Top comments (0)