Case study

When the daily build undid the fix

Case studyAutomation & Integration, Systems & Reliability, Lessons LearnedPracticalVerified with caveats

Choose your depth

Quick take

A public website was being updated in two ways: by hand, to fix layout and navigation, and by a scheduled job that rebuilds part of the site from a generator every weekday. The generator did not know about the hand-made fixes. Left alone, it would write the old values back over the new ones. Once that nearly happened and was caught before it went live. Once it did happen: a menu link added by hand the day before disappeared for about three hours after the morning rebuild.

The durable fix was to put those hand-made changes into the generator’s own source, so the next rebuild reproduces them. Changing the time of the rebuild is not, by itself, the fix.

Practical lesson

What happened, in outline:

  • A weekday job generates a defined set of public pages and a sitemap. Meanwhile, people and assistants were also changing the live site directly.
  • A new navigation header went live, and the generator was patched the same day to emit it — but that patch was not committed to the version-controlled source the job would use later.
  • The risk was written down the next day: the following morning’s rebuild might put old layout values back on the generated pages.
  • On the first test of that prediction, the morning build did produce the old values. The package was corrected by hand before it was deployed, so nothing reached the live site with the regression.
  • The structural fix was to port the live changes into the generator and the version-controlled code, then confirm that a fresh build matched what was already live.
  • The next weekday run was deployed as built, with no hand correction.
  • A day later, a newly added menu link — present on the live site but never given to the generator — was dropped when the rebuild ran. It was restored, and then added to the generator so later rebuilds keep it.

What a reader can apply:

  1. A deployment is not done until it has survived the next scheduled regeneration.
  2. Keep generated output and hand-maintained changes in separate paths, and release from a versioned source.
  3. If you fix something by hand on a generated page, put the same fix into the generator before the next run.
  4. Moving the weekday rebuild to 02:00 is not the fix, and that new time had not yet run when this was written (the first run was due on 7 December). The fix was porting the hand-made changes into the generator on 2 December, with the first clean run on 3 December. The incident that reached the live site was on 4 December, when a Route planner menu link added by hand the day before was dropped by the morning rebuild.
Deep dive

The 4 December regression is the clearest public instance: a link added by hand on 3 December was not in the generator, so the 4 December rebuild removed it from the generated pages and the sitemap. The gap was estimated from backup times at roughly three hours; the exact period was not logged.

What remains uncertain: the raw output of the earlier near-miss build was not preserved in the material reviewed, so that claim rests on contemporaneous notes and a later comparison, not on a fresh diff; it is not known how many earlier hand-fixes may have been lost before this window; whether the later process prevents a third instance was unproven when the evidence was written.

One site, one generator, about a week of evidence. The near miss and the live regression are evidenced; whether later process changes prevent a further instance was unproven when this was written. The article is published with those caveats.

Related tools: Automation Reliability Checker