project-thumbnail-11
Developed for SIA "Autentica" in 2019
Tags: Python Slack

A rather nice experience integrating Python with the Slack API.

More information

Imagine using the quite nice Flyway solution for managing your database migrations. Now imagine the version string growing to something quite complicated over time, to the tune of V20230214.X.Y.Z.W.M.N due to project requirements. How are you supposed to figure out ways to name such migrations manually?

What I did

I believe that you shouldn't do such work manually, because it's actually quite error prone, so I wrote an interactive CLI tool in Python, which asks you to answer a few questions, with either pre-populated options, or to enter your own answers, such as custom version numbers that correspond to the migration that you want to make. But that's also not enough by itself, what about the people who aren't using such a tool?

Because of this, I integrated the tool with the Slack API, which let the tool post messages to Slack on behalf of the migration author, so that others would know that this person has reserved a certain migration version for their own changes within the database and that they should pick the next available one.

What I learnt

When you're dealing with lots of complexity, writing a tool can definitely be a good return on the investment. However, while some might enjoy using such a tool, others will probably prefer to do things manually, so it can be pretty nice to be accommodating towards everyone.

Page rendered in: 0.07 seconds