Automation will eventually run into a problem. A password expires, an API changes, something doesn’t get migrated correctly, a file is empty missing. When I build automation, I focus on four things.
Reliable
Good automation should let you know when something isn’t working. Failures happen will happen and I want an alert that tells me what failed and where it failed.
Repeatable
If an automation fails halfway through, I should be able to run it again without making a bigger mess. It shouldn’t create duplicate records, send the same email ten times, or delete the wrong thing.
The same input should produce the same result, and the automation should be safe to run more than once.
Reviewed
Automation shouldn’t just be on someone’s desktop. Keep it in source control, document what it does, and have someone review it before it goes into production.
Another person may catch something you missed. More importantly, someone else will understand how it works.
Rollback
Before running automation, I want to know what the rollback plan is. If it changes data, I need to know how to restore it. If it changes a configuration, I need to know how to revert it.
Don’t wait until something breaks to think about recovery. Test the rollback process before you need it.
Don’t forget logging
I also want to know what the automation did, when it ran, and whether it finished successfully.
At a minimum, I log:
- Input
- Output
- When it ran
- Actions taken
- Failures
- Errors
The worst situation is having automation run, something break, and nobody knows what it changed. Good logging makes troubleshooting a lot easier.
Automation should save time, not create some chaotic mystery. Making it Reliable, Repeatable, Reviewed, and easy to Rollback helps keep it that way.
Leave a Reply