RITlug / teleirc

Go implementation of a Telegram <=> IRC bridge for use with any IRC channel and Telegram group
https://docs.teleirc.com/
GNU General Public License v3.0
138 stars 46 forks source link

Send bot message after a successful version upgrade #318

Closed jwflory closed 3 years ago

jwflory commented 4 years ago

Summary

When the bot restarts after a version change, emit a message in that chat such as "TeleIRC updated to v2.x.x!"

Background

Is your improvement related to a problem? Please describe:

Upgrading the bots requires logging into IRC. If you are going to get a definite confirmation that the bot disconnects and reconnects, you have to see it from IRC.

Describe the solution you'd like:

To more transparently announce updates, a message could be sent when TeleIRC restarts after a successful upgrade:

TeleIRC updated to v2.0.0-pre2!

This would appear in IRC and Telegram.

Describe alternatives you've considered:

We could just put it in the logs. But I think it has two benefits to be a chat message and not a log message:

  1. Better transparency to users about changes to software that processes their data (or, chat messages)
  2. Subtle way to raise awareness for our project since a downstream user never has to reveal their bot uses RITlug/teleirc code

Details

  1. Research best way to manage version state (e.g. how do we detect version changes?)
  2. Implement a version checker method that remembers version across two runs
  3. Add version upgrade notice to logger
  4. Announce version upgrade notice as a chat message in IRC and Telegram

Outcome

  1. Better awareness / user experience for managing TeleIRC versions
  2. Better awareness for TeleIRC in downstream bots running our code
Tjzabel commented 4 years ago

@jwflory I see this issue as high maintenance, low reward. As of now, we do not have any way of managing state across deployments, and therefore don't have a way to keep track of which version TeleIRC was running on its last run.

The only way I can (at the moment) see this as being possible, is if we had a function to disconnect and reconnect from TG/IRC, but that defeats the purpose of restarting the bot due to a version upgrade.

xforever1313 commented 3 years ago

I actually did something similar on my IRC Bot.

Tim is right, there needs to be some kind of persistence for this to work. Chaskis works by:

jwflory commented 3 years ago

Looking back at this, I concur with @Tjzabel and @xforever1313. Since TeleIRC is sort of "stateless" by design, at least for now, I don't think this has a lot of value for the project.

We can always revisit later if things change… but for now, I am going to go ahead and close this issue out as out of scope. :city_sunset: