Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ONGOING] Keep dragonbot (hubot) up to date #510

Open
klonos opened this issue Mar 6, 2019 · 18 comments
Open

[ONGOING] Keep dragonbot (hubot) up to date #510

klonos opened this issue Mar 6, 2019 · 18 comments

Comments

@klonos
Copy link
Member

klonos commented Mar 6, 2019

This could fix some of the issues we are having. Namely the problem some users have on Gitter where they cannot karma++ others.


Notes:
the bot lives on ci.backdropcms.org

Docs:
https://github.com/hubotio/hubot/releases
https://github.com/hubotio/hubot/blob/master/docs/deploying/unix.md

@klonos
Copy link
Member Author

klonos commented Mar 6, 2019

I could help if I knew more details on where this is hosted/configured, and also have access/permissions.

Is this something that @larsdesigns can keep an eye on and update from time to time?

@stpaultim
Copy link
Contributor

I can help with this. I now have access to the code, but I'm reluctant to try the update until I know a little more about the implications. I can chat with Nate about this before or after the DEV call tomorrow. As I've mentioned, I'm going to use some time next month at a Chatbot meetup to work on Dragonbot.

@klonos
Copy link
Member Author

klonos commented Mar 6, 2019

Thanks @stpaultim 👍 ...although we could update the hubot version sooner than one more month. Out of curiosity, can you check what the current version is?

@larsdesigns
Copy link
Contributor

We should be able to create a Nagios plugin to monitor it for updates.

@serundeputy
Copy link
Member

I've added this repo: https://github.com/backdrop-ops/dragonbot which has an updated hubot under version control.

I put a copy of this one on the server, but it is not the bot that is currently running.

we could poweroff the current bot and start this one and see if it fixes some of our issues.

@klonos klonos removed their assignment Jun 5, 2019
@stpaultim
Copy link
Contributor

stpaultim commented Aug 28, 2019

Tonight at a chatbot meetup in the Twin Cities, @Radcliffe and I were working on Dragonbot again. Our theory was that we needed to update the hubot-gitter2 plugin on the server due to this problem huafu/hubot-gitter2#16.

We tried this update, but found the update to be incompatible with the very old version of node running on the server.

We tried to update node, but found that we did not have sufficient access on the server.

In the past, we had tried to update the bot without updating node and broke the bot, without making the connection to the outdated version of NODE JS at the time.

TONIGHT: we installed a fresh version of the bot on another server using a token from the original bot. Once we did this, both @Radcliffe and myself were able to access both versions of the Dragonbot (or so it appeared). Both versions of the bot seemed to be working.

@Radcliffe disabled the new version of the bot that he set up, but @Radcliffe and I were still able to access and use the bot. Apparently, @docwilmot was unable and remains unable to access the bot. So, the bot is not completely fixed. However, our experiences tonight suggest we are very close to a permanent fix. We know now the importance of updating NODE JS on the Dragonbot server.

My proposal:

  1. I know that we've been moving many Backdrop assets to new servers. We should decide whether or not DragonBot will continue to reside on its current server or move to a new home.
  2. Whether we move it to a new home or not, we should make sure that @Radcliffe, myself, and anyone else interested in working on the bot have access to maintain the code and update/maintain NODE JS on the server.
  3. We fully update NODE JS and the Hubot code.

That @Radcliffe and/or myself take responsibility for maintaining Dragonbot and making improvements (we regularly attend a chatbot meetup and would appreciate the chance to experiment with it).

That once we have Dragonbot working we look at any of the following improvements:

  • Gitter: Automatically have Dragonbot point people to the backdrop-issues channel if they post on general. #480 - Dragonbot automatically point people in little used channels to the main channel.
  • We update and add additional factoids and document how to use them
  • If possible - Dragonbot recognizes new users when they post and greets them appropriately with useful information about the community.
  • Research and better understand how Dragonbot is storing data (such as karma points).
  • Research additional integrations between Dragonbot and Github
  • Research additional integrations/relationships between Gitter and Dragonbot.
  • We'll give a demo on how we are using Dragonbot at a future Chatbot meetup and ask the group for ideas on how to better use it (while dropping our unsuspecting audience with subversive messages about how cool the @BackdropCMS community is).
  • We investigate ways of using Dragonbot to help users find useful information quickly. Ideas welcome......

@stpaultim stpaultim self-assigned this Aug 28, 2019
@Radcliffe
Copy link

When the gitter adapter is updated to the latest version, the bot aborts with the following error message:

SyntaxError: Use of const in strict mode.

The const declaration was introduced in ES6, and it is not supported by the version of Node that is running on the server. This is why I believe that updating Node would solve the problem.

@Radcliffe
Copy link

Radcliffe commented Aug 31, 2019

I have deployed DragonBot to Heroku, but we still need to migrate the data from the old Redis instance. (I need the username and password for Redis.)

@stpaultim
Copy link
Contributor

@jenlampton @quicksketch @larsdesigns

Getting this fixed is blocked by getting @Radcliffe a password for the Redis database.

I'll bring this up in dev meeting this week if it's not resolved before that.

@stpaultim
Copy link
Contributor

Getting this fixed is blocked by getting @Radcliffe a password for the Redis database.

Let's try to get this on DEV agenda this week.

@Radcliffe
Copy link

Radcliffe commented Nov 18, 2019

The Dragonbot code is in my repo at https://github.com/Radcliffe/dragonbot but we should move it to backdrop-ops/dragonbot.

I am able to run Dragonbot on a free Heroku instance, but I need to migrate the Redis database. It should be possible to import a database dump, but the instructions on Heroku's website assume that you are migrating from a live Redis instance. I would prefer to do it this way if possible, but I would need the Redis database credentials.

@jenlampton
Copy link
Member

jenlampton commented Nov 19, 2019

The Dragonbot code is in my repo at Radcliffe/dragonbot but we should move it to backdrop-ops/dragonbot.

@Radcliffe can you add me as a collaborator with admin access? I should be able to move this repo to backdrop-ops for you, then you can remove me as admin :)

@jenlampton jenlampton removed their assignment Nov 19, 2019
@Radcliffe
Copy link

Radcliffe commented Nov 19, 2019 via email

@jenlampton
Copy link
Member

jenlampton commented Nov 19, 2019 via email

@Radcliffe
Copy link

I can't see an option for granting admin access. How about if I just transfer the repo?

@jenlampton
Copy link
Member

okay - I promise to transfer it back!

@jenlampton
Copy link
Member

I think it worked? https://github.com/backdrop-ops/dragonbot Check and see if you still have admin access?

@stpaultim
Copy link
Contributor

Quick update on Dragonbot.

In our experimentation with Zulip, I've implemented a new version of Dragonbot and begun experimenting with adding new features, custom tricks that Dragonbot can do to both entertain us and hopefully increase activity/productivity in our chat channels.

In theory, these new features can be used in either Gitter or Zulip, once there is some kind of decision about where we are doing our business.
#629

We had been working on moving Dragonbot to Heroku server, but through my experimentation, I found that the free plan for Heroku is not really good for chatbots.

"Free dynos on Heroku will sleep after 30 minutes of inactivity. That means your hubot would leave the chat room and only rejoin when it does get traffic. This is extremely inconvenient since most interaction is done through chat, and hubot has to be online and in the room to respond to messages. To get around this, you can use the hubot-heroku-keepalive script, which will keep your free dyno alive for up to 18 hours/day. If you never want Hubot to sleep, you will need to upgrade to Heroku’s hobby plan."
https://hubot.github.com/docs/deploying/heroku/

For now, I've updated the plan to the hobby plan for $7 / month, but it might make more sense to self-host. This is a policy decision for a future meeting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants