The Incident: The Rollback That Rolled Forward
Incident Hook
Thursday, 16:00. The backend release that passed staging all week is promoted: the promote-production workflow gives the tested staging-v1.4.0-… image its production-v1.4.0-… tag. At 16:05 Flux’s image automation commits the new tag to the production overlay - Update production backend image - and Flux rolls it out.
16:20. A report export that only production customers use starts answering 500. Staging never had that data.
16:25. Boris does it by the book: a pull request that reverts the automation’s commit. Merged at 16:30; Flux rolls the previous version back. The errors stop.
16:36. The errors are back. git log on the production overlay shows why:
16:35 Flux Image Automation Update production backend image
16:30 Boris Revert "Update production backend image"
16:05 Flux Image Automation Update production backend image
The ImagePolicy still picks the newest production tag - the broken one - and the automation wrote it back into Git within five minutes, exactly as it is built to do.
16:40. Boris asks his AI agent. It offers two ways out: set the image by hand on the Deployment, or build the previous commit on his laptop and push it as a new production tag - “a newer timestamp, so the policy will pick it”.
16:45. Ana stops both. The hand change would be set back by Flux at its next reconcile - and his everyday sign-in can only read production anyway. The laptop build would put an image into production that was never tested, never scanned, with a digest nobody has seen. She opens one pull request instead: the production ImagePolicy’s pattern narrowed to the last good tag, and newTag set to it. Merged at 16:55. The policy now picks the good tag; the automation agrees with Git; the rollback stays.
Monday: the fix is promoted from staging the normal way, and a second pull request restores the pattern.
Result: two waves of errors in a thirty-five-minute window - 16:20 to 16:30, then 16:35 to 16:55 - a rollback that undid itself, and two shortcuts that would have traded a known bug for an unknown image - until the one setting that chooses the version was changed instead of its output.
The story is invented; the workflow, the policies, the automation and its commit message are this platform’s.
Observed Symptoms
- The production backend answers
500for one feature; staging, with other data, does not. - After the revert is merged and applied, the errors stop - and come back a few minutes later.
git logon the production overlay: a newUpdate production backend imagecommit by Flux Image Automation, after the revert.- The Deployment’s image is the broken tag again, although nobody changed it by hand.
Confusion Phase
It looks like Git or Flux is misbehaving:
- the revert was merged, and Flux applied it - so the rollback worked;
- something “reverted the revert” - a bot, a race, a bug;
- the fastest fix is the one that does not wait for Git.
Is the automation broken - or is it doing exactly what its policy tells it to?
What AI Would Propose (Brave Junior)
- “Set the image on the Deployment by hand -
kubectl set image- until Monday.” - “Build the last good commit locally and push it as a new production tag; the policy picks the newest.”
- “Delete the production ImageUpdateAutomation.”
Why This Is Dangerous
- A revert of the output is not a change of the input. The ImagePolicy chooses the version;
newTagis only where the choice is written. As long as the policy picks the broken tag, the automation writes it back. - A hand change does not survive Flux - and it hides the version from Git, so the next person reads the wrong one (Chapter 03).
- A rebuild is a new, untested artifact. The same commit built again pulls today’s dependencies and base images; its digest is new, and nothing proves it behaves like the image that passed staging.
- Deleting the automation removes it for every later release - the version is then chosen by whoever edits Git next, and nobody notices that promotion stopped.
Pause and Predict: A production tag and a staging tag point to the same digest. Are they the same image? And what would you compare to prove that the pods in production run it?