The beauty of refactoring; things do get better and more clear. But with every step forward, I run into things that need to be better, more efficient and adaptable to more scenarios. This is part of the strive to perfection, but also due to my inherent curiosity for the best solution.
Curiosity is a gift but also a curse. It can really help you find a good solution to a problem, but it can also suck you into a never ending vortex of information and new possibilities.
A little example of this was the provisioning feedback required for a good user experience. What's happening and how long do I still need to wait? We need valid answers for that and in this case the solution is pretty straight forward. Strackt uses Ansible to accomplish immutable provisioning and it provides callback options to keep track of the progress.
def v2_runner_on_ok(self, result):
payload = {'state': 'success',
'task_name': result.task_name,
'task_output' : result._result
}
requests.post(self.callback_url, data=payload).json())
Pretty straight forward to accept this back into Strackt and process this into a feedback system
class AnsibleCallbackController extends Controller
{
public function store(Request $request)
Problem for me: the endless posibilities of logging, tracking, error handling, UI feedback, realtime processing, etc, etc. Whenever I stumble upon these things (very often), the vortex pulls me into a world of options; even though this really, really shouldn't be part of the MVP.
So, time to check myself, put the ideas and research on the backlog and move on. Time to trust myself to play with this later on and implement it when I really need it.
Done
- A feedback loop on provisioning progress
- Structured API endpoints and testing
Upcoming
- Move the fuck on!