Your fix works in test but the bug still happens in production: configuration drift

Test environments drift from production: older rule groups, missing mappings, an extra rule that shifts numbering. Diff the configurations before you trust a test result, and promote by hand when they differ.

By Herb Park, Clarent Technologies

Symptom

A production issue will not reproduce in test, or reproduces differently. Test returns a generic ERP tax code on every line, or a fix that passed in test does something else in production.

What it usually means

The engine configuration in test is no longer a copy of production. Drift we have seen:

There is also short-lived drift: right after an import or check-in, results can flip for a few minutes (company not found, a generic code, a stale rule) before they settle.

How to confirm it

  1. Export the company configuration from both environments and diff rule groups, rules, reference lists, mappings and company IDs.
  2. Re-run the failing case in test only after accounting for every difference.
  3. After any import, wait a few minutes and run the case twice before trusting the result.
A side by side diff shows where test stopped matching production A comparison built from the two configuration exports (illustrative values). Account for every row that differs before you trust a test result.
  • Item: Rule group; Test: Older structure; Production: Current structure
  • Item: Tax code mappings; Test: Empty default group; Production: 46 mappings
  • Item: Rules in the group; Test: 31; Production: 32
  • Item: Company ID; Test: CO1000; Production: CO_1000
  • Item: Reference lists; Test: 12 lists; Production: 12 lists, same entries
  • (1) An older rule group in test means a fix is being tested against logic production no longer runs.
  • (2) With no mappings, every line in test maps to one generic ERP tax code.
  • (3) One extra rule in production shifts the numbering, so rule numbers stop lining up.
  • (4) A small difference in the company ID sends test calls to the wrong company.

Fix

Large drift means a refresh, and any difference means promoting by hand The promotion path when test and production differ. The closing diff is the proof that nothing else moved.
  • Diff shows a difference
  • Is the drift large?
  • Refresh test from production: Then remove obsolete rule groups
  • Change production by hand: Under change control, no import of a test export
  • Export production again: Diff it against test
  • Only the intended change moved

How to prevent it